- Bun >= 1.0.0
- Git
- pre-commit (optional, for git hooks)
git clone https://github.com/luongnv89/agent-skill-manager.git
cd agent-skill-manager
npm installnpm start # Launch the TUI
npm run dev # Same as start (alias)To test CLI commands during development:
npm run bin/agent-skill-manager.ts list
npm run bin/agent-skill-manager.ts search "my-skill"
npm run bin/agent-skill-manager.ts audit --json
npm run bin/agent-skill-manager.ts --helpnpm test # Run all tests
npm run typecheck # Type-check without emittingTest files are co-located with source files using the *.test.ts convention:
| Test File | Coverage |
|---|---|
src/cli.test.ts |
Argument parsing, command dispatch |
src/config.test.ts |
Config loading, merging, saving |
src/scanner.test.ts |
Directory scanning, filtering, sorting |
src/auditor.test.ts |
Duplicate detection, instance ranking |
src/uninstaller.test.ts |
Removal plan building, file cleanup |
src/formatter.test.ts |
Table, detail, and JSON formatting |
src/utils/frontmatter.test.ts |
YAML frontmatter parsing |
The project uses pre-commit with:
- trailing-whitespace — removes trailing whitespace
- end-of-file-fixer — ensures files end with a newline
- check-yaml / check-json — validates config files
- check-added-large-files — prevents accidental large file commits
- prettier — auto-formats TS, JS, JSON, CSS, and MD files
- typecheck — runs
tsc --noEmiton staged TypeScript files
Install hooks locally:
pre-commit installSince this is a TUI application, standard console.log will interfere with the terminal UI. For debugging:
- Write to a log file:
Bun.write("/tmp/sm-debug.log", JSON.stringify(data)) - Run tests to isolate logic from the TUI layer
- Use CLI commands to test core logic without launching the TUI:
npm run bin/agent-skill-manager.ts list --json npm run bin/agent-skill-manager.ts audit --json
- Use the
--helpflag to verify CLI plumbing without launching the TUI
See ARCHITECTURE.md for the full component breakdown and data flow diagrams.