Skip to content

CLI Reference

Commands

vibecop scan

Scan a directory for code quality issues.

Terminal window
vibecop scan [path]

Arguments:

ArgumentDescriptionDefault
[path]Directory to scan. (current directory)

Options:

FlagDescriptionDefault
-f, --format <format>Output format: text, json, github, sarif, html, agent, gcctext
-c, --config <path>Path to config file.vibecop.yml
--no-configDisable config file loading
--max-findings <number>Maximum number of findings to report50
--verboseShow timing informationfalse
--diff <ref>Scan only files changed vs git ref
--stdin-filesRead file list from stdin (one path per line)false
--group-by <mode>Group findings by file or rulefile

Examples:

Terminal window
# Scan current directory
vibecop scan .
# Scan with JSON output
vibecop scan src/ --format json
# Scan only changed files
vibecop scan --diff HEAD
# Scan with custom config
vibecop scan . --config .vibecop.yml
# Unlimited findings with timing info
vibecop scan . --max-findings 0 --verbose
# Read file list from stdin
git diff --name-only HEAD | vibecop scan --stdin-files
# Group findings by rule instead of file
vibecop scan . --group-by rule

vibecop check

Check a single file for code quality issues.

Terminal window
vibecop check <file>

Arguments:

ArgumentDescription
<file>File to check (required)

Options:

FlagDescriptionDefault
-f, --format <format>Output format: text, json, github, sarif, html, agent, gcctext
--max-findings <number>Maximum number of findings to report50
--verboseShow timing informationfalse
--group-by <mode>Group findings by file or rulefile

Examples:

Terminal window
# Check a single file
vibecop check src/utils/api.ts
# Check with JSON output
vibecop check src/auth.ts --format json

vibecop init

Auto-detect AI coding tools and generate integration config files.

Terminal window
vibecop init

No arguments or options. Detects tools by checking for:

  • .claude/ directory (Claude Code)
  • .cursor/ directory (Cursor)
  • .codex/ directory (Codex CLI)
  • aider in PATH (Aider)
  • .windsurf/ directory (Windsurf)
  • .github/ directory (GitHub Copilot)
  • .cline/ or .clinerules (Cline/Roo Code)

Generates the appropriate config files for each detected tool. See Agent Integration for details.

vibecop serve

Start the MCP server on stdio transport.

Terminal window
vibecop serve

No arguments or options. The server exposes three tools (vibecop_scan, vibecop_check, vibecop_explain) via the Model Context Protocol. See MCP Server for client configuration.

vibecop test-rules

Validate custom YAML rules against their inline examples.

Terminal window
vibecop test-rules [--rules-dir <path>]

Options:

FlagDescriptionDefault
--rules-dir <path>Path to custom rules directory.vibecop/rules

Examples:

Terminal window
# Test rules in default directory
vibecop test-rules
# Test rules in custom directory
vibecop test-rules --rules-dir my-rules/

Exits with code 1 if any rules fail validation or example testing.

Exit Codes

CodeMeaning
0No findings (clean)
1One or more findings found
2Scan error (bad arguments, file not found, git error, etc.)

Output Formats

FormatDescription
textDefault. Stylish terminal output grouped by file, with colors
jsonStructured JSON with findings, filesScanned, errors, and optional timing
githubGitHub Actions ::error annotations + GITHUB_STEP_SUMMARY markdown
sarifSARIF 2.1.0 format for GitHub Security tab upload
htmlSelf-contained single-file HTML report
agentToken-efficient one-finding-per-line format for AI agent hooks
gccGCC-style file:line:col: severity: message [rule-id] for editor integration

Agent Format Example

src/api.ts:42:1 error unsafe-shell-exec: execSync() with template literal. Use execFile() with argument array instead.
src/llm.ts:18:5 warning llm-unpinned-model: Unpinned model alias "gpt-4o". Pin to a dated version like "gpt-4o-2024-08-06".

GCC Format Example

src/api.ts:42:1: error: execSync() with template literal [unsafe-shell-exec]
src/llm.ts:18:5: warning: Unpinned model alias "gpt-4o" [llm-unpinned-model]

Global Options

FlagDescription
--versionPrint version number
--helpPrint help text