CLI Overview
Install the Notiflows CLI, authenticate with an account token, and manage your notiflows as code — pull, edit, push, and publish from the terminal or CI.
The Notiflows CLI (@notiflows/cli) is a notiflows-as-code tool. It pulls the notiflows in a project into version-controllable local files, lets you edit them in your editor, and pushes them back through the Management API. It also wraps the full lifecycle (publish, rollback, activate, deactivate, archive), read-only inspection (list/get versions, channels, projects), and triggering runs.
The CLI is a thin client over the Management API — creation, validation, versioning, and execution all happen server-side. The CLI only serializes notiflows to and from disk and calls the API.
Install
The package installs two binary aliases: notiflows and the shorthand nf.
npm install -g @notiflows/cli
# or run without installing
npx @notiflows/cli --helpAuthenticate
The CLI authenticates with an account token (prefix nf_at_). Create one in the dashboard (Account tokens), then log in:
notiflows login
# or pass it non-interactively
notiflows login --token nf_at_xxxThe token is stored at ~/.config/notiflows/credentials.json with mode 0600 (owner read/write only).
Resolution precedence. The token is resolved as --token flag → NOTIFLOWS_TOKEN env → the stored credentials file. The project is resolved as --project flag → NOTIFLOWS_PROJECT env → the project field in notiflows.json. See Account tokens for how to create, scope, and rotate the token.
Confirm who you are and which project is active:
notiflows whoamiQuickstart
A typical loop is init → pull → edit → push → publish:
# 1. Create notiflows.json + the .notiflows/notiflows/ working tree
notiflows init my-app
# 2. Pull every notiflow in the project into local files
notiflows pull
# 3. Edit notiflow.json / template body files in your editor, then
# push your changes back (creates a new draft version)
notiflows push
# 4. Publish the draft so it becomes live for execution
notiflows notiflow publish welcome-seriesNotiflows live under <notiflowsDir>/notiflows/<handle>/ (default .notiflows). Each notiflow is a notiflow.json plus extracted template body files — see Notiflows as code for the on-disk format.
Explore
Notiflows as code
The on-disk format: notiflows.json, per-notiflow notiflow.json, the flat steps array, and template body extraction.
Command reference
Every command, grouped by area — auth, project, sync, lifecycle, trigger, and channels.
CI/CD
Run the CLI in continuous integration with environment-based auth and idempotent pushes.
MCP server
The same operations, conversationally, inside an AI editor.