kaudit
v0.1.2
Published
AI-powered code audit CLI — audit your PRs with kaudit
Readme
██╗ ██╗ █████╗ ██╗ ██╗██████╗ ██╗████████╗
██║ ██╔╝██╔══██╗██║ ██║██╔══██╗██║╚══██╔══╝
█████╔╝ ███████║██║ ██║██║ ██║██║ ██║
██╔═██╗ ██╔══██║██║ ██║██║ ██║██║ ██║
██║ ██╗██║ ██║╚██████╔╝██████╔╝██║ ██║
╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝AI-powered code audit CLI
Analiza el diff de tu rama, detecta problemas de seguridad y crea un Pull Request con el reporte. Todo desde tu terminal.
Quick start
# Install globally
npm install -g kaudit
# Authenticate with your API key
kaudit login kaudit_xxxxxxxxxxxxxxxxxxxx
# Run an audit on your current branch
kauditGet your API key at kaudit.dev.
What it does
Your branch kaudit GitHub
────────── ───────────────────────────── ──────────────
git diff ─► Analyze diff with AI
─► Detect vulnerabilities
─► Generate PR report
─► Push branch ─► Create PR- Analyze — Sends your branch diff (or staged changes) to the AI engine
- Validate — Detects security vulnerabilities ranked by severity
- Generate — Creates PR title, summary, checklist and suggestions
- Ship — Pushes your branch and creates the Pull Request
Commands
| Command | Description |
| :--- | :--- |
| kaudit | Audit the current branch diff and create a PR |
| kaudit login <api-key> | Authenticate with your API key |
| kaudit logout | Clear stored credentials |
Options
| Flag | Description | Default |
| :--- | :--- | :--- |
| --base <branch> | Base branch to compare against | main |
| --staged | Audit staged changes (git add) instead of commits | false |
| --fast | Skip docstrings and test generation | false |
| --no-push | Don't push branch after audit | false |
| --repo <url> | Repository URL (if no git remote) | auto-detect |
| --url <url> | API server URL | https://kaudit.dev |
| --timeout <ms> | Max polling timeout | 600000 (10 min) |
| --no-color | Disable colored output | false |
Examples
# Audit commits vs main (default)
kaudit
# Audit only staged changes
kaudit --staged
# Fast mode without tests or docstrings
kaudit --fast
# Audit against develop branch
kaudit --base develop
# Audit only, no push or PR
kaudit --no-push
# Point to a local server (development)
kaudit --url http://localhost:3000CI/CD
Use environment variables instead of kaudit login in pipelines:
export KAUDIT_API_KEY=your-api-key
kaudit --no-push- name: Audit with kaudit
env:
KAUDIT_API_KEY: ${{ secrets.KAUDIT_API_KEY }}
run: npx kaudit --no-push --base mainEnvironment variables
| Variable | Description |
| :--- | :--- |
| KAUDIT_API_KEY | API key (alternative to kaudit login) |
| KAUDIT_URL | Server URL (overrides --url) |
| NO_COLOR | Disable colored output |
Configuration
Credentials are stored in ~/.kaudit/config.json.
{
"apiKey": "kaudit_xxxxxxxxxxxxxxxxxxxx",
"userId": "user_xxx",
"serverUrl": "https://kaudit.dev"
}Development
pnpm install
pnpm run build # production build
pnpm run dev # watch modeBuilt with tsup as ESM bundle for Node.js 18+.
License
BSL-1.1
