Skip to content

Command reference

This page documents every command, subcommand, and flag in the Pullminder CLI.

The following flag is available on every command:

FlagDescription
--agentEmit JSON output optimized for AI coding agents. When set, all commands produce machine-readable JSON instead of human-friendly text.

These commands run entirely offline. They do not require authentication or network access.

Create a .pullminder.yml configuration file in the current directory. The file defines which rule packs are enabled and how they are configured.

Terminal window
pullminder init

Running init interactively walks you through pack selection and threshold configuration. To accept all defaults and skip prompts, pass --yes:

Terminal window
pullminder init --yes

Flags

FlagDescription
--yesAccept all defaults without prompting.

Run rule packs against the current branch diff and report findings. This is the primary command for local analysis.

Terminal window
# Analyze the diff between the current branch and main
pullminder check
# Analyze against a specific base branch
pullminder check --base develop
# Analyze a diff file instead of the Git working tree
pullminder check --diff changes.patch
# Analyze specific files only
pullminder check --files src/auth/login.go src/auth/session.go
# Fail the command on any finding (useful for pre-push hooks)
pullminder check --strict
# Output results as JSON
pullminder check --json
# Output results as SARIF
pullminder check --sarif

Flags

FlagDescription
--base <branch>Base branch or commit to diff against. Defaults to main.
--diff <file>Path to a unified diff file to analyze instead of the Git working tree.
--files <paths...>Analyze only the specified file paths.
--strictExit with a non-zero code if any findings are reported, regardless of severity.
--jsonOutput results as JSON.
--sarifOutput results as SARIF (Static Analysis Results Interchange Format).

CI-optimized analysis. Behaves like check but automatically detects the CI environment and adjusts defaults accordingly. Supported CI systems:

  • GitHub Actions
  • GitLab CI
  • CircleCI
  • Jenkins
  • Bitbucket Pipelines

In a detected CI environment, pullminder ci automatically resolves the base branch from the CI provider’s environment variables. Outside of CI it falls back to the same behavior as check.

Terminal window
# Basic CI run
pullminder ci
# Output JUnit XML for test reporting
pullminder ci --junit
# Post inline annotations on GitHub Actions
pullminder ci --github-annotations
# Fail only on critical or high severity findings
pullminder ci --fail-on high
# Combine multiple output formats
pullminder ci --sarif --junit --github-annotations --fail-on critical

Flags

FlagDescription
--base <branch>Override the auto-detected base branch.
--strictExit with a non-zero code on any finding.
--jsonOutput results as JSON.
--sarifOutput results as SARIF.
--junitOutput results as JUnit XML.
--github-annotationsEmit ::warning and ::error annotations for GitHub Actions. Findings appear inline on the Files Changed tab.
--fail-on <severity>Set the minimum severity that causes a non-zero exit code. Valid values: critical, high, medium, low. For example, --fail-on high fails the build on high or critical findings but allows medium and low to pass.

These commands interact with the Pullminder platform API. They require a GITHUB_TOKEN or GH_TOKEN environment variable (or an active pullminder auth login session).

Run rule packs against a remote pull request. The PR URL must be a full GitHub pull request URL.

Terminal window
pullminder diff https://github.com/acme/repo/pull/42
# Run only a specific pack
pullminder diff https://github.com/acme/repo/pull/42 --pack security
# Strict mode
pullminder diff https://github.com/acme/repo/pull/42 --strict
# SARIF output
pullminder diff https://github.com/acme/repo/pull/42 --sarif

Flags

FlagDescription
--pack <name>Run only the specified rule pack.
--strictExit with a non-zero code on any finding.
--jsonOutput results as JSON.
--sarifOutput results as SARIF.

Fetch the risk score for a pull request. Returns a number from 0 to 100.

Terminal window
pullminder score https://github.com/acme/repo/pull/42
# JSON output for scripting
pullminder score https://github.com/acme/repo/pull/42 --json

Flags

FlagDescription
--jsonOutput the score as a JSON object.

Fetch the AI reviewer brief for a pull request. The brief is the structured summary that Pullminder generates for reviewers.

Terminal window
pullminder brief https://github.com/acme/repo/pull/42
# Output as JSON
pullminder brief https://github.com/acme/repo/pull/42 --json
# Output as Markdown (useful for piping into other tools)
pullminder brief https://github.com/acme/repo/pull/42 --markdown

Flags

FlagDescription
--jsonOutput the brief as a JSON object.
--markdownOutput the brief as Markdown.

Manage authentication with the Pullminder platform.

Authenticate with the Pullminder platform. Opens a browser-based OAuth flow by default.

Terminal window
# Interactive login (opens browser)
pullminder auth login
# Token-based login (for CI or headless environments)
pullminder auth login --token $PULLMINDER_TOKEN
# Login to a self-hosted instance
pullminder auth login --api-host https://pullminder.internal.example.com

Flags

FlagDescription
--token <token>Authenticate with a personal access token instead of the browser flow.
--api-host <url>Override the default API host for self-hosted or enterprise deployments.

Log out and remove stored credentials.

Terminal window
pullminder auth logout

Show the current authentication state, including the logged-in user and active organization.

Terminal window
pullminder auth status

Switch the active organization context.

Terminal window
pullminder auth switch-org --org acme-corp

Flags

FlagDescription
--org <name>The organization to switch to.

View and manage Pullminder configuration.

Display the effective configuration for the current project or organization.

Terminal window
pullminder config show
# Show organization-level config (requires active org context)
pullminder config show --org
# Output as JSON
pullminder config show --json

Flags

FlagDescription
--orgShow the organization-level platform configuration instead of local config.
--jsonOutput config as JSON.

Set a configuration value.

Terminal window
pullminder config set threshold.risk 75
pullminder config set packs.security.enabled true

Export the current configuration to a file.

Terminal window
pullminder config export > pullminder-config.yml

Import configuration from a file.

Terminal window
pullminder config import pullminder-config.yml

Show differences between local and remote configuration.

Terminal window
pullminder config diff
# Output diff as JSON
pullminder config diff --json

Flags

FlagDescription
--jsonOutput the diff as JSON.

Manage rule packs.

List all available rule packs.

Terminal window
pullminder packs list
# Show only enabled packs
pullminder packs list --enabled
# Output as JSON
pullminder packs list --json

Flags

FlagDescription
--enabledShow only packs that are currently enabled.
--jsonOutput the list as JSON.

Show detailed information about a specific pack.

Terminal window
pullminder packs info security
# Output as JSON
pullminder packs info security --json

Flags

FlagDescription
--jsonOutput pack info as JSON.

Enable a rule pack.

Terminal window
pullminder packs enable security

Disable a rule pack.

Terminal window
pullminder packs disable deprecated-api

Author and publish custom rules.

Run tests against rule definitions to verify they match the expected files and produce the expected findings.

Terminal window
pullminder rules test
# Test a specific pack
pullminder rules test --pack my-custom-pack
# Verbose output showing each test case
pullminder rules test --pack my-custom-pack --verbose
# Output as JSON
pullminder rules test --json

Flags

FlagDescription
--pack <name>Test only the specified pack.
--verbosePrint detailed output for each test case.
--jsonOutput test results as JSON.

Publish a rule pack to the Pullminder registry.

Terminal window
pullminder rules publish --pack my-custom-pack
# Dry run to validate without publishing
pullminder rules publish --pack my-custom-pack --dry-run
# Publish with a specific GitHub token
pullminder rules publish --pack my-custom-pack --github-token $GITHUB_TOKEN
# Set the PR title and target branch
pullminder rules publish --pack my-custom-pack --title "Add SQL injection rules" --branch main

Flags

FlagDescription
--pack <name>The pack to publish. Required.
--dry-runValidate the pack without creating a publish request.
--github-token <token>GitHub token for authentication. Defaults to GITHUB_TOKEN env var.
--title <text>Title for the publish pull request.
--branch <name>Target branch in the registry repository.

Manage Git hooks for automatic pre-push and pre-commit analysis.

Install a Git hook that runs Pullminder automatically.

Terminal window
# Install a pre-push hook
pullminder hooks install --hook pre-push
# Install a pre-commit hook
pullminder hooks install --hook pre-commit
# Overwrite an existing hook
pullminder hooks install --hook pre-push --force

Flags

FlagDescription
--hook <type>The hook to install. Valid values: pre-push, pre-commit.
--forceOverwrite an existing hook file if one exists.

Remove a previously installed Git hook.

Terminal window
pullminder hooks uninstall --hook pre-push

Show which hooks are currently installed.

Terminal window
pullminder hooks status

Manage a custom rule pack registry.

Initialize a new registry repository with the required directory structure and metadata files.

Terminal window
pullminder registry init

Validate the registry structure and all pack definitions.

Terminal window
pullminder registry validate
# Strict mode (treat warnings as errors)
pullminder registry validate --strict

Flags

FlagDescription
--strictTreat warnings as validation errors.

Check the registry for available schema upgrades without applying them.

Terminal window
pullminder registry upgrade check
pullminder registry upgrade check ./path/to/registry

Apply schema upgrades to the registry.

Terminal window
pullminder registry upgrade apply
pullminder registry upgrade apply ./path/to/registry

Both subcommands accept an optional directory argument. If omitted, the current directory is used.

Add a new pack to the registry.

Terminal window
pullminder registry pack add my-new-pack

List all packs in the registry.

Terminal window
pullminder registry pack list

Remove a pack from the registry.

Terminal window
pullminder registry pack remove deprecated-pack

Print the CLI version and exit.

Terminal window
pullminder version

All commands use the following exit codes:

CodeMeaning
0Success. No findings, or analysis completed without issues.
1Findings were reported at or above the configured severity threshold, or a critical error occurred.
2Warnings were reported, but no critical or high-severity findings.

When using --strict, any finding of any severity causes exit code 1. When using --fail-on <severity>, only findings at or above the specified severity cause exit code 1.