@nsupp/cli
v0.1.0
Published
nsupp command-line client — conversations, people, team chat and a raw escape hatch over the /cof/v1 REST API. Dependency-free.
Downloads
44
Readme
@nsupp/cli
Command-line client for the nsupp REST API. Dependency-free, Node 18+.
npm install -g @nsupp/cliAuthenticate
Create a plugin token in the developer panel, then hand the secret over stdin — never as an
argument, because command lines show up in ps output and shell history:
echo "$NSUPP_SECRET" | nsupp auth login --id nsupp_pk_… --website wk_…The profile is written to ~/.nsupp/config.json with mode 0600 inside a 0700 directory.
nsupp config show always masks the secret.
In CI, skip the file entirely — environment variables win over it:
export NSUPP_TOKEN_ID=… NSUPP_TOKEN_SECRET=… NSUPP_WEBSITE_ID=…
nsupp conversations list --jsonUse
nsupp conversations list --status pending --limit 10 --table
nsupp conversation messages cv_123
nsupp conversation note cv_123 --content "Customer is a returning VIP"
nsupp team-chat post --content "Deploy finished ✅"Anything without a typed command is still reachable — the escape hatch covers the whole API:
nsupp api GET /v1/website/$NSUPP_WEBSITE_ID/inboxes
nsupp api POST /v1/website/$NSUPP_WEBSITE_ID/team-chat --data '{"content":"hello"}'nsupp help <command> prints the usage line and the scope the command needs, so a 403 tells you
exactly which permission to request.
Exit codes
| Code | Meaning |
| --- | --- |
| 0 | success |
| 1 | usage error (bad arguments, malformed --data) |
| 2 | missing credentials, or the server refused: 401 / 403 scope_denied / 402 plan_required |
| 3 | server or network error |
What the CLI does not do
It does not enforce anything. Plan tiers, scopes, consent and tenant isolation are decided on the
server, in the same gate the panel and third-party integrations pass through. A workspace on the
mini plan gets the same 402 plan_required here as anywhere else — an out-of-date CLI cannot widen
what your token may do, because it never held that decision in the first place.
Environment
| Variable | Purpose |
| --- | --- |
| NSUPP_TOKEN_ID / NSUPP_TOKEN_SECRET | Credentials (override the config file) |
| NSUPP_WEBSITE_ID | Default website public key |
| NSUPP_BASE_URL | API root, for self-hosted installs |
| NSUPP_TIER | plugin (default) or website |
| NSUPP_CONFIG | Config file path |
Apache-2.0
