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

linkai-cli

v1.0.0

Published

LinkAI platform CLI

Readme

LinkAI CLI brings the full LinkAI platform to the terminal for both agents and people — models, apps, knowledge bases, databases, workflows, plugins, and accounts. It gives AI agents a rich set of platform capabilities as infrastructure, extending what they can do.

Capabilities

The CLI exposes two kinds of capabilities: platform resources (manage and use the resources you've configured on LinkAI) and model capabilities (call models to generate content).

📦 Platform resources

| Resource | Command | Description | |----------|---------|-------------| | Apps | app | List, inspect, create, update, and delete AI apps | | Knowledge | knowledge | Vector-search private knowledge bases; import files and manage bases | | Database | database | Query databases and schemas, run SQL, create builtin databases and tables | | Workflow | workflow | Run workflows orchestrated on LinkAI; create, update, and delete them | | Plugin | plugin | List, inspect, and run platform plugins | | Account | account | Account profile, credits, and recharge |

🧠 Model capabilities

| Capability | Command | Description | |------------|---------|-------------| | Chat | chat | Talk to an AI app or language model, with multi-turn sessions | | Image | image | Text-to-image; returns an image URL | | Video | video | Text-to-video, with built-in polling until the result is ready | | Speech | audio | Text-to-speech (TTS), optionally saved to a file | | Models | model | List available models (LLM / IMAGE / VIDEO) |

Run linkai <command> --help for the full flags of any command.

Installation

Option 1 — npm

Requires Node.js 16 or later. npm installs the command to its global bin directory, which is already on your PATH:

npm i -g linkai-cli

Option 2 — let an agent install it

Send an agent this message; it will install the CLI, fetch the skill, and start using it:

Read https://cdn.link-ai.tech/cli/install.md and follow it to install the CLI and skill, then start using it.

Option 3 — install script (no dependencies)

# macOS / Linux
curl -fsSL https://cdn.link-ai.tech/cli/install.sh | sh
# Windows (PowerShell)
irm https://cdn.link-ai.tech/cli/install.ps1 | iex

The script downloads the pre-built binary, sets up your PATH, and installs the agent skill into common AI tool directories (Claude Code, Cursor, Codex, CowAgent, etc.).

  • Homebrew: brew install MinimalFuture/tap/linkai
  • Go: go install github.com/MinimalFuture/linkai-cli@latest
  • Binary: download from GitHub Releases, extract, and put it on your PATH.
  • Source: git clone, then make build && make install.

| Variable | Description | Default | |----------|-------------|---------| | LINKAI_VERSION | Version to install | latest | | LINKAI_INSTALL_DIR | Binary install directory | Auto (prefers a directory already on PATH) | | LINKAI_SOURCE | Download source: cdn / github | cdn (falls back to GitHub if unreachable) | | LINKAI_NO_SKILL | Set to 1 to skip installing the skill | — |

Getting started

Three steps to your first call:

linkai auth login                     # 1. Log in (authorize in the browser)
linkai app list                       # 2. List apps and grab an app_code
linkai chat "Hello" --app <app_code>   # 3. Chat with the app

Use auth status to check your session and auth logout to sign out.

Using with agents

Once installed, agents learn how to drive the CLI through its bundled skill — no extra setup required. The skill lives in skills/linkai-cli/.

A few notes when calling from an agent:

  • Add --json for structured, easy-to-parse output.
  • Preview write operations with --dry-run; add --force to skip confirmations (e.g. knowledge delete).
  • Run linkai <command> --help for a command's full flags.

Command reference

| Command | Description | |---------|-------------| | auth login / logout / status | Log in / out / show login status | | app list / detail / create / update / delete | List and manage apps | | chat "<message>" --app <code> | Chat with an app; --session for multi-turn | | knowledge list / files / search / create / import / delete | Query, import, and manage knowledge bases | | database list / tables / describe / exec / create / create-table | Query, run SQL, and create builtin databases/tables | | workflow list / run <code> --input "<text>" / create / update / delete | List, run, and manage workflows | | plugin list / detail / exec <code> | List and run plugins | | image gen "<prompt>" | Text-to-image | | video gen "<prompt>" | Text-to-video (waits for completion) | | audio speech "<text>" [--output a.mp3] | Text-to-speech, optionally downloaded | | model list [--type LLM\|IMAGE\|VIDEO] | List available models | | account info | Account profile and credit balance | | account credits / recharge / orders | Credit packages, recharge, and orders |

See linkai <command> --help for each command's full flags.

Permissions

Permissions are requested at login via --scope, in resource:action form. Read and content-generation scopes are granted by default; write scopes must be requested explicitly.

| Scope | Description | Default | |-------|-------------|:---:| | app:read | List and inspect apps | ✅ | | app:create | Create apps | ✅ | | user:read | Read user info | ✅ | | chat:send | Chat with apps | ✅ | | knowledge:read | Query knowledge bases | ✅ | | knowledge:create | Create knowledge bases / add files | ✅ | | db:read | Query databases / run SELECT | ✅ | | image:gen / video:gen / audio:gen | Generate images / video / speech | ✅ | | plugin:read / plugin:run | List / run plugins | ✅ | | workflow:read / workflow:run | List / run workflows | ✅ | | workflow:create | Create workflows | ✅ | | score:read / score:buy | View / purchase credits | ✅ | | app:update / app:delete | Update / delete apps | ❌ | | knowledge:update / knowledge:delete | Update / delete knowledge bases | ❌ | | workflow:update / workflow:delete | Update / delete workflows | ❌ | | db:write | Database writes (INSERT/UPDATE/DELETE) | ❌ |

Request extra scopes by logging in again, for example:

linkai auth login --scope "db:read db:write knowledge:update knowledge:delete"

More

  • Tokens: opaque tokens stored server-side and revocable; access lasts 2h, refresh lasts 7d, refreshed automatically before expiry; logout revokes them server-side.
  • Device binding: every request carries X-Device-ID, and the server binds tokens to the device.
  • Local storage: tokens go into the macOS Keychain (service linkai-cli), with a 0600 file fallback on other platforms; config lives in ~/.linkai/.
  • Input / output hardening: dangerous Unicode is rejected, DDL is blocked in the database commands, and ANSI is stripped from table output.
  • Resilience: 5xx responses are retried with exponential backoff; exit codes are structured (0 ok / 1 general / 2 validation / 3 auth / 4 network).
source <(linkai completion bash)                # Bash
source <(linkai completion zsh)                 # Zsh
linkai completion fish | source                 # Fish
make build   # build (with version injection)
make test    # run tests
make lint    # golangci-lint

To add a command, follow the pattern in cmd/database/, register it in cmd/root.go, and declare its scope via permission.RequiredKey.

License

MIT