All Commands & Features

AI Commands

jam ask

Send a one-shot question to the AI with full codebase context.

jam ask "How does authentication work?"
jam ask --provider anthropic "Explain this error"
echo "explain this" | jam ask --file README.md
jam ask --json "List all API endpoints"
--providerAI provider to use (e.g. openai, anthropic, ollama)
--modelModel name to use
--fileAttach a file as additional context
--jsonOutput the response as JSON
--systemCustom system prompt
--no-toolsDisable tool use for the request
--quietSuppress non-essential output

jam chat

Start an interactive multi-turn chat session.

jam chat
jam chat --provider anthropic --model claude-sonnet-4-20250514
jam chat --system "You are a security expert"
--providerAI provider to use
--modelModel name to use
--systemCustom system prompt
--resumeResume a previous chat session

jam explain

Explain the contents of one or more files.

jam explain src/utils/errors.ts
jam explain src/providers/*.ts
jam explain --json src/index.ts
--providerAI provider to use
--modelModel name to use
--jsonOutput the explanation as JSON

jam run

Execute a task workflow using AI and local tools.

jam run "add input validation to the login form"
jam run "refactor the database module to use connection pooling"
jam run --yes "update all deprecated API calls"
--providerAI provider to use
--modelModel name to use
--yesAuto-approve file writes
--max-roundsMaximum number of tool-use rounds

jam diff

Review a git diff with AI.

jam diff
jam diff --staged
jam diff --no-review
--stagedReview only staged changes
--no-reviewShow the diff without AI review
--providerAI provider to use
--modelModel name to use

jam review

Review a branch or PR with AI.

jam review
jam review --base develop
jam review --pr 42
jam review --json
--baseBase branch to diff against
--prPull request number (requires gh CLI)
--jsonOutput the review as JSON
--providerAI provider to use
--modelModel name to use

jam commit

Generate an AI commit message from staged changes and commit.

jam commit
jam commit --dry
jam commit --yes
jam commit --amend
--dryPrint the generated message without committing
--yesAuto-approve the generated commit message
--amendAmend the previous commit

jam patch

Generate and optionally apply a code patch.

jam patch "add error handling to the API routes"
jam patch --apply "fix the race condition in worker.ts"
jam patch --json "add TypeScript types to utils"
--applyApply the generated patch immediately
--jsonOutput the patch as JSON
--providerAI provider to use
--modelModel name to use

jam trace

Trace the call graph of a function, class, or symbol.

jam trace createProvider
jam trace --depth 3 handleRequest
jam trace --no-ai MyClass
--depthMaximum depth of the call graph
--no-aiSkip AI analysis, show raw graph only
--jsonOutput the trace as JSON
--providerAI provider to use

jam diagram

Generate architecture diagrams from code analysis (Mermaid output).

jam diagram --type architecture
jam diagram --type deps src/providers
jam diagram --no-ai --type class
jam diagram --json
--typeDiagram type: architecture, deps, class, or flow
--no-aiGenerate deterministic Mermaid from static analysis only
--jsonOutput raw ProjectAnalysis data as JSON
--providerAI provider to use

jam verify

Validate changes -- run checks, scan for secrets, assess risk.

jam verify
jam verify --skip-ai
jam verify --json
--skip-aiRun only local checks, skip AI assessment
--jsonOutput results as JSON
--providerAI provider to use

Integrations

jam jira

Jira integration -- browse and start working on issues.

jam jira issues
jam jira start PROJ-123
jam jira view PROJ-456
issuesList issues assigned to you
startCreate a branch and begin work on an issue
viewView issue details

Requires JIRA_URL and JIRA_TOKEN environment variables.

jam mcp

Manage MCP (Model Context Protocol) servers.

jam mcp list
jam mcp list --json
--jsonOutput server list as JSON

Configure servers in the .jamrc mcpServers field.

Utilities

jam todo

Scan codebase for TODO/FIXME/HACK/XXX comments.

jam todo
jam todo --by-author
jam todo --by-age
jam todo --type FIXME BUG
jam todo --json
--by-authorGroup results by git author
--by-ageSort results by age
--typeFilter by comment type (TODO, FIXME, HACK, etc.)
--patternCustom regex pattern to match
--jsonOutput results as JSON

jam ports

Show what is listening on your dev ports.

jam ports
jam ports --json
--jsonOutput port list as JSON

jam recent

Show recently modified files by git activity.

jam recent
jam recent --days 30
jam recent --json
--daysNumber of days to look back (default: 7)
--jsonOutput file list as JSON

jam stats

Codebase health dashboard -- LOC, churn, complexity.

jam stats
jam stats --json
--jsonOutput stats as JSON

jam hash

Hash files or directories (.gitignore-aware).

jam hash src/
jam hash --algo sha1 package.json
jam hash --json src/utils/
--algoHash algorithm: sha256 (default), sha1, or md5
--jsonOutput hashes as JSON

jam env

Manage .env files -- diff, validate, find missing vars, redact.

jam env
jam env --diff .env .env.example
jam env --redact
jam env --json
--diffCompare two env files side by side
--redactPrint env vars with values redacted
--jsonOutput env data as JSON

jam deps

Analyze import dependency graph -- cycles, orphans, hotspots.

jam deps
jam deps --json
--jsonOutput dependency analysis as JSON

jam dup

Detect near-duplicate code blocks.

jam dup
jam dup --threshold 90
jam dup --min-lines 8
jam dup --json
--thresholdSimilarity threshold percentage (default: 80)
--min-linesMinimum number of lines for a block (default: 6)
--jsonOutput duplicates as JSON

jam json

JSON swiss knife -- pretty print, query, diff, minify.

jam json package.json
jam json package.json --query '.dependencies'
jam json --diff a.json b.json
jam json --minify data.json
--queryJSONPath query to extract specific fields
--diffDiff two JSON files
--flattenFlatten nested JSON to dot-notation keys
--minifyOutput minified JSON

jam convert

Convert between formats -- JSON, YAML, CSV, Base64, URL, Hex.

jam convert --from json --to yaml config.json
jam convert --from base64 --to text encoded.txt
jam convert --from csv --to json data.csv
--fromSource format
--toTarget format

jam pack

Package analyzer -- deps, size, unused detection, scripts.

jam pack
jam pack --json
--jsonOutput package analysis as JSON

jam http

Quick HTTP client with pretty JSON output.

jam http GET https://api.example.com/users
jam http POST https://api.example.com/users -d '{"name":"test"}'
jam http --json https://api.example.com/status
-dRequest body data
-HCustom request header
--jsonForce JSON output formatting

jam md2pdf

Convert a Markdown file to PDF.

jam md2pdf README.md
jam md2pdf --style minimal document.md
jam md2pdf --output report.pdf notes.md
--stylePDF style: default, minimal, or academic
--outputOutput file path

Git Tools

jam git wtf

Explain the current git state in plain English — branch, upstream, conflicts, mid-rebase, stashes.

jam git wtf

jam git undo

Detect the last git operation and suggest the safe undo command with explanation.

jam git undo
jam git undo --dry
--dryPreview only, do not execute

jam git cleanup

Remove merged branches, prune stale remote refs, find old branches.

jam git cleanup
jam git cleanup --dry
jam git cleanup --json
--dryPreview only, do not delete
--jsonJSON output

jam git standup

Show your recent commits across all branches — perfect for daily standups.

jam git standup
jam git standup --days 7
jam git standup --author "Jane" --json
--days <n>Days to look back (default: 1)
--author <name>Filter by author
--jsonJSON output

jam git oops

Quick reference for 10 common git mistakes with step-by-step fixes.

jam git oops

Setup & Config

jam init

Set up Jam in the current project.

jam init
jam init --skip-detection
--skip-detectionSkip automatic project detection

jam config

Manage Jam configuration.

jam config show
jam config init
showDisplay the current resolved configuration
initCreate a new .jamrc configuration file

jam auth

Manage authentication credentials.

jam auth login
jam auth logout
loginAuthenticate with a provider
logoutRemove stored credentials

jam models

Model management.

jam models list
jam models list --provider anthropic
--providerFilter models by provider

jam history

Manage chat session history.

jam history list
jam history show <session-id>
listList all saved chat sessions
showDisplay a specific session by ID

jam completion

Shell completion scripts.

jam completion install
installInstall completions for bash and zsh

jam context

Manage the JAM.md project context file.

jam context init
jam context show
initCreate a new JAM.md context file
showDisplay the current project context

jam cache

Manage the response cache.

jam cache stats
jam cache clear
jam cache prune
statsShow cache size and hit rate
clearDelete all cached responses
pruneRemove expired cache entries

jam doctor

Run system diagnostics.

jam doctor
Checks Node.js version, config validity, provider connectivity, ripgrep availability, and keytar status.

jam plugin

Manage jam plugins.

jam plugin list
listList all discovered plugins and their status