CLI Reference
Every Neocities Red command, flag and example — the full command-line toolkit for managing a Neocities site.
Run neocities-red help to list all commands, and neocities-red help <command> for detailed help on any command.
push
Recursively upload a local directory to your Neocities site. Respects .gitignore rules by default.
| Flag | Description |
|---|---|
--no-gitignore | Ignore .gitignore filtering and upload matching files |
--ignore-dotfiles | Skip dotfiles/dot-directories |
-e, --exclude | Exclude file/directory paths (repeatable) |
--dry-run | Show intended actions without mutating remote |
--optimized | Skip files whose SHA1 hash already matches the server |
--prune | Delete remote files that do not exist locally |
neocities-red push .
neocities-red push . --optimized --ignore-dotfiles
neocities-red push . -e node_modules -e .git
neocities-red push . --dry-run
neocities-red push . --prune
upload
Upload an individual file or folder to your site.
neocities-red upload index.html
neocities-red upload assets/ images/assets
diff
Compare a local directory with the remote site and show added, modified and removed files.
| Flag | Description |
|---|---|
--ignore-dotfiles | Skip dotfiles/dot-directories |
-e, --exclude | Exclude file/directory paths (repeatable) |
neocities-red diff .
neocities-red diff ./my-website --ignore-dotfiles
neocities-red diff . -e secret.txt
list
List files from your Neocities site.
| Flag | Description |
|---|---|
-d, --detail | Show a detailed table with size, SHA1 hash and last-updated timestamp |
-a, --all | List the entire site (ignore the path argument) |
neocities-red list
neocities-red list images -d
neocities-red list -a
info
Show information and statistics for a site (defaults to your own site).
neocities-red info
neocities-red info fauux
pull
Download the most recent version of files from your site. Skips files that haven't changed since your last pull.
| Flag | Description |
|---|---|
-q, --quiet | Show a spinner instead of per-file output |
neocities-red pull
neocities-red pull --quiet
delete
Delete one or more files from your site.
neocities-red delete old.html
neocities-red delete old.html archived/old.css
purge
Delete everything from your site. Intended for development sites only — use with care.
| Flag | Description |
|---|---|
-y, --yes | Confirm the destructive action (required) |
--dry-run | Show what would be deleted without deleting |
neocities-red purge -y
neocities-red purge -y --dry-run
logout
Remove the stored API key from the config. Requires confirmation.
neocities-red logout -y
version & pizza
neocities-red version # print the gem version
neocities-red pizza # order a free pizza (easter egg) 🍕