CLI Documentation
Install niotio and drive campaigns from your terminal or a coding agent — with machine-readable JSON and safe non-interactive defaults.
Install straight from this app — no GitHub token needed.
Get your API token under Settings → API tokens (shown once).
1. Install
Install straight from this app — all you need is curl (no GitHub token, no Go).
curl -fsSL https://maskinen.stigsen.dk/cli/install.sh | sh
Alternative: build from a clone (needs Go 1.23+).
git clone https://github.com/stigsen/nps.git && cd nps/cli
go build -o "$HOME/.local/bin/niotio" ./cmd/nps
2. Configure
niotio config set-url https://maskinen.stigsen.dk
niotio config set-token YOUR_API_TOKEN
niotio doctor # checks config, health and auth
CI/agents can skip the file: NPS_URL + NPS_TOKEN (and NPS_LANG for Danish help text).
Global flags
| Flag | Meaning |
|---|---|
--json | Machine-readable JSON (recommended for agents) |
--profile | Select a config profile |
--url / --token | Override the target |
--yes | Confirm destructive actions non-interactively |
--timeout | HTTP timeout (default 30s) |
Commands
| Command | Description |
|---|---|
niotio doctor | Check config, connectivity and auth |
niotio campaign list | get | create | update | List and edit campaigns |
niotio campaign activate | deactivate | send | Lifecycle and dispatch |
niotio campaign metrics | respondents | activity | Results and activity log |
niotio respondent add | import | Add respondents (single or CSV) |
niotio campaign simulate | simulate-clear | Generate/remove simulated responses (test campaigns) |
niotio metrics | Account-wide NPS |
niotio help [topic] | Built-in help (EN/DA) |
Example: create → seed → read → clean up
id=$(niotio campaign create --name "agent-$(date +%s)" --test --json | jq -r .id)
niotio campaign simulate "$id" --count 5 --yes
niotio campaign metrics "$id" --json
niotio campaign simulate-clear "$id" --yes
niotio campaign delete "$id" --yes
Every command supports --json. Destructive actions need --yes when non-interactive.