CLI
The nona CLI manages admin workflows from a terminal. Use it for:
- login sessions
- saved defaults
- projects
- config entries
- API keys
- users
- Firebase Remote Config migration
The CLI is especially useful because Nona is self-hosted and operator-friendly by design, so many teams use it for repeatable administration even if they also use the admin UI.
Install
Section titled “Install”npm install -g nona-cliWindows options:
choco install nona-cliRelease archives are also published for Windows, Linux, and macOS.
When to use the CLI
Section titled “When to use the CLI”Use the CLI when you want repeatable admin operations, terminal-based workflows, automation or scripting, a clean migration path from Firebase Remote Config, or access to history, rollback, and share-link workflows without relying only on the UI.
Authenticate
Section titled “Authenticate”For a brand-new Nona instance, use init when you want the shortest path to a readable flag:
nona init \ --yes \ --base-url https://nona.example.com \ --email admin@example.com \ --password secret \ --project mobile-app \ --print-keyinit registers the first admin when needed, logs in on existing instances, creates or reuses the project and environment, seeds a starter flag, creates or reuses a scoped API key, and prints app-ready environment variables.
nona auth register --base-url https://nona.example.com --email admin@example.com --password secretnona auth login --base-url https://nona.example.comnona auth whoamiauth register is the lower-level non-interactive first-admin command. It creates the initial admin account when the Nona instance has no users yet and saves the returned session token, so automation can continue with project, API key, and config commands without opening the admin UI.
auth login opens a browser and stores a session token, which makes interactive use easier than pasting a bearer token into every command.
Bootstrap a first flag
Section titled “Bootstrap a first flag”The default init output is directly appendable to an app .env file:
# Nona - project "mobile-app", env "production"VITE_NONA_BASE_URL=https://nona.example.comVITE_NONA_ENV_ID=productionVITE_NONA_API_KEY=****158D# API key masked; re-run with --print-key to emit a working value.# Verify: curl -H "X-Api-Key: $VITE_NONA_API_KEY" https://nona.example.com/api/production/Features%3AExampleUseful options:
--yesmakes the command non-interactive: it never prompts and fails fast if a required value is missing.--env productionchooses the environment to create or reuse.--seed-flag Features:Example=truechanges the starter flag.--no-seed-flagskips starter flag creation.--scope client|server|allcontrols the API key and starter flag scope.--format dotenv|json|env-exportchanges the output format.--password -reads the password from stdin.--print-keyprints the full API key instead of masking it.
Create a project
Section titled “Create a project”nona projects create --name mobile-appnona projects listUse nona init for the first project and environment in a fresh setup. For later manual administration, create the project from the CLI, then create additional environments in the admin UI.
Save defaults
Section titled “Save defaults”nona config set base-url https://nona.example.comnona config set project mobile-appnona config showAfter defaults are saved, commands can omit --base-url and --project, which is helpful when you are doing repeated work on the same Nona instance and project.
Manage config entries
Section titled “Manage config entries”nona entries list --project mobile-app --environment productionnona entries get --project mobile-app --environment production --key Features:Checkoutnona entries set --project mobile-app --environment production --key Features:Checkout --value true --scope client --content-type booleannona entries history --project mobile-app --environment production --key Features:Checkoutnona entries rollback --project mobile-app --environment production --key Features:Checkout --version 2nona entries delete --project mobile-app --environment production --key Features:CheckoutIf you already saved a default project with nona config set project mobile-app, the same commands can omit --project.
nona entries list --environment productionnona entries get --environment production --key Features:Checkoutnona entries set --environment production --key Features:Checkout --value true --scope client --content-type booleannona entries history --environment production --key Features:Checkoutnona entries rollback --environment production --key Features:Checkout --version 2nona entries delete --environment production --key Features:CheckoutThese workflows cover the day-to-day runtime model: inspect values, create or update entries, review history, and roll back changes.
Share config entries
Section titled “Share config entries”nona entries share create --environment production --key Features:Checkout --expiration 1hnona entries share create --environment production --key Features:Checkout --view-onlynona entries share list --environment production --key Features:Checkoutnona entries share revoke --environment production --key Features:Checkout --id 11See Parameter share links for expiration options, permissions, and public endpoints.
Manage API keys
Section titled “Manage API keys”nona keys create --project mobile-app --name "Web app" --scope client --environment productionnona keys list --project mobile-appnona keys delete --project mobile-app --id 42nona keys show --project mobile-app also works. show is an alias for list.
Use client-scoped API keys for frontend/mobile apps and server-scoped keys for backend-only reads whenever possible.
Invite a user
Section titled “Invite a user”nona users create --name "Jane Doe" --user-email jane@example.com --role editorThe CLI returns the invitation result so you can hand the invite link or token to the teammate who needs access.
Migrate from Firebase Remote Config
Section titled “Migrate from Firebase Remote Config”nona migrate firebase --config ./nona.migration.json --dry-runnona migrate firebase --config ./nona.migration.jsonUse --dry-run before applying a migration.
See Firebase migration for configuration, environment mapping, and conflict behavior.
Why the CLI matters for migration
Section titled “Why the CLI matters for migration”Migration is usually an operator workflow, not a day-to-day end-user workflow. The CLI fits that well because it handles repeatable execution, dry runs, configuration files, credentials and environment variables, and output you can review before production cutover.
Environment variables
Section titled “Environment variables”The CLI reads these values when flags are omitted:
| Variable | Used for |
|---|---|
NONA_CLI_BASE_URL |
Nona base URL |
NONA_CLI_PROJECT_NAME |
project name |
NONA_CLI_BEARER_TOKEN |
admin bearer token |
NONA_CLI_EMAIL |
migration/login email |
NONA_CLI_PASSWORD |
migration/login password |
NONA_INIT_EMAIL |
nona init admin email |
NONA_INIT_PASSWORD |
nona init admin password |
Related docs
Section titled “Related docs”When should I use the CLI instead of the admin UI?
Section titled “When should I use the CLI instead of the admin UI?”Use the CLI for repeatable operations, scripting, migration work, history and rollback workflows, and terminal-first administration.
Do I still need the admin UI if I use the CLI?
Section titled “Do I still need the admin UI if I use the CLI?”Often yes.
Some workflows such as adding extra environments are still documented primarily through the admin UI. nona init creates or reuses the first environment for bootstrap automation.
What is the best first CLI command to run?
Section titled “What is the best first CLI command to run?”For a fresh self-hosted instance, nona init --yes --base-url https://nona.example.com --email admin@example.com --password secret --project mobile-app is the best first command because it reaches a real flag read path without browser interaction.
For an existing instance where you want an interactive admin session, use nona auth login --base-url https://nona.example.com.
Why is the CLI especially important for Firebase migration?
Section titled “Why is the CLI especially important for Firebase migration?”Because migration is an operator workflow that benefits from dry runs, config files, and repeatable execution from a terminal.