Skip to main content

Overview

The Packmind CLI provides the following commands:
  • init - Initialize Packmind in your project (configure agents + install skills)
  • track - Set the repository and branch Packmind tracks for your project
  • config agents setup - Configure which AI coding agents to generate artifacts for (interactive)
  • config agents list - List configured agents across packmind.json files
  • config agents add - Add coding agents to packmind.json files
  • config agents rm - Remove coding agents from packmind.json files
  • login - Authenticate with your Packmind instance
  • logout - Clear stored credentials
  • whoami - Show current authentication status
  • install - Download packages locally
  • uninstall - Remove packages from your project
  • lint - Run detection programs (Enterprise only)
  • playbook diff - Show differences between local files and Packmind artefacts
  • playbook add - Stage a change between local files and Packmind artefacts
  • playbook submit - Submit local changes to Packmind
  • skills init - Install default Packmind skills locally
  • skills list - List all skills in your organization
  • standards list - List all standards in your organization
  • commands list - List all commands in your organization
  • packages create - Create a new package
  • packages add - Add standards, commands, or skills to a package
  • packages list - List all packages in your organization
  • plugins render - Render a Packmind package as a Claude plugin
  • plugins delete - Delete a rendered Claude plugin from this workspace
  • update - Update the CLI to the latest version

Installation

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
What it does:
  1. Downloads and installs the Packmind CLI binary for your platform
  2. Authenticates you automatically with your Packmind account
  3. Sets up your PATH environment variable
Simply copy the provided command and paste it into your terminal. The script handles everything automatically.
Why this is recommended — The one-click install eliminates manual steps by combining installation and authentication in a single command.

Alternative: npm Package

Node.js 22 or higher required.
Global Installation:
After installation, the packmind-cli command will be available globally. npx (no installation required):
This runs the CLI directly without installing it, always using the latest version.

Alternative: Homebrew

Available on macOS and Linux.
After installation, the 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
For Linux/macOS, make the executable runnable:
Optional: Move to a directory in your PATH for easy access:
Choosing an Installation Method — Use one-click install for the simplest experience with automatic authentication. Use npm global if you want packmind-cli always available system-wide. Use npx for project-specific usage or testing without installation. Use Homebrew if you prefer managing packages through your system package manager (macOS/Linux). Use standalone executables if you don’t have Node.js installed or need a specific binary for your environment.

Authentication

The CLI requires authentication to communicate with your Packmind instance. The easiest way to authenticate is using the login command:
This will:
  1. Open your browser to the Packmind login page
  2. After you authenticate, automatically receive credentials
  3. Store credentials securely in ~/.packmind/credentials.json
For self-hosted instances, specify your host:
Manual code entry (if browser flow doesn’t work): You can also enter a login code manually from the web interface:

Logout Command

To clear stored credentials:
This removes the credentials file. If you also have PACKMIND_API_KEY set as an environment variable, you’ll need to unset it separately:

Whoami Command

Check your current authentication status:
This displays:
  • Your API key (masked)
  • Connected host
  • Organization name
  • User name
  • Credential expiration status

API Key Authentication (PACKMIND_API_KEY)

You can authenticate using the PACKMIND_API_KEY 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

  1. Log in to your Packmind instance (Cloud or self-hosted)
  2. Navigate to Settings (click your profile icon in the top right)
  3. Scroll to the CLI Authentication section
  4. Go to the Environment Variable tab
  5. Click Generate New Key to create an API key (valid for 90 days)
  6. Copy the generated key

Setting the Environment Variable

Set the PACKMIND_API_KEY environment variable with your API key:
To make this permanent, add it to your shell configuration file (~/.bashrc, ~/.zshrc, etc.):

CI/CD Example (GitHub Actions)

Credential Priority — When both a credentials file and the PACKMIND_API_KEY environment variable exist, the environment variable takes precedence.

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 these main actions:
  1. Configures AI agents - Interactively select which AI coding agents to generate artifacts for
  2. Installs default skills - Including skill creator, standard creator, and onboarding skills
  3. Offers to track this repository - Prompts you to set the current repository and branch as the one Packmind tracks (you can confirm or skip)

Basic Usage

This will:
  1. Present an interactive prompt to select which AI agents you use (Claude Code, Cursor, GitHub Copilot, etc.)
  2. Save your agent configuration to packmind.json
  3. Install Packmind’s default skills to the appropriate locations for your selected agents
  4. Ask whether to track the current repository and branch (you can confirm or skip)
  5. Display a success message with next steps
Example output:
First-time setup — Run packmind-cli init after installing the CLI and logging in. It’s the quickest way to get Packmind configured for your project. After initialization, use the /packmind-onboard skill in your AI agent to scan your project and generate project-specific standards and commands.

Track Command

Set which repository and branch Packmind tracks for your project. The tracked branch is the anchor Packmind uses to attribute governance and adoption activity, so declaring it tells Packmind where to follow your team’s work.
Organization admins only — Only organization admins can set or move the tracked branch. If you are not an admin, the command reports that you cannot change the tracked branch.

Track the Current Branch

Run the command from inside your project to track the current repository and branch:
Packmind derives the repository and branch from your local git remote and current branch, then asks you to confirm before setting it:
If the branch you are on is already the tracked branch, the command reports that it is already tracked and makes no change. If a different branch is already tracked, the command stops and tells you to use --update to move it:

Move the Tracked Branch

Use the --update flag to move tracking to your current branch when a different branch is already tracked. Packmind asks you to confirm the change before applying it:
If you cancel the prompt, the tracked branch is left unchanged. If nothing is tracked yet, --update has nothing to move and points you to the commands that start tracking:
During onboardingpackmind-cli init also offers to track the current repository and branch, so you can set the anchor as part of your first-time setup. Use packmind-cli track later to set or move it.

Troubleshooting

  • Problem: Repository tracking is not available for your account.
  • Solution: The feature is not enabled for your organization yet. Contact your Packmind administrator.
  • Problem: The command reports you are not logged in.
  • Solution: Run packmind-cli login first, then retry.
  • Problem: The command cannot determine the repository or branch.
  • Solution: Run track from inside a git repository that has a configured remote and a checked-out branch.

Config Command

Configure Packmind settings.

Config Agents

Manage AI coding agents configured in your packmind.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:
This presents an interactive prompt where you can select from supported AI coding agents:
  • 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.md file at project root
  • GitLab Duo - Artifacts in .gitlab/duo/ directory
  • OpenCode - Artifacts in .opencode/ directory
  • Codex - Artifacts in .agents/ directory
The command auto-detects existing agent configurations in your project and pre-selects them. Your selection is saved to packmind.json.
Auto-detection — If you already have agent configuration files (like .cursor/ or .claude/), they will be automatically pre-selected when you run this command.

Config Agents List

Display all configured coding agents across packmind.json files in a matrix view:
The output shows a matrix with file paths as rows and agent names as columns, using checkmarks (✓) and dashes (-) to indicate which agents are configured in each file. Each file also shows its source — whether agents are configured locally (via the 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 all packmind.json files:
Use --path to target a specific directory:
If the targeted files currently inherit agent configuration from organization settings, a confirmation prompt warns that adding local agents will override the organization-level defaults.

Config Agents Remove

Remove one or more coding agents from all packmind.json files:
Use --path to target a specific directory:
When all agents are removed from a file, the agents property is deleted entirely and the file reverts to organization-level defaults.

Supported Agents

After adding or removing agents, run packmind-cli install to deploy or clean up the corresponding agent artifact files in your repository.

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 all packmind.json files and their installed packages across your workspace:
Example output:
This is useful for:
  • Understanding what packages are installed across a monorepo
  • Identifying empty or misconfigured packmind.json files (shown as <no packages>)
  • Getting a quick summary of unique packages in your workspace

Install Packages

Example:
This downloads all commands, standards, and skills from the specified packages and creates the appropriate files for your AI coding assistant.
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.
To scope the recursive install to a specific directory, use the --path option:
AI Agent Rendering — The files created by the install command depend on which AI agents are enabled in your organization settings. The CLI respects your organization’s configured agents and creates instruction files accordingly (e.g., AGENTS.md, .cursor/rules/, .github/copilot-instructions.md). The .packmind/ directory is always created regardless of your configuration. To configure which agents are enabled, see Manage AI Agent Rendering.

Install Globally for Claude Code (~/.claude)

When you run packmind-cli install from inside your ~/.claude directory, the CLI switches into home-install mode — a streamlined flow optimized for sharing Packmind artifacts across every project you open in Claude Code, rather than tying them to a single repository.
Why install here:
  • Global availability across projects — Skills, rules, and commands land directly under ~/.claude/skills/, ~/.claude/rules/, and ~/.claude/commands/, so Claude Code picks them up in any repository you open, not just one you have initialized with Packmind.
  • Single-agent rendering — Only Claude Code artifacts are generated. Any agents entries in packmind.json and your organization’s render modes are ignored, since ~/.claude is by definition Claude-specific.
  • Zero-prompt setup — If no packmind.json exists in ~/.claude, the CLI auto-creates one with {"agents": ["claude"]} and skips the interactive agent prompt entirely.
  • Clean file layout — The .claude/ path prefix is stripped from rendered files, so artifacts do not nest under a redundant ~/.claude/.claude/ subfolder.
  • No .packmind/ mirror — The server-side .packmind/ directory (whose internal links assume a repository layout) is skipped, keeping your home directory uncluttered.
  • No distribution notifications — Even if ~/.claude happens to live inside a git repository, the CLI does not notify Packmind that a distribution occurred — these artifacts are personal to your machine, not a team deployment.
When to use this mode — Reach for ~/.claude installs when you want a package available to Claude Code everywhere: personal coding preferences, cross-project organizational defaults, or experimental skills you want to try without modifying any repository. Per-repo packmind-cli install remains the right choice for project-specific standards that should be shared with teammates and committed to source control.

Lint Command

Enterprise Feature — The lint command is only available in the Enterprise edition.
Run detection programs against your codebase from the command line. This is useful for testing draft detection programs, verifying active programs, and integrating linting into your development workflow or CI/CD pipelines.

How Lint Works

The CLI supports two linting modes: Local Mode (recommended): When you have packmind.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
All standards from packages defined in these 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.
Priority — When both local packmind.json files and deployments exist, the local configuration takes priority.

Basic Usage

This command:
  • Searches for packmind.json files 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:
Lint a single file:
When a single file is passed:
  • The CLI verifies the file exists and exits with an error if not
  • .packmindignore patterns 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.
Check modified lines only:
This analyzes only the specific lines you’ve changed, making it ideal for pre-commit hooks or reviewing your work before pushing. Check modified files only:
This analyzes all content in files you’ve modified, useful when you want full context but don’t want to scan the entire codebase. Example workflow:

Output Formats

Choose between human-readable and IDE-friendly output:
Human-readable format (default) shows:
  • File paths with violations
  • Line and character positions
  • Rule identifiers
  • Summary of total violations found
IDE format provides structured output that can be parsed by editors and CI/CD tools.

Filtering by Severity

Use the --level flag to filter which violations are displayed based on their severity:
Without the --level flag, all violations are displayed regardless of severity.
CI/CD usage — Use --level error in your CI pipeline to focus on blocking violations only, while still running --level warning (or no flag) during local development to see all feedback. See Rule Severity for details on how severity affects exit codes.

Skills Command

Manage skills in your Packmind organization. Skills are reusable knowledge packages that AI coding assistants can discover and use.

Initialize Default Skills

This command installs Packmind’s default skills locally, including:
  • 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.
Automatic installation — Default skills are also installed automatically when you run packmind-cli init, install a package with packmind-cli install, or when packages are distributed to your repository via the web app.

List Skills

This command displays all skills in your Packmind organization, showing:
  • Slug — The skill identifier
  • Name — The display name
  • URL — Direct link to view the skill in the web app
  • Description — What the skill does
Example output:

Add a Skill

Arguments:
  • <path> - Path to the skill directory containing skill files
Example:
Use --no-review to trigger a direct update. Omit --no-review to use the change proposals system and get validation of your changes.
This uploads the skill to your Packmind organization, making it available for distribution to repositories. When uploading a skill that already exists, Packmind automatically compares the content:
  • If changes are detected, a new version is created
  • If the content is identical, no new version is created
See Skills Management for details on versioning.

Standards Command

Create and manage coding standards from the command line.

List Standards

This command displays all standards in your Packmind organization, showing:
  • Slug — The standard identifier
  • Name — The display name
  • URL — Direct link to view the standard in the web app
  • Description — What the standard covers
Example output:

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

This command displays all commands in your Packmind organization, showing:
  • Slug — The command identifier
  • Name — The display name
  • URL — Direct link to view the command in the web app
Example output:

Create a Command

The markdown file content will be used as the command’s prompt. The name of the command will be deduced from the file path.
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

This command displays all packages in your Packmind organization, showing:
  • Slug — The package identifier
  • Name — The display name

Create a Package

Arguments:
  • <name> - Name of the package to create
Options: Example:
With a description:
This creates a new empty package in your Packmind organization. After creation, you can add commands, standards, and skills to the package through the web interface or by using the packages add command.

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"
The slug is used for:
  • Package installation: packmind-cli install backend-standards
  • Package identification and distribution
If a package with the same slug already exists in your space, Packmind appends a counter (e.g., backend-standards-1) to ensure uniqueness.

Add Items to a Package

Options: Examples: Add a standard to a package:
Add a command to a package:
Add a skill to a package:
Workflow tip — Use this command after creating standards, commands, or skills via CLI to organize them into packages. This is particularly useful when automating package management in scripts or CI/CD pipelines.

Plugins Command

Publish a Packmind package as a Claude Code plugin so its commands and skills can be installed directly into Claude Code, either from your own Claude marketplace or as a standalone plugin repository. A rendered plugin contains the package’s commands (as Claude slash commands) and skills (as Claude skills). Standards are not rendered because Claude plugins do not support them — when a package contains standards, the CLI reports how many were skipped.

Choose Your Workspace Mode

The plugins commands detect what kind of workspace you are in by looking inside the .claude-plugin/ directory:
Setting up a marketplace — Create a .claude-plugin/marketplace.json file at the root of a Git repository with the shape { "name": "<marketplace-name>", "owner": { "name": "<your-name>" }, "plugins": [] }. The CLI fills in the plugins array for you as you render packages. See Anthropic’s marketplace documentation for the full schema.
Setting up a standalone plugin — Create a .claude-plugin/plugin.json file at the root of a Git repository with at least { "name": "<plugin-name>" }. The plugin name must match the package slug you intend to render.

Plugins Render

Render a Packmind package as a Claude plugin in the current workspace.
Arguments:
  • <package-slug> — Slug of the package to render (for example, security or @my-space/security)

Marketplace Workflow

Run the command from the root of your marketplace repository (the directory that contains .claude-plugin/marketplace.json):
The CLI will:
  1. Download the package’s commands and skills from your Packmind organization
  2. Write them under plugins/security/ (commands in plugins/security/commands/, skills in plugins/security/skills/)
  3. Add or update the plugin entry inside .claude-plugin/marketplace.json, pointing source to ./plugins/security
Example output:
When the same plugin is rendered again, the CLI asks for confirmation before overwriting:

Standalone Workflow

Run the command from the root of your standalone plugin repository (the directory that contains .claude-plugin/plugin.json):
The CLI will:
  1. Verify that the package slug matches the name field declared in plugin.json
  2. Download the package’s commands and skills
  3. Write them directly at the repository root (commands/ and skills/)
Because a standalone repository already represents the plugin, the CLI always asks for confirmation before overwriting existing files:
Git remote detected automatically — When the workspace is a Git repository with a remote, the CLI captures the remote URL and current branch and sends them to Packmind so the distribution is tracked alongside your other deployments.

Plugins Delete

Remove a rendered plugin from the current workspace and notify Packmind that the distribution has been deleted.
Arguments:
  • <package-slug> — Slug of the plugin to delete (matches the package slug used during render)

Marketplace Workflow

Run the command from the root of your marketplace repository:
The CLI will:
  1. Locate the plugin entry in .claude-plugin/marketplace.json
  2. Ask for confirmation:
  3. Delete the plugin directory (for example, ./plugins/security) and remove its entry from marketplace.json
If the plugin is not declared in marketplace.json, the command exits without changes:

Standalone Workflow

Run the command from the root of your standalone plugin repository:
After confirmation, the CLI removes the rendered commands/ and skills/ directories. The .claude-plugin/plugin.json manifest is left untouched so you can re-render the plugin later.

Troubleshooting

  • Problem: No .claude-plugin/marketplace.json or .claude-plugin/plugin.json found in this directory.
  • Solution: Run the command from the root of a workspace that contains one of these manifests. Create the appropriate manifest first if the workspace is brand new.
  • Problem: The plugin '<name>' is not handled in this repo. (standalone mode)
  • Solution: The package slug you passed does not match the name declared in .claude-plugin/plugin.json. Update the manifest or pass the matching slug.
  • Problem: Plugin "<name>" has a remote source. Run this command in the workspace of the remote plugin.
  • Solution: The marketplace entry points to a remote source (for example, a GitHub repository) rather than a local folder. Switch to the workspace that owns the remote plugin and run the command there.
  • Problem: Some content from the package is missing in the rendered plugin.
  • Solution: Standards are intentionally skipped because Claude plugins do not support them. Check the Skipped N standards line in the command output to see how many were excluded.

Playbook Command

Manage local artifact changes and propose them to your team using a git-like staging workflow. The playbook command groups six subcommands: diff, status, add, rm, unstage, and submit.

View Differences

Compares your local artifact files (standards, commands, skills) against the versions published in Packmind. No changes are submitted. Example output:
For each standard, the diff shows:
  • 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
Options:

Check Status

Shows staged changes ready for submission and untracked local modifications. Example output:

Stage Changes

Stages a local artifact change for submission. The change type (created or updated) is detected automatically by comparing with the deployed version.

Stage Removal

Stages an artifact for removal from the playbook. The artifact must have been distributed by Packmind. Alias: remove.

Unstage Changes

Removes a previously staged change from the playbook without submitting it.

Submit Proposals

Submits all staged changes as change proposals for team review in the Packmind web app. If you omit -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.
Requires a git repository — The playbook command requires your project to be in a git repository with a configured remote. Make sure you have run packmind-cli install to set up your packmind.json before using playbook.

Update Command

Update the Packmind CLI to the latest version.
This checks for a newer version and updates the CLI in place:
  • Standalone executable — Downloads the latest binary from GitHub and replaces the current executable automatically.
  • npm global install — Runs npm install -g @packmind/cli@latest to update through npm.
Example output:
If you are already on the latest version:
Permission error on Linux/macOS — If you see a permission denied error, run the command with sudo:

Check for Updates Without Installing

Use the --check flag to see if a newer version is available without performing the update:
This is useful in CI/CD pipelines or scripts where you want to detect outdated CLI versions without automatically upgrading. The command exits with code 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.