Your rules. Your standards. Your code health.
epunkine is a CLI tool that evaluates your codebase against your design philosophy — not against generic "best practices" or industry conventions.
The "code health" that epunkine measures is how well your code conforms to your own architectural decisions and design principles. It is not about clean code in the abstract sense. It is not about what the internet says is good. It is about whether your code follows the rules you have defined.
You write a health-policy.md in plain language — describing your team's conventions, layer boundaries, naming rules, complexity thresholds, or anything else you care about. epunkine sends that policy and your actual source code to an LLM, which then evaluates the codebase and generates findings.
epunkine inspect
🔍 Scanning repository...
🤖 Running inspector agent (this may take a while)...
Score: 72/100
Findings: 2 high, 3 medium, 1 low
✅ Report saved to .epunkine/results/report.md
- Installation
- Prerequisites
- Quick Start
- Command Reference
- Configuration
- health-policy.md
- GitHub Actions
- Model Providers
- License
npm install -g @ken11/code-epunkineOr run without installing:
npx @ken11/code-epunkine inspectAfter global installation, the epunkine command is available:
epunkine --version- Node.js 20 or later
- Credentials for one of the supported model providers:
- Amazon Bedrock: AWS credentials (IAM role /
AWS_ACCESS_KEY_ID+AWS_SECRET_ACCESS_KEY/ AWS CLI profile) - OpenAI:
OPENAI_API_KEYenvironment variable
- Amazon Bedrock: AWS credentials (IAM role /
epunkine initCreates ~/.config/epunkine/config.yaml and ~/.config/epunkine/health-policy.md.
An AI agent interviews you about your code quality preferences and generates a policy tailored to your answers.
cd /path/to/your-repo
epunkine init-repoCreates .epunkine/config.yaml and .epunkine/health-policy.md.
The agent references your global policy and helps you define repository-specific additions or overrides.
epunkine inspectThe following files are written under .epunkine/results/:
| File | Contents |
|---|---|
latest.json |
Structured findings data (latest run) |
report.md |
Human-readable Markdown report (latest run) |
dashboard-data.json |
Data for the dashboard (latest run) |
logs/<timestamp>.json |
Per-run history log |
epunkine dashboardOpens a browser with an interactive dashboard showing scores, findings, file statistics, and run history.
Initializes global configuration.
epunkine init- Creates
~/.config/epunkine/config.yaml(select model provider interactively) - Generates
~/.config/epunkine/health-policy.mdthrough a conversation with the AI agent
Initializes repository-specific configuration.
epunkine init-repo- Creates
.epunkine/config.yaml - Generates
.epunkine/health-policy.mdthrough a conversation with the AI agent - References the global policy; you can define repository-specific additions or overrides
Runs a full code audit on the repository.
epunkine inspect- Scans files according to the
scansettings inconfig.yaml - The AI agent reads the code and evaluates it against
health-policy.md - Outputs a report to
.epunkine/results/
Audit command designed for CI environments. Exits with a non-zero code when findings exceed the configured severity threshold.
epunkine ci [options]| Option | Default | Description |
|---|---|---|
--fail-on <severity> |
high |
Exit with code 1 if findings at or above this severity exist |
--output <format> |
text |
Output format: text or json |
--report-dir <path> |
.epunkine/reports |
Directory to write report files |
Severity levels (highest to lowest): high › medium › low › info
# Fail on high or above (default)
epunkine ci
# Fail on medium or above
epunkine ci --fail-on medium
# Output in JSON format
epunkine ci --output json
# Custom report directory
epunkine ci --report-dir ./reportsStarts a local dashboard server.
epunkine dashboard [options]| Option | Default | Description |
|---|---|---|
--port <number> |
3761 |
Port number |
--data-dir <path> |
.epunkine/results |
Data directory |
Note: Run
epunkine inspectfirst to generatedashboard-data.json.
The dashboard has six tabs:
- Overview — Score, findings summary, and per-category breakdown
- Findings — Findings list filterable by severity and category
- Files — Statistics for scanned files (line count, TODO/FIXME counts)
- Policy — Contents of the currently active
health-policy.md - Runs — Past inspect run history
- Trend — Score trend graph over time
You can also trigger an inspect run directly from the Run Inspect button; progress is streamed to the browser in real time.
epunkine merges two levels of configuration.
| File | Scope | Priority |
|---|---|---|
~/.config/epunkine/config.yaml |
Global (all repositories) | Lower |
.epunkine/config.yaml |
Repository-specific | Higher (overrides global) |
model:
provider: bedrock # bedrock | openai
name: us.anthropic.claude-sonnet-4-20250514-v1:0
scan:
include:
- src
exclude:
- node_modules
- dist
- build
- .git
- .epunkine
ci:
fail_on: high # high | medium | low | info
warn_on: medium
dashboard:
port: 3761- Repository
config.yamloverrides the global configuration property-by-property (shallow merge on nested objects) - If neither file exists, built-in defaults are used
.epunkine/
├── config.yaml # Repository-specific configuration
├── health-policy.md # Repository-specific health policy
└── results/ # Generated by epunkine inspect (exclude from git)
├── latest.json
├── report.md
├── dashboard-data.json
└── logs/
└── <timestamp>.json
# Exclude generated results; keep config and policy
.epunkine/results/Commit .epunkine/config.yaml and .epunkine/health-policy.md so that CI uses the same settings as local development.
git add .epunkine/config.yaml .epunkine/health-policy.md
git commit -m "chore: add epunkine config and policy"CI note:
epunkine cievaluates findings directly without reading.epunkine/results/, so CI works correctly even when results are not committed.
health-policy.md is the heart of epunkine. The AI agent reads this file to decide what counts as healthy or unhealthy code in your project.
.epunkine/health-policy.md(repository-specific)~/.config/epunkine/health-policy.md(global)- When both exist, they are combined — global as the base, repository-specific as additions or overrides
Write in plain natural language. Any format the LLM can understand works.
# Health Policy
## File size
Split files that exceed 300 lines.
Auto-generated files and configuration files are exceptions.
## Tests
All functions containing business logic must have unit tests.
Coverage target: 80% or above.
## Duplication
Consolidate logic that appears in three or more places.
Avoid over-abstraction — readability matters more than DRY.name: epunkine CI
on:
pull_request:
branches: [main, develop]
push:
branches: [main]
jobs:
epunkine:
runs-on: ubuntu-latest
permissions:
id-token: write # Required for OIDC (Bedrock)
contents: read
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install epunkine
run: npm install -g @ken11/code-epunkine
- name: Configure AWS credentials (Bedrock)
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
aws-region: us-east-1
- name: Run epunkine CI
run: epunkine ci --fail-on high --output json --report-dir ./epunkine-reports
- name: Upload report
if: always()
uses: actions/upload-artifact@v4
with:
name: epunkine-report
path: ./epunkine-reports/ - name: Run epunkine CI
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
run: epunkine ci --fail-on highmodel:
provider: bedrock
name: us.anthropic.claude-sonnet-4-20250514-v1:0All standard AWS authentication methods are supported:
- IAM role (EC2 / ECS / Lambda / GitHub Actions OIDC)
- Environment variables (
AWS_ACCESS_KEY_ID+AWS_SECRET_ACCESS_KEY) - AWS CLI profile (
~/.aws/credentials)
model:
provider: openai
name: gpt-4oSet the OPENAI_API_KEY environment variable:
export OPENAI_API_KEY=sk-...
epunkine inspectThe Anthropic Direct API (provider: anthropic) is not currently supported by the Strands Agents TypeScript SDK used internally.
To use Claude models, choose provider: bedrock.
MIT License — see LICENSE for details.