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.

FlagDescription
--no-gitignoreIgnore .gitignore filtering and upload matching files
--ignore-dotfilesSkip dotfiles/dot-directories
-e, --excludeExclude file/directory paths (repeatable)
--dry-runShow intended actions without mutating remote
--optimizedSkip files whose SHA1 hash already matches the server
--pruneDelete remote files that do not exist locally
Examples
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.

Examples
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.

FlagDescription
--ignore-dotfilesSkip dotfiles/dot-directories
-e, --excludeExclude file/directory paths (repeatable)
Examples
neocities-red diff .
neocities-red diff ./my-website --ignore-dotfiles
neocities-red diff . -e secret.txt

list

List files from your Neocities site.

FlagDescription
-d, --detailShow a detailed table with size, SHA1 hash and last-updated timestamp
-a, --allList the entire site (ignore the path argument)
Examples
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).

Examples
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.

FlagDescription
-q, --quietShow a spinner instead of per-file output
Examples
neocities-red pull
neocities-red pull --quiet

delete

Delete one or more files from your site.

Examples
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.

FlagDescription
-y, --yesConfirm the destructive action (required)
--dry-runShow what would be deleted without deleting
Examples
neocities-red purge -y
neocities-red purge -y --dry-run

logout

Remove the stored API key from the config. Requires confirmation.

Examples
neocities-red logout -y

version & pizza

Examples
neocities-red version   # print the gem version
neocities-red pizza     # order a free pizza (easter egg) 🍕