Package Exports
- turkeycode
- turkeycode/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (turkeycode) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
๐ฆ TurkeyCode
Describe it. Build it. Deploy it.
One prompt โ fully researched, planned, built, and QA'd application. No babysitting, no copy-paste, no "it works on my machine."
TurkeyCode is an open-source build orchestrator that turns a plain English description into a production-ready app โ complete with automated QA, code review, and bug fixes.
npx turkeycode run "Build a job board with employer dashboards, \
applicant tracking, and Stripe payments"Then go make coffee. Come back to a working app.
How It Works
TurkeyCode doesn't write code. It orchestrates Claude Code through a deterministic pipeline โ research, plan, build, test, fix, review โ with hard gates between every step. No AI decides what happens next. The orchestrator does.
You: "Build me a recipe sharing app"
โ
โโโ ๐ Research โ tech stack, architecture, prior art
โโโ ๐ Plan โ 2-5 build phases with deliverables
โ
โโโ FOR EACH PHASE:
โโโ ๐๏ธ Build โ one focused coding session
โโโ ๐งช QA โ smoke โ functional โ visual (parallel)
โโโ ๐ง Fix โ all issues in one session, full context
โโโ ๐ Retry โ up to 5 QA cycles until clean
โโโ ๐ Review โ code review with actionable feedback
โโโ โ
Merge โ PR merged to main, next phaseEvery transition has an artifact gate โ a file that must exist with valid content before the pipeline moves forward. No hallucinated progress. No skipped steps.
Built with TurkeyCode ๐ฆ
| App | What it does | Link |
|---|---|---|
| HomeChef | Recipe and meal planning app | homechef.turkeycode.ai |
| Roast My Repo | Paste a GitHub URL, get your repo graded on code quality, docs, CI, and security | coming soon |
Built something with TurkeyCode? Open a PR to add it here.
Quick Start
Prerequisites
- Claude Code installed and authenticated
- Claude Max subscription ($100/mo) or Anthropic API key
- Node.js 20+
- Git
Install
# From npm
npx turkeycode run "your app description"
# Or install globally
npm install -g turkeycode
# From source
git clone https://github.com/rangerchaz/turkey-enterprise-v3.git
cd turkey-enterprise-v3
npm install
npm run build
npm linkRun Your First Build
mkdir my-app && cd my-app
turkeycode run "Build a bookmark manager with tags, search, \
and a Chrome extension. Stack: Next.js, Tailwind, SQLite."Any Stack. Any Platform.
TurkeyCode doesn't care what you're building with.
# Node/Next.js
turkeycode run "SaaS dashboard with Stripe billing"
# Python/FastAPI
turkeycode run "REST API for inventory management. FastAPI + SQLAlchemy + Postgres."
# Go
turkeycode run "CLI tool that monitors Docker containers. Go + Cobra."
# Rust
turkeycode run "URL shortener. Rust + Axum + SQLite."
# Static site
turkeycode run "Portfolio site with dark mode. HTML + Tailwind + Alpine.js."
# Bring your own Dockerfile
turkeycode run "Build a microservice" --spec spec.mdIt builds wherever Claude Code runs โ Mac, Linux, Docker, cloud VMs. No lock-in.
With a Spec File
turkeycode run "Build a project management tool" --spec spec.mdResume a Build
turkeycode resumeCheck Status
turkeycode statusSpawning Long-Running Builds
Builds can take 30-60+ minutes. To run in the background:
cd /path/to/project
setsid nohup turkeycode run "your description" --verbose \
> build.log 2>&1 < /dev/null &โ ๏ธ Important: Use
setsidto create a new session group. Plainnohup &is not enough โ most process managers and shell session cleanups will kill the process group on disconnect.setsidfully detaches it.
Monitor progress:
tail -f build.log # live log
turkeycode status # structured status
ps aux | grep turkeycode # check it's aliveKey Design Principles
๐ฏ One Session = One Job
Each Claude session gets a single, scoped prompt. Build ONE phase. Run ONE QA tier. Fix ALL issues in one shot. No sprawling multi-hour sessions that lose context.
๐งฑ Gates Are Walls
Between every step, the orchestrator checks for specific artifacts on disk. If they don't exist or are invalid: hard stop. Not a warning. This is what makes it reliable.
๐ฆ Phases Over Tickets
No Jira-style ticket fragmentation. Each phase has a name, scope, deliverables, and acceptance criteria. The build agent gets full context. One phase = one coherent chunk of work.
๐ง Fix Agents See Everything
Fix sessions get the comprehensive picture: phase deliverables, all blockers, all warnings, smoke report, and previous attempt history. One session fixes everything coherently.
๐๏ธ Visual QA Has Memory
On attempt 2+, visual QA gets the previous report so it verifies fixes instead of inventing new cosmetic nits. Consistency across attempts.
โ๏ธ Blockers vs Warnings
Blockers = broken functionality, dead elements, failed acceptance criteria. Warnings = cosmetic polish. Zero blockers = pass, regardless of warning count.
Architecture
project/
โโโ .turkey/ # Build state (gitignored)
โ โโโ state.json # Current phase, QA attempts, etc.
โ โโโ audit.log # Timestamped event log
โ โโโ reference/
โ โ โโโ specs.md # Research output
โ โ โโโ research.done # Gate artifact
โ โโโ phase-plan.json # 2-5 phases with deliverables
โ โโโ phases/
โ โ โโโ phase-1.done # Build completion gate
โ โโโ qa/
โ โ โโโ phase-1/
โ โ โโโ smoke-1.md # Smoke test report
โ โ โโโ functional-1.md # Functional test report
โ โ โโโ visual-1.md # Visual test report
โ โ โโโ verdict-1.json # Pass/fail decision
โ โ โโโ fixes-1.md # Fix report
โ โโโ screenshots/ # Visual QA captures
โ โโโ reviews/ # Code review reports
โ โโโ aar/ # After-action reviews
โโโ src/ # Your app's source codeStack-Agnostic โ Build & Deploy Anything
TurkeyCode auto-detects your project and adapts. Build with any stack, deploy with turkey deploy.
| Runtime | Stacks | Database Detection |
|---|---|---|
| Node.js | Next.js, Express, Fastify, Nest, Hono | Prisma, Drizzle, Mongoose, Knex |
| Python | FastAPI, Django, Flask, Starlette | SQLAlchemy, Django ORM, Tortoise |
| Go | Gin, Echo, Fiber, Chi, stdlib | GORM, sqlx, ent |
| Ruby | Rails, Sinatra, Hanami | ActiveRecord |
| Rust | Axum, Actix, Rocket, Warp | Diesel, SQLx, SeaORM |
| PHP | Laravel, Symfony, Slim | Eloquent, Doctrine |
| Static | HTML, Tailwind, Alpine.js, Astro | โ |
| Docker | Bring your own Dockerfile | Auto-detected |
The quick-check system installs missing prerequisites, starts Docker services, verifies DB connections, checks compilation, and confirms the server starts โ all before the first QA agent runs.
Options
turkeycode run <description> # Start a new build
turkeycode resume # Resume from last checkpoint
turkeycode status # Show current state
turkeycode reset --force # Nuke state, start fresh
Options:
--spec <file> Spec file for additional context
--verbose Show detailed output
--allow-warnings Let cosmetic warnings pass QA
--jira <project> Create Jira tickets per phase
--github <owner/repo> Create PRs per phaseDeploy
Built something? Ship it.
# Authenticate (once)
turkey login
# Deploy to turkeycode.ai
turkey deploy
# โ โ
Live at https://my-app.turkeycode.ai
# Deploy with a specific tier
turkey deploy --tier starter
# Deploy with a custom subdomain
turkey deploy --name cool-app
# Deploy with env vars
turkey deploy --env .env.productionHosting tiers:
| Tier | Price | What you get |
|---|---|---|
| Free | $0/mo | Static hosting, subdomain, sleeps on idle |
| Starter | $12/mo | Full stack (DB + Redis), always-on |
| Pro | $29/mo | + Stripe, Auth, S3, Email, background jobs, custom domain |
| Business | $49/mo | + Priority support, daily backups, analytics |
# List your deployed apps
turkey apps
# Check app status
turkey apps status my-app
# Tail logs
turkey apps logs my-app
# Tear down
turkey apps delete my-appThe CLI auto-detects your stack, generates a Dockerfile if needed, packages your app, and deploys it. If a Dockerfile already exists, it's used as-is.
Non-Web Projects
Built a CLI, library, or desktop app? Deliver it to your GitHub instead:
# Push to your GitHub with compiled binaries
turkey deliver
# Public repo
turkey deliver --public
# Custom name
turkey deliver --name my-cool-cliUses your gh CLI auth โ no extra tokens needed. Go projects get cross-compiled for Linux, macOS, and Windows. Rust projects get a native release build. A GitHub release is created automatically with the binaries.
Free tool builds your app. turkeycode.ai hosts it for you.
Setup
Option A: Claude Max / Pro (Recommended โ no API key needed)
If you have a Claude Max or Pro subscription:
# Install the Claude CLI and log in
npm install -g @anthropic-ai/claude-code
claude login
# That's it โ TurkeyCode uses your Claude CLI session automatically
turkeycode run "your idea"Option B: API Key
If you prefer using an API key directly:
export ANTHROPIC_API_KEY=sk-ant-your-key-here
turkeycode run "your idea"โ ๏ธ API keys are billed per token and can get expensive for large builds. Claude Max ($100/mo or $200/mo) is unlimited and significantly cheaper for this use case.
GitHub Integration (Optional)
To push builds to GitHub or use turkey deliver:
# Install and authenticate the GitHub CLI
brew install gh # or: apt install gh
gh auth login
# Now you can push builds and deliver non-web projects
turkeycode run "your idea" --github yourname/repo
turkey deliverJira Integration (Optional)
To pull specs from Jira tickets:
export JIRA_HOST=yourcompany.atlassian.net
export JIRA_EMAIL=you@company.com
export JIRA_TOKEN=your-jira-api-tokenGenerate a Jira API token at: https://id.atlassian.com/manage-profile/security/api-tokens
Environment Variables Reference
| Variable | Required | Description |
|---|---|---|
ANTHROPIC_API_KEY |
No* | Anthropic API key. *Not needed if using Claude Max/Pro via claude login |
GH_TOKEN |
No | GitHub token (alternative to gh auth login) |
JIRA_HOST |
No | Jira instance hostname (e.g. company.atlassian.net) |
JIRA_EMAIL |
No | Jira account email |
JIRA_TOKEN |
No | Jira API token |
Gate Reference
| Gate | Artifact | Validation |
|---|---|---|
| research | reference/research.done |
exists, specs.md > 200 chars |
| plan | phase-plan.json |
valid JSON, 2-5 phases |
| build | phases/phase-N.done |
exists |
| qa-smoke | qa/phase-N/smoke-M.done |
exists |
| qa-functional | qa/phase-N/functional-M.done |
exists |
| qa-visual | qa/phase-N/visual-M.done |
exists |
| qa-verdict | qa/phase-N/verdict-M.json |
0 blockers |
| code-review | reviews/phase-N.md |
exists |
| aar | aar/phase-N.done |
exists |
Docker
docker build -t turkeycode .
docker run -it --rm \
-v $(pwd)/workspace:/workspace \
-e ANTHROPIC_API_KEY=$ANTHROPIC_API_KEY \
turkeycode run "Build a todo app"Troubleshooting
Build seems stuck? Check build.log or run turkeycode status. Each QA cycle can take a few minutes โ 5 cycles per phase is normal.
"Claude not found" error? Make sure Claude Code is installed: npm install -g @anthropic-ai/claude-code then claude login.
QA keeps failing? Try --allow-warnings to let cosmetic issues pass. If it's looping on real bugs, check .turkey/qa/ for the latest report.
Process killed on disconnect? Use setsid nohup turkeycode run ... < /dev/null & โ see Spawning Long-Running Builds.
Need to start over? turkeycode reset --force nukes the .turkey/ state directory.
Contributing
PRs welcome. The orchestrator is intentionally simple โ it's a deterministic loop, not an AI agent. Keep it that way.
- Prompts:
src/prompts/โ the build, QA, and planning instructions - Gates:
src/gates.tsโ artifact validation logic - Orchestrator:
src/orchestrator.tsโ the main loop - Tests:
npm testโ 98 tests across 8 modules
Please include tests for new features.
License
MIT
turkeycode.ai ยท Built with <๐ฆ/> by @rangerchaz