Overview
The Packmind CLI provides the following commands:init- Initialize Packmind in your project (configure agents + install skills)config agents setup- Configure which AI coding agents to generate artifacts for (interactive)config agents list- List configured agents acrosspackmind.jsonfilesconfig agents add- Add coding agents topackmind.jsonfilesconfig agents rm- Remove coding agents frompackmind.jsonfileslogin- Authenticate with your Packmind instancelogout- Clear stored credentialswhoami- Show current authentication statussetup-mcp- Configure MCP for AI coding agentsinstall- Download packages locallyuninstall- Remove packages from your projectlint- Run detection programs (Enterprise only)playbook diff- Show differences between local files and Packmind artefactsplaybook add- Stage a change between local files and Packmind artefactsplaybook submit- Submit local changes to Packmindskills init- Install default Packmind skills locallyskills list- List all skills in your organizationstandards list- List all standards in your organizationcommands list- List all commands in your organizationpackages create- Create a new packagepackages add- Add standards, commands, or skills to a packagepackages list- List all packages in your organizationupdate- Update the CLI to the latest version
Installation
One-click install (Recommended)
The easiest way to install and configure the Packmind CLI is using the one-click install available in the Packmind web interface. Where to find it:- During your first onboarding after creating an account
- Anytime in your Account Settings page
- Downloads and installs the Packmind CLI binary for your platform
- Authenticates you automatically with your Packmind account
- Configures the Packmind MCP servers for AI coding agents detected on your machine (Claude Code, Cursor, VS Code/GitHub Copilot)
- Sets up your PATH environment variable
Alternative: npm Package
Node.js 22 or higher required.
packmind-cli command will be available globally.
npx (no installation required):
Alternative: Homebrew
Available on macOS and Linux.packmind-cli command will be available globally.
Alternative: Standalone Executables
Download the appropriate pre-built executable for your platform from the GitHub Releases page. Available platforms:- Linux x64:
packmind-cli-linux-x64-{version} - Linux arm64:
packmind-cli-linux-arm64-{version} - macOS arm64:
packmind-cli-macos-arm64-{version}(signed and notarized) - Windows x64:
packmind-cli-windows-x64-{version}.exe
Authentication
The CLI requires authentication to communicate with your Packmind instance.Login Command (Recommended)
The easiest way to authenticate is using thelogin command:
- Open your browser to the Packmind login page
- After you authenticate, automatically receive credentials
- Store credentials securely in
~/.packmind/credentials.json
Logout Command
To clear stored credentials:PACKMIND_API_KEY_V3 set as an environment variable, you’ll need to unset it separately:
Whoami Command
Check your current authentication status:- Your API key (masked)
- Connected host
- Organization name
- User name
- Credential expiration status
API Key Authentication (PACKMIND_API_KEY_V3)
You can authenticate using thePACKMIND_API_KEY_V3 environment variable instead of the interactive login flow. This is the recommended approach for:
- CI/CD pipelines — Automated environments where interactive login isn’t possible
- Docker containers — Pass the API key as an environment variable
- Scripted workflows — When you need non-interactive authentication
Getting Your API Key
- Log in to your Packmind instance (Cloud or self-hosted)
- Navigate to Settings (click your profile icon in the top right)
- Scroll to the CLI Authentication section
- Go to the Environment Variable tab
- Click Generate New Key to create an API key (valid for 90 days)
- Copy the generated key
Setting the Environment Variable
Set thePACKMIND_API_KEY_V3 environment variable with your API key:
~/.bashrc, ~/.zshrc, etc.):
CI/CD Example (GitHub Actions)
Init Command
Initialize Packmind in your project. This is the recommended first command to run when setting up Packmind in a new project.What Init Does
The init command performs two main actions:- Configures AI agents - Interactively select which AI coding agents to generate artifacts for
- Installs default skills - Including skill creator, standard creator, and onboarding skills
Basic Usage
- Present an interactive prompt to select which AI agents you use (Claude Code, Cursor, GitHub Copilot, etc.)
- Save your agent configuration to
packmind.json - Install Packmind’s default skills to the appropriate locations for your selected agents
- Display a success message with next steps
Config Command
Configure Packmind settings.Config Agents
Manage AI coding agents configured in yourpackmind.json files. The config agents command provides subcommands for interactive setup, listing, adding, and removing agents.
Config Agents Setup
Configure which AI coding agents to generate artifacts for via an interactive prompt:- Claude Code - Artifacts in
.claude/directory - Cursor - Artifacts in
.cursor/rules/directory - GitHub Copilot - Artifacts in
.github/copilot-instructions.md - Continue.dev - Artifacts in
.continue/directory - Junie - Artifacts in
.junie/directory - AGENTS.md - Single
AGENTS.mdfile at project root - GitLab Duo - Artifacts in
.gitlab/duo/directory - OpenCode - Artifacts in
.opencode/directory - Codex - Artifacts in
.agents/directory
packmind.json.
Config Agents List
Display all configured coding agents acrosspackmind.json files in a matrix view:
agents property in packmind.json) or inherited from organization settings.
Use --path to scope the listing to a specific directory:
Config Agents Add
Add one or more coding agents to allpackmind.json files:
--path to target a specific directory:
Config Agents Remove
Remove one or more coding agents from allpackmind.json files:
--path to target a specific directory:
agents property is deleted entirely and the file reverts to organization-level defaults.
Supported Agents
| Identifier | Agent |
|---|---|
claude | Claude Code |
cursor | Cursor |
copilot | GitHub Copilot |
continue | Continue.dev |
junie | Junie |
agents_md | AGENTS.md |
gitlab_duo | GitLab Duo |
opencode | OpenCode |
codex | Codex |
Setup MCP Command
Configure MCP (Model Context Protocol) for your AI coding agents. This command automatically sets up the Packmind MCP server in your agents’ configuration.Supported Agents
- Claude Code (
claude) - Cursor (
cursor) - VS Code / GitHub Copilot (
copilot)
Interactive Mode
Run without arguments to use interactive mode:- Detect which AI agents are installed on your system
- Present a selection prompt with detected agents pre-selected
- Configure MCP for all selected agents
Direct Mode
Specify target agents directly using the--target (or -t) flag:
Install Command
Download commands, standards, and skills from packages to your local machine.List Available Packages
View Package Details
View Workspace Status
See an overview of allpackmind.json files and their installed packages across your workspace:
- Understanding what packages are installed across a monorepo
- Identifying empty or misconfigured
packmind.jsonfiles (shown as<no packages>) - Getting a quick summary of unique packages in your workspace
Install Packages
Default skills included — When you install packages, Packmind’s default
skills (including the
packmind-update-playbook skill) are automatically
installed alongside your package contents.Lock File (packmind-lock.json)
When you install or uninstall packages, the CLI generates a packmind-lock.json file alongside your packmind.json. This file records the exact versions of all installed artifacts.
Recursive Install (Monorepos)
By default,packmind-cli install (with no package slugs) finds all packmind.json files in your git repository and installs their configured packages. After installation, a summary shows how many distributions were notified to Packmind.
--path option:
Lint Command
Enterprise Feature — The lint command is only available in the
Enterprise edition.
How Lint Works
The CLI supports two linting modes: Local Mode (recommended): When you havepackmind.json files in your project, the CLI uses them to determine which standards to check against. The CLI automatically searches for all packmind.json files in your project tree:
- Ancestor configs: Searches parent directories up to the Git repository root
- Descendant configs: Searches subdirectories from your current location
packmind.json files are included in the analysis scope. This allows different parts of your codebase to have different standards while inheriting common standards from parent directories.
To set up local linting, install packages using the install command. See Distribute Standards and Commands for details.
Deployment Mode:
If no packmind.json files are found, the CLI falls back to using standards that have been deployed to your Git repository through the web interface. See Deployment to learn about this approach.
Basic Usage
- Searches for
packmind.jsonfiles in your project tree - Loads detection programs from the standards defined in your packages
- Scans all files in the current directory (excluding
node_modules,dist, and other common build folders) - Runs all active detection programs
- Reports any violations found
Specify a Path
Lint a specific directory:- The CLI verifies the file exists and exits with an error if not
.packmindignorepatterns are checked — if the file matches, it is skipped and the command exits with code 0- If the file is not in scope for the requested rule or standard (i.e. its extension doesn’t match the rule’s configured languages), an informational message is logged and no violations are reported
Limiting Scope with --changed-files and --changed-lines
When working on large codebases, you can focus the lint check on only the files or lines you’ve modified using the --changed-files and --changed-lines flags.
Git Repository Required — The
--changed-files and --changed-lines
flags require your project to be in a Git repository.Deprecated Option — The
--diff option is deprecated. Use
--changed-files (equivalent to --diff=files) or --changed-lines
(equivalent to --diff=lines) instead.Output Formats
Choose between human-readable and IDE-friendly output:- File paths with violations
- Line and character positions
- Rule identifiers
- Summary of total violations found
Filtering by Severity
Use the--level flag to filter which violations are displayed based on their severity:
| Value | What is displayed |
|---|---|
error | Only error-level violations |
warning | All violations (warnings and errors) |
--level flag, all violations are displayed regardless of severity.
Skills Command
Manage skills in your Packmind organization. Skills are reusable knowledge packages that AI coding assistants can discover and use.Initialize Default Skills
- packmind-onboard — A skill for initializing Packmind in projects
- packmind-update-playbook - A skill to manage your playbook: create skills, commands and standards or update the existing ones.
List Skills
- Slug — The skill identifier
- Name — The display name
- URL — Direct link to view the skill in the web app
- Description — What the skill does
Add a Skill
<path>- Path to the skill directory containing skill files
Use
--no-review to trigger a direct
update. Omit
--no-review to use the change
proposals system and get validation
of your changes.- If changes are detected, a new version is created
- If the content is identical, no new version is created
Standards Command
Create and manage coding standards from the command line.List Standards
- Slug — The standard identifier
- Name — The display name
- URL — Direct link to view the standard in the web app
- Description — What the standard covers
Create a Standard
See create a standard from the CLI to discover how you can create standards using the CLI.Commands Command
Create and manage reusable, multi-step workflow commands from the command line.List Commands
- Slug — The command identifier
- Name — The display name
- URL — Direct link to view the command in the web app
Create a Command
The command markdown should be located in a directory where commands are
available.Such directories include:
.packmind/commands.cursor/commands.github/prompts
Packages Command
Create and manage packages from the command line.List Packages
- Slug — The package identifier
- Name — The display name
Create a Package
<name>- Name of the package to create
| Flag | Short | Description |
|---|---|---|
--description | -d | Description of the package |
packageSlugs parameter when creating items via MCP.
Package Identification
When you create a package, Packmind automatically generates a slug from the package name:- Name (provided by you):
"Backend Standards" - Slug (auto-generated):
"backend-standards"
- Package installation:
packmind-cli install backend-standards - Package identification and distribution
backend-standards-1) to ensure uniqueness.
Add Items to a Package
| Flag | Description |
|---|---|
--to | Target package slug (required) |
--standard | Slug of the standard to add to the package |
--command | Slug of the command to add to the package |
--skill | Slug of the skill to add to the package |
Playbook Command
Manage local artifact changes and propose them to your team using a git-like staging workflow. Theplaybook command groups six subcommands: diff, status, add, rm, unstage, and submit.
View Differences
- Rule (update) — a rule that was modified (Packmind detects this automatically using similarity matching)
- Rule (add) — a new rule added locally
- Rule (delete) — a rule removed locally
| Flag | Short | Description |
|---|---|---|
--include-submitted | Include already-submitted changes in the output | |
--path <path> | -p | Limit analysis to a specific path |
Check Status
Stage Changes
Stage Removal
remove.
Unstage Changes
Submit Proposals
| Flag | Short | Description |
|---|---|---|
--message <text> | -m | Message describing the intent behind the changes (max 1024 chars) |
-m, Packmind opens your default editor so you can write the message interactively.
How Rule Updates Are Detected
When you modify a rule in a standard file, Packmind automatically determines whether the change is a rule update (the same rule was edited) or a separate deletion and addition (two unrelated rules). This keeps your change proposals clean and meaningful, showing reviewers exactly what was changed rather than an unrelated delete + add pair.Update Command
Update the Packmind CLI to the latest version.- Standalone executable — Downloads the latest binary from GitHub and replaces the current executable automatically.
- npm global install — Runs
npm install -g @packmind/cli@latestto update through npm.
Check for Updates Without Installing
Use the--check flag to see if a newer version is available without performing the update:
1 if a newer version is available, and code 0 if already up to date.
Example:
The
update command is available for standalone executables and npm global
installs only. If you manage the CLI through a local package.json, update it
with npm update @packmind/cli instead.Related Documentation
- Create your first command: Learn how to create commands with AI assistance
- Packages Management: Learn about organizing commands, standards, and skills into packages
- Linter: Automated Detection: Learn about how detection programs work
- Standards Management: Create rules and add code examples
- Skills Management: Create and manage reusable skills