Thank you for your interest in contributing! This guide covers everything you need to get the project running locally and submit changes.
- Getting Started
- Project Structure
- Development Workflow
- Code Style
- Testing
- Submitting a Pull Request
- Reporting Bugs
- Node.js 20+
- pnpm 9+ (
npm install -g pnpm) - A working Claude Code installation (optional — only needed to test the full MCP integration)
git clone https://github.com/<your-username>/Marionette.git
cd Marionettepnpm installIf this fails at the
better-sqlite3oresbuildnative build step, see the troubleshooting section in the README.
pnpm devThis starts four processes concurrently:
| Service | URL | Package |
|---|---|---|
| Backend (HTTP + WebSocket) | http://localhost:8787 | apps/server |
| Frontend (React + Vite HMR) | http://localhost:5173 | apps/web |
| API Proxy | http://localhost:8788 | packages/api-proxy |
| File Watcher | — | packages/file-watcher |
Or start individual services:
pnpm dev:server # backend only
pnpm dev:web # frontend only
pnpm dev:proxy # api-proxy only
pnpm dev:watcher # file-watcher onlyThe SQLite database is created automatically at db/marionette.db on first run. To apply migrations manually:
pnpm --filter marionette-server migrateapps/
server/ Express + SQLite backend — REST API + WebSocket (port 8787)
web/ React dashboard (Vite, port 5173 in dev)
packages/
shared/ TypeScript types shared across all packages
mcp-server/ MCP stdio server — Claude Code connects here to emit events
file-watcher/ Watches ~/.claude/projects/**/*.jsonl for live session data
api-proxy/ HTTP proxy that sits between Claude Code and the Anthropic API
hooks/ Claude Code lifecycle hooks (session-start, stop, error)
scripts/
install.sh / install.ps1 One-liner installers
build-release.sh / .ps1 Release archive builders
See apps/web/ARCHITECTURE.md for frontend-specific conventions.
feat/<short-description> new feature
fix/<short-description> bug fix
chore/<short-description> tooling, deps, refactoring
docs/<short-description> documentation only
- Create a branch from
master - Make your changes
- Run the checks below before pushing
- Open a pull request
We use ESLint for linting and Prettier for formatting.
pnpm lint # lint all packages
pnpm format # format all files in place
pnpm format:check # check formatting without writing (used in CI)Key conventions:
- TypeScript strict mode — no
any, no unused variables - ES modules throughout (
"type": "module"in all packages) - Double quotes, 2-space indent, trailing commas (enforced by Prettier)
pnpm test # run all tests across the workspaceRun tests for a specific package:
pnpm --filter @marionette/file-watcher test
pnpm --filter @marionette/hooks test
pnpm --filter marionette-web testWatch mode (re-runs on file changes):
pnpm --filter @marionette/file-watcher test:watchWhen adding new functionality, please add tests alongside your code. Test files live in __tests__/ directories next to the source they cover.
- Make sure all checks pass locally:
pnpm build pnpm lint pnpm test - Push your branch and open a PR against
master - Fill out the PR template — describe what changed and why
- A maintainer will review your PR, leave feedback, and merge when ready
Keep PRs focused. One feature or fix per PR makes reviewing easier.
Use GitHub Issues and fill out the bug report template. Include:
- OS and Node.js version
- Steps to reproduce
- What you expected vs. what happened
- Relevant log output (check
marionette statusand the terminal where you ranmarionette start)
Open a GitHub Discussion or file an issue.