Documentation Index
Fetch the complete documentation index at: https://docs.automagik.dev/llms.txt
Use this file to discover all available pages before exploring further.
Contributing
Genie is built with Bun and TypeScript. This guide covers setting up a development environment, running quality gates, and building plugins. We build in public because that’s the only honest way to build developer tools.Development Setup
Prerequisites
Clone and Install
Build
Genie bundles to a single file for distribution:dist/genie.js (~305KB minified) with all dependencies inlined. The shebang #!/usr/bin/env bun makes it directly executable. No runtime dependencies need to be co-located.
Run from Source
During development, run directly from source:genie command to point at your source:
Code Style
Genie uses Biome for formatting and linting.| Rule | Setting |
|---|---|
| Quotes | Single quotes |
| Indentation | 2 spaces |
| Line width | 120 characters |
| Trailing commas | Always |
| Commits | Conventional commits (commitlint) |
No console.log
console.log is banned in source files via a Biome rule. Use structured logging or the CLI output functions instead. The rule is relaxed in test files.
Quality Gates
Run the full quality gate with:| Gate | Command | What It Checks |
|---|---|---|
| Type check | bun run typecheck | tsc --noEmit — all type errors |
| Lint | bun run lint | Biome rules — formatting, code quality |
| Dead code | bun run dead-code | bunx knip — unused exports, dependencies |
| Tests | bun test | All *.test.ts files |
bun run dead-code (knip) has pre-existing false positives for biome, commitlint, and husky devDeps. These are not regressions.Running Individual Gates
Testing
Framework
Tests usebun:test (import from 'bun:test').
Conventions
| Convention | Detail |
|---|---|
| File pattern | Colocated *.test.ts next to source |
| Fixtures | tmpdir with cleanup in afterEach |
| Git tests | Real git repos in /tmp, not mocks |
| Concurrency | Promise.allSettled() pattern |
| Isolation | Set process.env.GENIE_HOME to tmpdir |
Example Test
Project Structure
Plugin Development
Genie supports plugins that extend the CLI with additional commands, hooks, and skills.Plugin Structure
Plugin Registration
Plugins are registered inopenclaw.plugin.json at the repo root:
Adding Skills
Skills are markdown files that define agent behavior. To add a new skill:- Create
skills/<skill-name>/SKILL.md - Add frontmatter with
name,description, and optionaltriggers - Write the skill prompt in the body
Commit Conventions
Genie uses conventional commits enforced by commitlint:| Prefix | Use |
|---|---|
feat: | New features |
fix: | Bug fixes |
chore: | Maintenance |
docs: | Documentation |
refactor: | Code restructuring |
test: | Test additions/fixes |
Branch Naming
PR Workflow
- Branch from
dev - Make changes, commit with conventional messages
- Push and create PR targeting
dev - Human reviews and merges
dev→mainwhen ready
Known Gotchas
- File lock timeout force-removes are intentional — prevents deadlocks from crashed processes. The
open('wx')after unlink is atomic, so only one process wins. - Hook dispatch has a 15-second hard timeout — handlers that exceed this silently timeout.
- System prompt injection can fail silently — if the prompt file write fails, Claude Code dies on startup trying to read it.
- Mailbox delivery is best-effort — dead pane = message stays
deliveredAt: nullforever.
Community
Genie is open source and we want your help — code, docs, bug reports, wild ideas, even polite disagreements about our architecture choices. Especially those, actually.Discord
Chat with contributors, ask questions, share what you’re building.
GitHub
Issues, PRs, and the code itself. Star if you’re feeling generous.