Thanks for your interest in contributing! cue is an open-source CLI that manages agent profiles for Claude Code and Codex.
# Clone
git clone https://github.com/recodeee/cue.git ~/Documents/cue
cd ~/Documents/cue
# Install deps (requires bun >= 1.0)
bun install
# Run tests
bun test
# Run cue locally
bun src/index.ts status
bun src/index.ts list- Bun >= 1.0 — bun.sh
- Git — for cloning and version control
- Node.js >= 20 (optional, for npm-based MCPs)
cue/
├── src/ # CLI source (TypeScript, runs via Bun)
│ ├── index.ts # Entry point + arg routing
│ ├── commands/ # One file per subcommand
│ └── lib/ # Shared libraries (resolver, materializer, etc.)
├── profiles/ # Profile definitions (YAML)
├── resources/
│ ├── skills/skills/ # Skill library (SKILL.md + assets per skill)
│ ├── mcps/ # MCP server configs
│ └── icons/ # Brand icons for TUI (64x64 PNG)
├── plugins/cue/ # Claude Code plugin (/cue slash commands)
├── bin/cue # Shell launcher (resolves bun + runs src/index.ts)
├── install.sh # Interactive installer
├── get.sh # One-line curl installer
└── docs/ # Architecture docs
# Run any cue command directly
bun src/index.ts <command> [args...]
# Examples
bun src/index.ts status
bun src/index.ts list
bun src/index.ts validate --all
bun src/index.ts doctor# Run all tests
bun test
# Run a specific test file
bun test src/lib/kitty-image.test.ts
# Run tests matching a pattern
bun test --filter "loadProfile"Tests live alongside their source files (foo.ts → foo.test.ts). We use Bun's built-in test runner.
- Create
src/commands/my-command.tsexportingrun(args: string[]): Promise<number> - Register it in
src/commands/_index.ts - Add tests in
src/commands/my-command.test.ts
- Create
resources/skills/skills/<category>/<slug>/SKILL.md - Use frontmatter for metadata:
--- description: "When user asks X, do Y" requires_mcps: [] allowed-tools: [] ---
- Add reference files alongside SKILL.md if needed
- The skill is auto-discovered by the resolver
# Add entry to resources/icons/generate-icons.py BRANDS dict, then:
uv run --with Pillow --with cairosvg python3 resources/icons/generate-icons.py <name>Icons are 64x64 RGBA PNGs rendered from Simple Icons SVGs.
- TypeScript, ESM modules (
import/export) - No semicolons in the codebase? Check existing files and match
- Prefer
node:fs/promisesfor async,node:fssync only in hot paths - Error classes for typed failures (see
resolver-npx.tsfor examples) - Lazy imports in commands to keep cold start fast
- One concern per PR — don't mix features with refactors
- Tests required for new commands and library functions
- Run
bun testbefore submitting — all 149+ tests must pass - Keep the README updated if you add user-facing features
- Profile changes — if you modify
profiles/, runcue validate --all
claude (shim) → cue launch claude
→ resolveProfileForCwd() # .cue-profile lookup
→ loadProfile() # YAML parse + inheritance
→ materializeRuntime() # hash check → symlink skills + write settings
→ exec(real claude binary) # hand off to the real agent
The materializer uses content-addressed hashing — if the profile hasn't changed, launch is a stat + sha256 compare (< 5ms overhead).
--cue-profile Xflag (explicit).cue-profilefile in cwd (walk up to $HOME)- Repo-level default (
.cue-profileat git root) - Global default (
~/.config/cue/default-profile) - TUI picker (interactive fallback)
| Module | Purpose |
|---|---|
cwd-resolver.ts |
Find which profile applies to the current directory |
profile-loader.ts |
Parse YAML, resolve inheritance chains |
runtime-materializer.ts |
Build isolated config dirs with symlinked skills |
resolver-local.ts |
Find skills on disk by slug |
resolver-npx.ts |
Fetch + cache skills from GitHub repos |
brand-icons.ts |
Map skills/MCPs to terminal icons |
manifest-cache.ts |
Cache resolved profiles for fast repeat launches |
- Include
cue --versionandbun --version - Include
cue doctoroutput if relevant - For launch issues, include
cue launch claude --dry-runoutput
MIT — see LICENSE.