CodePuppet is a self-hosted platform for running AI coding agents against your own codebase, using your own LLM API keys — the backend only ever stores and uses credentials a user has explicitly saved, never a shared key. It's split into three pieces that share a common backend contract: an Express + Prisma API that owns agent sessions and encrypted credentials, a local CLI that executes file/process/git tools on the developer's own machine, and a Next.js web app for account sign-up and approving CLI device-login requests.
A Turborepo/Bun monorepo: apps/api (Express + Prisma/Postgres) owns users, encrypted credentials and agent sessions; apps/cli is a local Node CLI that executes tools in the developer's own workspace; apps/web is a Next.js app for sign-in and device-login approval. Six shared workspace packages sit underneath — database, protocol (Zod schemas), provider-registry (one streaming adapter per LLM provider), tool-registry, harness (the CLI's local API client/config store), and a shared shadcn/ui component library.
apps/apiExpress + Prisma/Postgres backend — owns users, encrypted provider credentials, and the full lifecycle of an agent session.apps/cliNode CLI (code-puppet) that developers install locally, log in from, and run agent sessions from inside a real workspace, executing tools on their own machine.apps/webNext.js app for account sign-up/sign-in and approving CLI device-login requests in the browser.bun install
docker compose -f infra/docker-compose.database.yml up -d
cp apps/api/.env.example apps/api/.env cp apps/cli/.env.example apps/cli/.env
bun run db:migrate:dev bun run db:seed
bun run dev