Commands

March 22, 2026 · View on GitHub

AgentRC — prime your repositories for AI-assisted development.

Full CLI reference. Run any command with npx github:microsoft/agentrc <command>. All commands support --json and --quiet global flags.

Global options

FlagEffect
--jsonStructured JSON to stdout
--quietSuppress stderr progress
--accessibleScreen-reader friendly output

JSON output uses a CommandResult<T> envelope:

{ "ok": true, "status": "success", "data": { ... } }

agentrc init

Interactive repo onboarding — analyzes your stack and generates instructions and configs in one pass.

agentrc init [path]
FlagDefaultDescription
--githubUse a GitHub repository
--provider <p>github or azure
--yesAccept all defaults (headless mode)
--forceOverwrite existing files
--model <name>claude-sonnet-4.6Model for generation

For monorepos, auto-detects workspaces and creates agentrc.config.json.


agentrc analyze

Inspect repo structure — languages, frameworks, monorepo layout, areas.

agentrc analyze [path]
FlagDefaultDescription
--output <path>Write report (.json or .md)
--forceOverwrite existing output

agentrc readiness

Score readiness across 9 pillars. See Concepts — Readiness pillars.

agentrc readiness [path]
FlagDefaultDescription
--output <path>Write report (.json, .md, or .html)
--forceOverwrite existing output
--visualGenerate HTML report
--per-areaInclude per-area breakdown
--policy <sources>Comma-separated policy paths or npm packages
--fail-level <n>Exit 1 if maturity level < n (1–5)

agentrc instructions

Generate tailored instruction files via the Copilot SDK.

agentrc instructions
FlagDefaultDescription
--repo <path>cwdRepository path
--output <path>.github/copilot-instructions.mdOutput file
--model <name>claude-sonnet-4.6Model for generation
--forceOverwrite existing area files
--strategy <mode>flatflat or nested
--areasAlso generate for detected areas
--areas-onlyOnly area instructions (skip root)
--area <name>Single area
--claude-mdAlso generate CLAUDE.md (nested only)
--dry-runPreview without writing

See Concepts — Instructions for strategy and area details.


agentrc eval

Evaluate instruction quality with a judge model.

agentrc eval [path]          # path to eval config (default: ./agentrc.eval.json)
agentrc eval --init          # scaffold test cases
FlagDefaultDescription
--repo <path>cwdRepository path
--model <name>claude-sonnet-4.6Model for responses
--judge-model <name>claude-sonnet-4.6Model for judging
--list-modelsList available models and exit
--output <path>Write results JSON
--initScaffold starter eval config
--count <n>5Number of test cases to generate with --init
--fail-level <n>Exit 1 if pass rate < n%

See Concepts — Evaluation for how scoring works.


agentrc generate

Generate MCP and VS Code configs.

agentrc generate <type> [path]

Types: mcp, vscode (also instructions and agents, but deprecated — use agentrc instructions).

FlagDefaultDescription
--forceOverwrite existing files
--model <name>claude-sonnet-4.6Model for generation
--strategy <mode>flatInstruction strategy
--dry-runPreview generated files without writing

agentrc batch

Batch-process repos across a GitHub org or Azure DevOps project. See At Scale for detailed usage and examples.

agentrc batch                              # interactive TUI
agentrc batch owner/repo1 owner/repo2      # GitHub (headless)
agentrc batch org/project/repo --provider azure  # Azure DevOps
FlagDefaultDescription
--output <path>Write results JSON
--provider <p>githubgithub or azure
--model <name>claude-sonnet-4.6Model for generation
--branch <name>Branch name for PRs

Repos can also be piped via stdin (one per line).


agentrc batch-readiness

Consolidated readiness report across multiple repos.

agentrc batch-readiness --output team.html
FlagDefaultDescription
--output <path>Write HTML report
--policy <sources>Comma-separated policy paths or npm packages

agentrc pr

Clone a repo, generate configs, and open a PR. See At Scale for the full workflow.

agentrc pr owner/repo-name                      # GitHub
agentrc pr org/project/repo --provider azure    # Azure DevOps
FlagDefaultDescription
--branch <name>agentrc/add-ai-configBranch name
--provider <p>github or azure
--model <name>claude-sonnet-4.6Model for generation

agentrc tui

Interactive terminal UI for all workflows.

agentrc tui
FlagDefaultDescription
--repo <path>cwdRepository path
--no-animationSkip animated banner

Next steps

  • Concepts — understand maturity model and readiness pillars
  • Configurationagentrc.config.json for areas, workspaces, monorepos
  • At Scale — batch processing and automated PRs
  • CI Integration — use --fail-level and --json in pipelines