Skip to content

salmi-dev/dev-coach

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

53 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸŽ“ Dev Coach

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  πŸŽ“ DEV COACH                       β”‚
β”‚  AI-powered coding coach             β”‚
β”‚                                      β”‚
β”‚  Ask Β· Explain Β· Compare Β· Sandbox   β”‚
β”‚  Review Β· Project Β· Stats            β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Your personal AI-powered coding coach. Ask questions, explore topics, review code, build mini-projects, and track your learning progress.

Installation

From JSR (recommended)

deno install -g --allow-read --allow-write --allow-env --allow-run --allow-ffi jsr:@salmidev/dev-coach

From source

git clone https://github.com/salmi-dev/dev-coach
cd dev-coach
deno task install

First run

coach init

Supported runtimes

@salmidev/dev-coach runs on Deno, Bun, and Node.js. The CLI itself is distributed for Deno; the library API works on all three.

Runtime Status SQLite driver
Deno β‰₯ 2.0 βœ… first-class (CLI + library) jsr:@db/sqlite (FFI)
Bun β‰₯ 1.1 βœ… library built-in bun:sqlite
Node.js β‰₯ 22 βœ… library built-in node:sqlite (Node β‰₯ 22.5) or better-sqlite3 fallback
Browsers / Cloudflare Workers ❌ n/a (filesystem + native SQLite required)

Node 22 itself ships node:sqlite only behind --experimental-sqlite; the adapter falls back to better-sqlite3 if you have it installed. Node 24 supports node:sqlite out of the box.

// Same import on every runtime
import { loadConfig, saveItem, search } from '@salmidev/dev-coach';

Under the hood, src/utils/runtime/ and src/db/sqlite/ dispatch to per-runtime adapters at module load β€” application code never sees Deno.*, Bun.*, or node:* directly. See openspec/changes/boost-jsr-score-and-runtime-compat/specs/runtime-compat/spec.md for the contract (will move to openspec/specs/runtime-compat/spec.md when the change is archived).

Skills

╺━╸ coach:ask β€” Quick Q&A

coach ask "how to reverse a list in python"

Get a concise answer. Commands are auto-detected for clipboard copy. Save answers as TLDRs.

πŸ“– coach:explain β€” Deep Dive

coach explain "closures in rust"

5-layer explanation: one-liner β†’ core concept β†’ how it works β†’ example β†’ gotchas. Cross-references your library.

βš– coach:compare β€” Side by Side

coach compare "REST vs GraphQL for mobile"

ASCII comparison table with dimensions, verdict, and code examples.

⧉ coach:sandbox β€” Explore & Collect

coach sandbox "error handling in rust"

Multiple approaches to a topic. Batch-select which to save as snippets.

β—‰ coach:review β€” Code Review

coach review ./src/main.rs
cat broken.py | coach review

Structured review: πŸ› Bugs, 🎨 Style, ⚑ Performance, πŸ”’ Security, πŸ“ Architecture, ✨ Refactored version, πŸ“Š Score.

βš™ coach:project β€” Mini Project Builder

coach project "CLI that converts CSV to JSON"

4-phase flow: clarify β†’ plan β†’ implement β†’ wrap-up. Produces a runnable project.

πŸ“Š coach:stats β€” Learning Dashboard

coach stats              # Monthly dashboard
coach stats weekly       # This week
coach stats lang rust    # Language-specific
coach stats topics       # Top topics
coach stats profile      # Inferred profile

Browsing your library

Saved snippets and TLDRs are first-class CLI citizens β€” list, view, search, edit, or delete them without ever leaving the terminal.

coach tldr                       # Interactive picker over all TLDRs
coach tldr list                  # Print all TLDRs (slug β€” title β€” tags)
coach tldr show reverse-a-list   # Render a TLDR (paged when interactive)
coach tldr search json           # Full-text search within TLDRs
coach tldr edit reverse-a-list   # Open in $EDITOR, auto re-index on save
coach tldr path reverse-a-list   # Print absolute path (useful in shell pipes)
coach tldr delete reverse-a-list # Confirm + remove (use --yes to skip prompt)

coach snippet                    # Same actions for snippets
coach snippet show parse-json    # Resolves across all language subfolders

Fuzzy slug resolution kicks in when you don't remember the exact name: coach tldr show parse will match a unique prefix, or open a picker when several items match.

Quick-access aliases

Install short aliases (c-tldr β†’ coach tldr, c-snip β†’ coach snippet) into your shell rc:

coach install-aliases     # Append fenced block to ~/.zshrc or ~/.bashrc
coach uninstall-aliases   # Cleanly remove the block

# Then:
c-tldr                    # picker
c-tldr search json
c-snip show parse-json

coach init also offers to install the aliases for you on first run.

Configuration

Config lives at ~/.config/dev-coach/config.yaml:

library_path: ~/dev-coach # Where snippets, tldrs, projects are stored
primary_languages: # Your preferred languages
  - typescript
  - rust
frameworks: # Your tools/frameworks
  - deno
  - react
response_style: concise # concise | detailed | examples-first

Library Structure

~/dev-coach/
β”œβ”€β”€ README.md                    # Auto-generated dashboard
β”œβ”€β”€ snippets/
β”‚   β”œβ”€β”€ rust/
β”‚   β”‚   └── json-parse.md
β”‚   └── typescript/
β”‚       └── zod-validation.md
β”œβ”€β”€ tldr/
β”‚   β”œβ”€β”€ docker-basics.md
β”‚   └── git-advanced.md
└── projects/
    └── csv-to-json/
        β”œβ”€β”€ README.md
        └── main.ts

Pi Integration

Install skills into your project for use with pi, codex, or GitHub agents:

coach install-pi          # Auto-detects .pi/, .codex/, .github/
coach install-pi --dir ./custom/skills
coach uninstall-pi        # Remove skills

Available Pi Tools

Tool Description
coach-save Save a snippet/tldr/project to library
coach-search Search the library by text, tags, type
coach-copy Copy text to system clipboard
coach-log Log a session to the database

Data Storage

What Where
Config ~/.config/dev-coach/config.yaml
Database ~/.local/share/dev-coach/coach.db
Library ~/dev-coach/ (configurable)

Follows XDG Base Directory Specification.

Development

deno task dev              # Run CLI in dev mode
deno task test             # Run tests
deno task verify           # Quality gate (see below)
deno task build            # Compile binary

JSR package & overview

Published at @salmidev/dev-coach on JSR. The JSR landing page (the "Overview" tab) is rendered from the module-level JSDoc at the top of mod.ts β€” not from this README. This is pinned via publish.readmeSource: "jsdoc" in deno.json.

If you edit mod.ts's top JSDoc you are editing the JSR landing page. Keep the overview block dense, code-heavy, and library-focused (three @example blocks minimum). This README stays as the GitHub-side long-form doc covering CLI install, skills, and configuration.

We target a 100% JSR score for the package; current breakdown is visible at the JSR package URL above.

Quality gate

deno task verify is the single command that gates a change before archive. It runs, in order:

  1. deno fmt --check β€” enforces 160-col / single-quote / semicolon style.
  2. deno lint β€” zero errors required.
  3. deno task coverage:report β€” full test suite with coverage instrumentation (writes cov_profile/).
  4. deno task coverage:check β€” fails when overall line coverage of src/ falls below 80%.

Steps 3 and 4 are also exposed as standalone tasks so CI can run the test pass once and check the threshold separately (see .github/workflows/pipeline.yml) without a second deno test invocation. Locally, deno task verify chains them.

The threshold lives in scripts/check-coverage.ts as a single constant (THRESHOLD = 80). Update it there and nowhere else. The same 80% bar applies to the cross-runtime suite on Bun and Node β€” see below. Every OpenSpec change's tasks.md ends with a deno task verify step so regressions can't slip in silently.

Run cross-runtime gates locally

The Bun and Node cross-runtime jobs in CI are reproducible locally via two small driver scripts. Both run the curated suite under tests/cross-runtime/, collect lcov coverage, and gate on β‰₯ 80% line coverage of the cross-runtime preset (src/utils/runtime/**, src/db/sqlite/**, src/utils/prompt.ts):

deno task test:bun     # bash scripts/test-bun.sh   (needs `bun` on PATH)
deno task test:node    # bash scripts/test-node.sh  (needs Node β‰₯ 22 on PATH)

CI calls these same scripts β€” the local and CI execution paths are a single recipe and cannot drift.

Documentation

User-facing pages are mirrored from docs/ to the GitHub wiki by the Sync Wiki workflow on every push to main. Edit docs/*.md on a branch and open a PR β€” wiki edits made via the UI are overwritten on the next sync.

License

MIT

About

πŸŽ“ AI-powered coding coach CLI β€” ask, explain, compare, sandbox, review code, build mini-projects, track learning. Deno-native, runs on Bun & Node β‰₯22.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors