The Tightknit CLI is currently in alpha. Commands and options may change between releases.
Install with the
@alpha tag: npm i -g @tightknitai/tightknit@alphaInstallation
- npm (global)
- npx (no install)
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
~/.config/tightknit/config.json.Alternatively, set the environment variable:3
Verify
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
Search
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
Exit Codes
The CLI uses differentiated exit codes for scripting and CI/CD integration:Example: check exit code in a script
CI/CD
Set theTIGHTKNIT_API_KEY environment variable in your pipeline. The CLI skips interactive features (like update notifications) when the CI environment variable is set.

