Skip to content

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.

  • Node.js 18.17 or higher.
  • A Nuelink API key from Settings → API.
  • A Nuelink account with at least one brand and one collection.
Terminal window
npm install -g @nuelink/nuelink-cli
nuelink-cli --version

Or run it without installing:

Terminal window
npx @nuelink/nuelink-cli --help

Read the key in without echoing it, so it never appears on screen or as a literal in your shell history:

Terminal window
read -rs NUELINK_API_KEY && export NUELINK_API_KEY

Then hand it to the CLI over stdin, which also keeps it out of the process list:

Terminal window
printf '%s' "$NUELINK_API_KEY" | nuelink-cli auth:login --stdin

In 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”
Terminal window
nuelink-cli auth:status
nuelink-cli auth:validate

auth:status shows which key the CLI will use without calling the API. auth:validate checks that key against the API.

Terminal window
nuelink-cli me
Terminal window
nuelink-cli brands --per-page 5 --page 1
nuelink-cli collections --brand-id 13493 --per-page 5 --page 1
Terminal window
nuelink-cli posts:create \
--brand-id 13493 \
--collection-id 33273 \
--caption "Hello from the Nuelink CLI 👋" \
--publish-mode DRAFT \
--dry-run

Read the printed request. If it’s right, run the same command without --dry-run.

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:

Terminal window
nuelink-cli posts --brand-id 13493 --collection-id 33273 --per-page 100 --page 1

To check it without reading a table, pipe the JSON through jq with the ID you got back:

Terminal window
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.

  • 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.