Skip to content

Commit 34c9be5

Browse files
axpnetEhudKirshclaude
committed
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>
1 parent d9e2271 commit 34c9be5

2 files changed

Lines changed: 76 additions & 2 deletions

File tree

cli/commands.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,23 @@ aeroftp-cli cleanup --profile "server" /remote/path/ --force
294294

295295
Dry-run by default. JSON output includes `orphans`, `bytes`, and `bytes_freed`.
296296

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)).
313+
297314
### sync
298315

299316
```bash

cli/installation.md

Lines changed: 59 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ The binary name is `aeroftp-cli`. On `.deb` and `.rpm` installs, a symlink `aero
2626

2727
```bash
2828
# Both are equivalent on .deb/.rpm installs
29-
aeroftp-cli --version
29+
aeroftp --version
3030
aeroftp-cli --version
3131
```
3232

@@ -41,13 +41,70 @@ sudo ln -s /Applications/AeroFTP.app/Contents/MacOS/aeroftp-cli /usr/local/bin/a
4141
sudo ln -s "$(pwd)/squashfs-root/usr/bin/aeroftp-cli" /usr/local/bin/aeroftp
4242
```
4343

44+
## 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.
76+
77+
For scripting, use `--json`:
78+
79+
```bash
80+
aeroftp-cli --json alias-toggle aero
81+
# {"alias":"aero","path":".../aero","path_in_env":false,"state":"on"}
82+
```
83+
84+
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` |
95+
| PowerShell | `$PROFILE` | `Set-Alias -Name aero -Value aeroftp-cli` |
96+
97+
After editing the file, reopen the shell or `source` it, then verify with `aero --version`.
98+
99+
The shorter names (`aftp`, `aero`) were added at the community's request in [discussion #273](https://github.com/axpdev-lab/aeroftp/discussions/273).
100+
44101
## Verify Installation
45102

46103
After installing, confirm the CLI is working:
47104

48105
```bash
49106
aeroftp-cli --version
50-
# Output: aeroftp 3.7.0
107+
# Output: aeroftp 4.0.3
51108

52109
aeroftp-cli --help
53110
# Output: full command listing with descriptions

0 commit comments

Comments
 (0)