Getting Started
opty is a local-first CLI for AI agent configuration files. This page is generated from the main repository README so the install path and command surface stay in sync.
Install
bash
npm install -g optymdOr use directly:
bash
npx optymd scan .
npx optymd scan CLAUDE.mdCore workflow
opty init claude → scaffold config for your platform (claude | openclaw)
opty scan . → detect files, find issues, show report
opty score . → calculate quality score (0-100) and grade (A-F)
opty fix --dry-run → preview what will be fixed
opty fix . → apply safe fixes (backup created automatically)
opty restore → undo last fix from backup
opty verify . → compare repo rules with local git, workflow, and GitHub evidence
opty verify . --json → emit machine-readable verify output
opty verify . --fail-on-violations → exit with code 2 when any verify rule is violatedEvery fix creates a timestamped backup in .opty/backups/. Restore any snapshot with opty restore --id <timestamp>. For CI usage, opty verify . --fail-on-violations keeps the normal report output and returns exit code 2 when at least one rule is VIOLATED.
First report
$ opty scan .
opty scan - claude
________________________________________________________
5 files | Score: 72/B | 1 critical 4 warnings
TRUNCATED FILES (content silently cut off)
x skills/bureau-dev/SKILL.md 2969/2000 (33% lost) trim ~969 tokens
DEAD REFERENCES (4 broken paths)
! `skill.md` (referenced 2x)
! `tailwind.config.js`
! `heartbeat.md`
NOTABLE FILES
Best:
A CLAUDE.md 92 no issues
B skills/drizzle-ops/SKILL.md 74 no issues
D skills/bureau-dev/SKILL.md 47 2 minor issues
BY TYPE
agent 1 file avg ##########---- 92
skill 3 files avg ######------ 53
config 1 file avg ########---- 80
FIX PRIORITY
1. Trim 1+ files exceeding token limits
2. Remove 4 dead file/script references
3. Add scope boundaries to 2 skills
Run opty fix to auto-fix safe issues (secrets, verbose phrases, duplicates)