npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@nuelink/nuelink-cli

v1.2.0

Published

The official Nuelink CLI for automating social media workflows from your terminal. Schedule posts, upload media, manage brands, and integrate Nuelink into scripts, CI/CD pipelines, and AI agents.

Readme

Nuelink CLI

Official command-line interface for the Nuelink Public API.

Published by the Nuelink organization as the scoped npm package @nuelink/nuelink-cli.

Use this CLI to manage brands, collections, automations, channels, media, and posts from local scripts, CI/CD pipelines, and terminal workflows.

Features

  • Global auth with local token persistence
  • Bearer auth support via flag, env var, or saved config
  • JSON output for easy piping into automation
  • Built-in timeout support for safer production usage
  • Command coverage for key Nuelink Public API resources

Requirements

  • Node.js 18.17 or higher

Installation

Global install from npm

npm install -g @nuelink/nuelink-cli

Run without global install

npx @nuelink/nuelink-cli --help

Quick Start

1. Save your API key

nuelink-cli --auth YOUR_API_KEY

2. Verify auth source

nuelink-cli auth:status

3. Make your first request

nuelink-cli me

Authentication Resolution Order

The CLI resolves auth in this order:

  1. CLI flag: --auth <api_key>
  2. Environment variable: NUELINK_API_KEY
  3. Saved config file in your user home

If a key is passed with --auth, it is persisted for future commands.

Clear saved auth

nuelink-cli auth:clear

Config Storage

The token is stored in:

  • Windows: %USERPROFILE%/.nuelink-cli/config.json
  • macOS/Linux: $HOME/.nuelink-cli/config.json

The file stores:

{
  "apiKey": "..."
}

Global Options

  • -a, --auth <apiKey>: Set and use API key
  • -h, --help: Show help
  • -V, --version: Show version

Commands

Profile

nuelink-cli me

Auth

nuelink-cli auth:status
nuelink-cli auth:clear

Brands

nuelink-cli brands --per-page 5 --page 1

Collections

nuelink-cli collections --brand-id 13493 --per-page 5 --page 1

Create collection:

nuelink-cli collections:create \
  --brand-id 13493 \
  --title "API Brand" \
  --description "Collection from CLI" \
  --max-republish 5 \
  --channels "300294,60112" \
  --queues "Mon 10:10,Mon 12:12"

Automations

nuelink-cli automations --brand-id 13493

Create automation:

nuelink-cli automations:create \
  --brand-id 13493 \
  --collection-id 720 \
  --feed-url "https://www.nasa.gov/rss/dyn/breaking_news.rss" \
  --import-as-type IMAGE \
  --sub-type RSS \
  --title "NASA Breaking News" \
  --type FEED \
  --dynamic-title "{{title}}" \
  --dynamic-body "{title} {link}"

Channels

nuelink-cli channels --brand-id 13493 --per-page 5 --page 1

Media

List media:

nuelink-cli media --brand-id 13493

Upload media:

nuelink-cli media:upload --brand-id 13493 --file ./assets/image.jpg

Posts

List posts:

nuelink-cli posts --brand-id 13493 --collection-id 33273

Create post from JSON payload file:

nuelink-cli posts:add-json --brand-id 13493 --collection-id 33273 --payload ./post.json

Example post.json:

{
  "title": "CLI Post Title",
  "caption": "Post body from CLI",
  "publishMode": "DRAFT"
}

Create post with CLI options:

nuelink-cli posts:create \
  --brand-id 13493 \
  --collection-id 33273 \
  --title "title here" \
  --caption "body here as well" \
  --alt "is this fine" \
  --link "https://nuelink.com" \
  --publish-mode DRAFT \
  --post-as-story true \
  --comment "this is a comment" \
  --comment-delay 30 \
  --media-ids "media-id-1" \
  --media-urls "https://media.nuelink.com/media/abc" \
  --poll-question "what is the new role?" \
  --poll-options "iron,dudee" \
  --poll-period 3d \
  --poll-correct-option-index 1 \
  --poll-explanation "iwa ash idir lwaaa7ad" \
  --instagram-collab "karim.chamlal" \
  --instagram-location-id "abc123" \
  --instagram-location-name "bentaib" \
  --instagram-trial-reel MANUAL \
  --instagram-share-to-feed true \
  --facebook-collab "karim.chamlal" \
  --facebook-location-id "abc123" \
  --facebook-location-name "bentaib" \
  --tiktok-send-to-inbox true \
  --youtube-tags "tag1,tag2,tag3" \
  --youtube-playlists '[{"channelId":"1","playlistIds":["1","2"]}]'

Output and Exit Codes

  • Successful requests print OK <METHOD> <PATH> plus JSON response body
  • Failed requests print HTTP status and response payload when available
  • Exit code is non-zero on failure

Environment Variables

  • NUELINK_API_KEY: API key fallback if not passed via CLI flag
  • NUELINK_TIMEOUT_MS: request timeout in milliseconds (default: 30000)

Example:

NUELINK_TIMEOUT_MS=60000 nuelink-cli brands

Production Usage Patterns

Shell script usage

#!/usr/bin/env bash
set -euo pipefail

export NUELINK_API_KEY="${NUELINK_API_KEY:?NUELINK_API_KEY is required}"

nuelink-cli brands --per-page 10 --page 1
nuelink-cli collections --brand-id 13493 --per-page 10 --page 1

CI usage

Store NUELINK_API_KEY as a repository or org secret and run commands in non-interactive jobs.

Development

Install dependencies

npm ci

Run tests

npm test

Package validation

npm run check:pack

Release Checklist

  1. Update version in package.json
  2. Run npm test
  3. Run npm run check:pack
  4. Publish with npm publish --access public

Troubleshooting

Invalid Token

  • Run nuelink-cli auth:status to confirm active auth source
  • Re-save your token with nuelink-cli --auth YOUR_API_KEY
  • Ensure no stale NUELINK_API_KEY is overriding your saved config

Request timeout

Increase timeout for slower operations:

NUELINK_TIMEOUT_MS=120000 nuelink-cli media --brand-id 13493

Command help

nuelink-cli --help
nuelink-cli help collections

Security Notes

  • Treat API keys as secrets
  • Do not commit tokens to source control
  • Prefer environment-based secrets in CI/CD

License

MIT

Additional Docs