Overview
The Packmind CLI provides the following commands:login- Authenticate with your Packmind instancelogout- Clear stored credentialswhoami- Show current authentication statussetup-mcp- Configure MCP for AI coding agentsinstall- Download packages locallylint- Run detection programs (Enterprise only)skills add- Import skills into Packmind
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
Global Installation:packmind-cli command will be available globally.
npx (no installation required):
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
Alternative: Environment Variable
You can also authenticate using an environment variable. This is useful for CI/CD pipelines or when you prefer not to store credentials in a file.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 API Key
Set the API key as an environment variable:~/.bashrc, ~/.zshrc, etc.):
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
Recursive Install (Monorepos)
For monorepos or projects with multiplepackmind.json files, use the recursive flag to install packages across all locations:
packmind.json files in your git repository and installs their configured packages. After installation, a summary shows how many distributions were notified to Packmind.
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 or file: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 requires 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
Skills Command
Import skills into your Packmind organization. Skills are reusable prompts that can be invoked by AI coding assistants.Add a Skill
<path>- Path to the skill directory containing skill files
Related Documentation
- 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