Repository navigation
Command line and scripting
TideFTP can run one command without opening the interface. It can also run several commands through one connection.
The full scripting guide documents every command, option, recipe, and scripting rule. This page covers the common cases.
tideftp ls --profile prod /var/www
tideftp get --profile prod /var/log/app.log ./logs/
tideftp put --profile prod ./build.tar /releases/
tideftp stat --json --profile prod /releases/build.tar
tideftp exists -f --profile prod /srv/ready.flagAvailable operations include ls, stat, exists, get, put, pget, rm, rmdir, mkdir, mv, cat, du, find, tree, chmod, ln, and readlink.
Existing destinations require --force. put and sync upload to NAME.part, then rename the completed file. Pass --no-part to write directly to the final path.
Normal results go to standard output. Notices and errors go to standard error. -q suppresses everything except errors. ls, stat, and find accept --json.
TideFTP uses these exit codes:
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | An operation failed |
| 2 | Invalid command or arguments |
| 3 | Connection failed |
| 4 | Authentication failed |
| 5 | A named path does not exist |
Use script for a file or inline command list:
tideftp script --profile prod -c \
'cd /var/www; lcd ./build; put index.html; chmod 644 index.html'
tideftp script --profile prod deploy.tideA script supports quoting, comments, aliases, set, source, open, close, local shell commands with !, background jobs with &, and job queues. It stops on the first failure. Add -k to continue and return the first failure's exit code.
Use shell for an interactive session:
tideftp shell --profile prodProvide passwords through a secret manager, the operating system keyring, or --password-stdin. Do not put passwords in the crontab or command arguments.
Run a dry sync before adding deletion to an unattended job. For example:
#!/bin/sh
set -eu
tideftp mirror --profile prod --delete --log /var/log/mirror.log \
/var/www/uploads /srv/backups/uploadsA file named cli.rc beside config.toml can define settings and aliases. Use --rc FILE to select another file or --no-rc to skip it.
This page describes source revision b1fb600.