Skip to main content
The Tightknit CLI is currently in alpha. Commands and options may change between releases. Install with the @alpha tag: npm i -g @tightknitai/tightknit@alpha
The Tightknit CLI gives you command-line access to the Tightknit Admin API. To let AI agents like Claude help you manage your community, connect them to the hosted MCP server instead.

Installation

Verify the installation:

Authentication

The CLI resolves your API key in the following order:
1

Create an API key

Go to Integrations > API Keys in the Studio. Click Create API key, give it a descriptive name, and select the permissions your commands need.Copy the key (starts with sk_) — it is only shown once.
2

Configure the CLI

The key is stored at ~/.config/tightknit/config.json.Alternatively, set the environment variable:
3

Verify

If your key is valid, you will see a list of your community’s feeds.

Commands

Every command supports --json for machine-readable output and --help for usage details.

Events

Example: list upcoming events as JSON
Example: create an event

Feeds & Posts

Example: list newest posts in a feed

Members

Example: add a member

Messages

Example: send a message

Groups

Awards

Example: assign an award
Example: search for posts
Search is currently in Beta.

Config

Valid config keys: api-key, default-output (json or table), environment (production or staging).

Global Options

Output Behavior

By default, the CLI formats output as a human-readable table. Use --json on any command for structured JSON, which is useful for scripting and piping:
Piping JSON output
You can change the default output format globally:

Exit Codes

The CLI uses differentiated exit codes for scripting and CI/CD integration:
Example: check exit code in a script

CI/CD

Set the TIGHTKNIT_API_KEY environment variable in your pipeline. The CLI skips interactive features (like update notifications) when the CI environment variable is set.

Shell Completions

Generate tab-completion scripts for your shell:

API Coverage

All endpoints from the Tightknit Admin API are supported: