CLI Documentation

Install niotio and drive campaigns from your terminal or a coding agent — with machine-readable JSON and safe non-interactive defaults.

Releases README API
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
--jsonMachine-readable JSON (recommended for agents)
--profileSelect a config profile
--url / --tokenOverride the target
--yesConfirm destructive actions non-interactively
--timeoutHTTP timeout (default 30s)
Commands
Command Description
niotio doctorCheck config, connectivity and auth
niotio campaign list | get | create | updateList and edit campaigns
niotio campaign activate | deactivate | sendLifecycle and dispatch
niotio campaign metrics | respondents | activityResults and activity log
niotio respondent add | importAdd respondents (single or CSV)
niotio campaign simulate | simulate-clearGenerate/remove simulated responses (test campaigns)
niotio metricsAccount-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.