CLI Quick Start
Six steps from an empty terminal to a verified draft. Nothing here publishes — step 5 previews the request before sending it, and step 6 confirms what landed.
Before you start
Section titled “Before you start”- Node.js 18.17 or higher.
- A Nuelink API key from Settings → API.
- A Nuelink account with at least one brand and one collection.
Install
Section titled “Install”npm install -g @nuelink/nuelink-clinuelink-cli --versionOr run it without installing:
npx @nuelink/nuelink-cli --help1. Save your API key
Section titled “1. Save your API key”Read the key in without echoing it, so it never appears on screen or as a literal in your shell history:
read -rs NUELINK_API_KEY && export NUELINK_API_KEYThen hand it to the CLI over stdin, which also keeps it out of the process list:
printf '%s' "$NUELINK_API_KEY" | nuelink-cli auth:login --stdinIn CI, inject NUELINK_API_KEY from your secret manager instead of running either command. Generate a key from Settings → API.
2. Verify where auth is coming from, and that it works
Section titled “2. Verify where auth is coming from, and that it works”nuelink-cli auth:statusnuelink-cli auth:validateauth:status shows which key the CLI will use without calling the API. auth:validate checks that key against the API.
3. Make your first request
Section titled “3. Make your first request”nuelink-cli me4. Find a brand, then a collection
Section titled “4. Find a brand, then a collection”nuelink-cli brands --per-page 5 --page 1nuelink-cli collections --brand-id 13493 --per-page 5 --page 15. Create a draft post
Section titled “5. Create a draft post”nuelink-cli posts:create \ --brand-id 13493 \ --collection-id 33273 \ --caption "Hello from the Nuelink CLI 👋" \ --publish-mode DRAFT \ --dry-runRead the printed request. If it’s right, run the same command without --dry-run.
6. Confirm the draft landed
Section titled “6. Confirm the draft landed”Creating a post tells you an ID exists, not what kind. Read it back and match the ID the create returned. Posts come back newest first, but another client can create one between your two commands, so don’t just take the first row:
nuelink-cli posts --brand-id 13493 --collection-id 33273 --per-page 100 --page 1To check it without reading a table, pipe the JSON through jq with the ID you got back:
nuelink-cli --json posts --brand-id 13493 --collection-id 33273 --per-page 100 \ | jq '.data[] | select(.id == 4733837) | {id, status, postingType, postDate}'You want status and postingType of DRAFT and a postDate of null. If the ID isn’t on this page, check pagination.lastPage and walk the remaining pages before assuming the create failed.
Next steps
Section titled “Next steps”- CLI Overview - authentication, global options, output modes, environment variables, and the safety model.
- Commands - every command and flag.
- Errors - what the CLI is reporting when a request fails.