Authentication
Neocities Red resolves your Neocities credentials in a predictable order — so you can log in interactively or script it in CI.
Credential resolution order
--api-keyflag —neocities-red --api-key <key> push .NEOCITIES_API_KEYenvironment variable- Stored config — the API key saved by a previous interactive login
- Interactive login — prompts for sitename/username and password
Environment variables
For non-interactive logins (for example, in CI), you can set:
| Variable | Purpose |
|---|---|
NEOCITIES_API_KEY | API key used as a Bearer token |
NEOCITIES_SITENAME | Default sitename/username for the login prompt |
NEOCITIES_PASSWORD | Default password for the login prompt |
Non-interactive push
NEOCITIES_API_KEY="your-api-key" neocities-red push .
Stored config file
The config file is stored per platform:
| Platform | Location |
|---|---|
| Linux | $XDG_CONFIG_HOME/neocities/config.json (defaults to ~/.config/neocities/config.json) |
| macOS | ~/Library/Application Support/neocities/config.json |
| Windows | %LOCALAPPDATA%\neocities\config.json |
| FreeBSD / other | ~/.neocities/config.json |
Logout
Remove the stored API key with:
Logout
neocities-red logout -y