You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs(cli): document the aftp short name and aero opt-in alias
Add a "Shorter Command Names" section to the CLI installation page
covering the built-in aftp name and the aero alias toggle, plus manual
shell recipes (bash/zsh/fish/PowerShell). Add an alias-toggle entry to
the command reference. Fix a duplicate --version example and refresh the
version string. Requested in discussion #273.
Co-Authored-By: EhudKirsh <EhudKirsh@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Dry-run by default. JSON output includes `orphans`, `bytes`, and `bytes_freed`.
296
296
297
+
### alias-toggle
298
+
299
+
Enable or disable the optional `aero` short alias. The same command toggles it on and off, and is idempotent (exit code 0 in both directions).
300
+
301
+
```bash
302
+
# Toggle the 'aero' alias on/off
303
+
aeroftp-cli alias-toggle aero
304
+
305
+
# Override the target directory (default: ~/.local/bin)
306
+
aeroftp-cli alias-toggle aero --bin-dir ~/bin
307
+
308
+
# JSON output for scripting
309
+
aeroftp-cli --json alias-toggle aero
310
+
```
311
+
312
+
The `aftp` short name is built in and always present, so it needs no toggle. See [Shorter Command Names](/cli/installation#shorter-command-names-aftp-and-the-aero-alias) for the full explanation. Added at the community's request ([discussion #273](https://github.com/axpdev-lab/aeroftp/discussions/273)).
## Shorter Command Names: `aftp` and the `aero` Alias
45
+
46
+
Typing `aeroftp-cli` in full gets tedious for interactive use. Two shorter names are available, and both run exactly the same binary.
47
+
48
+
### `aftp` (built-in)
49
+
50
+
`aftp` is a built-in four-character name for the CLI. It is always present, with no setup required. Anything that works under `aeroftp-cli` works under `aftp`:
51
+
52
+
```bash
53
+
aftp ls sftp://user@host/
54
+
aftp sync ./local sftp://user@host/backup
55
+
```
56
+
57
+
### `aero` (opt-in alias)
58
+
59
+
`aero` is provided as an opt-in alias you enable with a single command. It is deliberately not shipped as a global binary, because a package owning `/usr/bin/aero` would fail to install on any system where another package already owns that path (a file conflict at the package-manager level).
60
+
61
+
The same command both enables and disables the alias (toggle):
62
+
63
+
```bash
64
+
# Enable: creates ~/.local/bin/aero -> dispatcher
65
+
aeroftp-cli alias-toggle aero
66
+
# The 'aero' alias is now On
67
+
68
+
# Run it again to disable
69
+
aeroftp-cli alias-toggle aero
70
+
# The 'aero' alias is now Off
71
+
```
72
+
73
+
The command is idempotent and exits with code 0 in both directions. The default target directory is `~/.local/bin`; pass `--bin-dir <path>` to override. If the target directory is not on your `PATH`, a one-line note on stderr explains how to add it.
74
+
75
+
The toggle refuses to overwrite an existing non-symlink file at the target path, and refuses to remove a symlink that does not point at the current AeroFTP binary. This protects user-owned files and foreign installations.
Once enabled, anything that works under `aeroftp-cli` works under `aero`: `aero ls`, `aero sync`, `aero vault`, `aero mcp`, and so on.
85
+
86
+
### Manual alias (alternative)
87
+
88
+
If you prefer to wire the alias yourself, the snippets below are equivalent to the toggle command. They do not need root and they do not touch the package layout.
89
+
90
+
| Shell | File | Line |
91
+
|-------|------|------|
92
+
| bash |`~/.bashrc`|`alias aero='aeroftp-cli'`|
93
+
| zsh |`~/.zshrc`|`alias aero='aeroftp-cli'`|
94
+
| fish |`~/.config/fish/config.fish`|`alias aero 'aeroftp-cli'` then `funcsave aero`|
0 commit comments