@kedgr/cli
v0.2.2
Published
AI-powered code analysis CLI that runs in your terminal
Maintainers
Readme
Kedgr CLI
AI-powered code analysis that runs in your terminal.
The CLI supports two scan modes:
- Cloud mode: upload a redacted archive to
https://codechecker.pxxl.pro/apiand run the exact rulesets attached to your Kedgr dashboard project. - Offline mode: analyze only the local project on disk with built-in heuristics and secret detection, with no network access required.
Installation
npm install -g @kedgr/cliQuick Start
# Login with your API key
kedgr login --api-key YOUR_API_KEY
# Pick a default project and its attached rulesets
kedgr project list
# Run a cloud scan
kedgr scan .
# Run a local-only offline scan
kedgr scan . --offline
# Check status
kedgr statusCommands
kedgr scan [path]
Scan a project for issues.
By default this uses the selected Kedgr project and its dashboard rulesets. If the backend is unreachable, the CLI automatically falls back to an offline local scan. You can also force offline mode explicitly.
Options:
--dry-run- Prepare the archive without executing a scan--offline- Run local-only analysis on the current project--format <type>- Output format:text,json,sarif(default:text)--severity <level>- Minimum severity:low,medium,high,critical(default:low)--project-id <id>- Project ID to scan against in cloud mode
Examples:
# Scan current directory with the default dashboard project
kedgr scan
# Scan a specific directory against a specific project
kedgr scan ./my-project --project-id YOUR_PROJECT_ID
# Force offline mode
kedgr scan . --offline
# Dry run to inspect packaging behavior
kedgr scan --dry-run
# SARIF output for CI tools
kedgr scan --format sarifkedgr login
Authenticate with Kedgr.
Options:
--api-key <key>- Use API key (get from kedgr.xyz/settings)
kedgr logout
Remove stored credentials.
kedgr status
Show authentication status, backend URL, default project, and attached rulesets when available.
kedgr project list
List available projects and save a default project for future scans.
Offline Capabilities
Offline mode only inspects the project currently on disk and does not use dashboard rulesets. It includes:
- Smart file filtering via
.gitignoreand.kedgrignore - Secret redaction for cloud packaging
- Local secret detection findings
- Fast heuristic checks for common issues
- Project summary generation
- Text, JSON, and SARIF output
Configuration
Configuration is stored in ~/.kedgr/config.json.
Environment variables are also supported:
KEDGR_API_URL- Override API URL (default:https://codechecker.pxxl.pro/api)KEDGR_API_KEY- Provide API key without saving it locally
Development
npm install
npm run build
npm run dev -- scan .
npm run dev -- scan . --offlineLicense
MIT
