AI-Powered SWE Agent
A monorepo containing the Supercode dashboard, documentation, terminal web client, CLI coding agent, and shared packages.
Supercode is a full-stack AI-powered development platform built as a Bun + Turborepo monorepo. It includes a web dashboard, an MDX documentation site, an AI coding agent CLI, a terminal-style web client, and a parallel project for fine-tuning open-source LLMs.
- Dashboard (
apps/web) β Next.js dashboard for managing repositories, viewing analytics, and GitHub OAuth - Documentation (
apps/docs) β MDX-based documentation site - Terminal Web Client (
apps/supercode-cli/client) β Browser UI that mirrors the CLI experience - Supercode CLI (
apps/supercode-cli/server) β AI-powered coding agent published to npm assupercode - API Server (
apps/api) β Scaffolding for a shared backend - Open Model (
supercode-openmodel/) β Fine-tuning open-source LLMs (Qwen3, GLM-4) for coding tasks
This is a monorepo managed with Turborepo and Bun workspaces. Workspaces are defined in package.json as apps/*, apps/supercode-cli/*, and packages/*.
| App | Description | Port |
|---|---|---|
apps/web |
Next.js 16 dashboard (supercli.com) | 3000 |
apps/docs |
Next.js MDX documentation site | 3001 |
apps/supercode-cli/client |
Terminal web client UI (Next.js) | 3002 |
apps/supercode-cli/server |
AI coding agent β also published as the supercode npm CLI |
β |
apps/api |
Shared API server (scaffolded) | TBD |
| Package | Description |
|---|---|
@super/db |
Prisma client + schema for the dashboard database |
@super/auth |
Better-Auth configuration (server + client) |
@super/ui |
Shared UI components |
@super/sdk |
Internal SDK |
@super/config |
Shared configuration (ESLint, TS, etc.) |
@super/dashboard |
Dashboard-specific component library |
@super/db-terminal |
Prisma client + schema for the terminal CLI's separate database |
@super/claude-sdk |
Claude / Anthropic AI SDK wrapper |
@super/embeddings-sdk |
Embeddings provider SDK (Gemini, etc.) |
@super/skills |
Reusable AI agent skills shared across apps |
The apps/supercode-cli workspace contains two sub-apps that together form the Supercode terminal product:
apps/supercode-cli/
βββ client/ # Next.js 16 web client β terminal.supercli.com
βββ server/ # Bun-powered AI coding agent, exposed as the `supercode` CLI
- Client is a Next.js app that mirrors the terminal experience in the browser, intended to be deployed to
terminal.supercli.com. - Server is a real installable CLI (
supercodeon npm) built with Bun and the AI SDK. It supports multiple model providers (OpenRouter, Anthropic, Google) and ships with a tool system (file read/write, command execution, search, etc.).
Run the CLI locally with:
bun run supercode # dev (from root)
bun run dev:terminal # run the web client
bun run dev:terminal-server # run the CLI dev loopWe're building a coding-focused LLM by fine-tuning open-source models for the Supercode CLI. This project runs in parallel with the main platform.
Fine-tune open models to create an AI assistant specialized in:
- Code generation and completion
- Debugging and error fixing
- Code explanation and documentation
- Multi-language programming support
We're using a dual-track approach to train two models simultaneously:
| Track | Infrastructure | Model | Method | Estimated Cost |
|---|---|---|---|---|
| Track 1 | Tinker (Managed) | Qwen3-8B | LoRA | $150 free credits |
| Track 2 | Modal + Axolotl | GLM-4-9B | LoRA/QLoRA | ~$15-20 |
supercode-openmodel/
βββ training/
β βββ data/ # Dataset preparation scripts
β βββ tinker_qwen3/ # Tinker + Qwen3 training code
β βββ evaluation/ # Model evaluation scripts
βββ models/ # Model checkpoints
βββ config/ # Training configurations
βββ pyrightconfig.json
We use high-quality coding datasets:
| Dataset | Size | Purpose |
|---|---|---|
| CodeAlpaca | 20K | Instruction tuning |
| OpenCodeReasoning | 100K+ | Reasoning + coding |
| CodeFeedback | 156K | Instruction-response |
-
Set up Tinker (Track 1)
pip install tinker export TINKER_API_KEY="your-key" cd supercode-openmodel/training/tinker_qwen3 python train.py
-
Set up Modal (Track 2)
pip install modal modal token new # Configure HuggingFace token in Modal secrets modal run --detach src.train --config=config/glm4.yml
π§ In Progress β Actively training and evaluating models. The best-performing model will be deployed to the Supercode CLI.
- Next.js 16 β React framework with App Router
- React 19 β UI library
- TypeScript 5 β Type safety
- Bun 1.2+ β JavaScript runtime & package manager
- Turborepo 2 β Build system for monorepos
- PostgreSQL β Primary database
- Prisma 7 β Database ORM (separate schemas for
dbanddb-terminal) - Pinecone β Vector database
- Better Auth β Authentication system
- GitHub OAuth β Social login
- Inngest β Event-driven background jobs in
apps/web
- Tailwind CSS v4 β Utility-first CSS
- Radix UI + Base UI β Component primitives
- Framer Motion β Animations
- Lucide Icons β Icon library
- shadcn/ui β Component scaffolding for
supercode-cli/client
- TanStack Query β Server state management
- React Hook Form β Form handling
- Zod β Schema validation
- AI SDK v6 β Unified AI provider interface
- OpenRouter β Multi-model routing
- Anthropic Claude β Default model
- Google Gemini β Embeddings
- Vercel Minimax AI Provider β Additional model provider
- Commander β CLI argument parsing
- Clack + Boxen + Chalk β Terminal UI primitives
- Marked + marked-terminal β Markdown rendering in terminal
-
Clone the repository
git clone https://github.com/yashdev9274/supercli.git cd supercli -
Install dependencies (this also runs
db:generateviapostinstall)bun install
-
Set up environment variables
cp .env.example .env
Edit
.envwith your configuration. At minimum, the dashboard requires:DATABASE_URL="postgresql://..." BETTER_AUTH_SECRET="your-secret-key" BETTER_AUTH_URL="http://localhost:3000" GITHUB_CLIENT_ID="your-github-oauth-id" GITHUB_CLIENT_SECRET="your-github-oauth-secret"
-
Set up the database
cd packages/db bun run db:generate bunx prisma migrate dev cd ../..
-
Start development servers
# Start everything bun run dev # Or start specific apps bun run dev:web # Dashboard on http://localhost:3000 bun run dev:docs # Docs on http://localhost:3001 bun run dev:terminal # Terminal web client bun run dev:terminal-server # CLI agent dev loop
bun run dev:api # API server
6. **Open your browser**
- Dashboard: [http://localhost:3000](http://localhost:3000)
- Documentation: [http://localhost:3001](http://localhost:3001)
### GitHub OAuth Setup
1. Go to [GitHub Developer Settings](https://github.com/settings/developers)
2. Create a new OAuth App
3. Set Authorization callback URL: `http://localhost:3000/api/auth/callback/github` (for local development). In production, use your deployed domain, e.g., `https://your-app.com/api/auth/callback/github`.
4. Copy Client ID and Client Secret to your `.env` file
## Project Structure
supercli/
βββ apps/
β βββ web/ # Dashboard β supercli.com
β β βββ app/ # Next.js App Router pages
β β βββ components/ # React components
β β βββ hooks/ # Custom React hooks
β β βββ lib/ # Utility libraries
β β βββ modules/ # Feature modules
β β βββ inngest/ # Background job functions
β β βββ public/ # Static assets (og-image, etc.)
β β
β βββ docs/ # MDX documentation site
β β βββ app/ # App router pages
β β βββ components/
β β βββ content/ # MDX documentation files
β β βββ lib/
β β
β βββ supercode-cli/
β β βββ client/ # Next.js terminal web UI β terminal.supercli.com
β β β βββ app/
β β β βββ components/
β β β βββ lib/
β β βββ server/ # Bun CLI agent (published as supercode on npm)
β β βββ src/
β β β βββ cli/ # CLI commands + chat loop
β β β βββ service/ # AI provider service layer
β β β βββ tools/ # Tool implementations
β β β βββ lib/ # Shared libraries
β β β βββ config/ # Config + env handling
β β β βββ types/
β β βββ prisma/ # Terminal DB schema (uses @super/db-terminal)
β β
β βββ api/ # Shared API server (scaffolded)
β
βββ packages/
β βββ db/ # Prisma client for dashboard DB
β β βββ prisma/schema.prisma
β β
β βββ db-terminal/ # Prisma client for terminal DB (separate schema)
β β βββ prisma/schema.prisma
β β
β βββ auth/ # Better-Auth config
β β βββ src/
β β βββ server.ts
β β βββ client.ts
β β
β βββ claude-sdk/ # Claude / Anthropic provider wrapper
β βββ embeddings-sdk/ # Embeddings provider wrapper
β βββ skills/ # Shared AI agent skills
β βββ ui/ # Shared UI components
β βββ sdk/ # Internal SDK
β βββ config/ # Shared ESLint/TS config
β βββ dashboard/ # Dashboard-specific components
β
βββ supercode-openmodel/ # LLM fine-tuning project
β βββ training/
β β βββ data/
β β βββ tinker_qwen3/
β β βββ evaluation/
β βββ models/ # Checkpoints
β βββ config/
β
βββ scripts/ # Repo-level scripts
βββ turbo.json # Turborepo config
βββ package.json # Root package (workspaces, scripts)
βββ bun.lock # Bun lockfile
βββ .env.example # Environment template
βββ CONTRIBUTING.md # Contribution guide
βββ README.md # This file
## Available Scripts
Run from the **repo root** unless otherwise noted.
### Development
| Script | What it does |
|--------|--------------|
| `bun run dev` | Start all dev servers (Turborepo) |
| `bun run dev:web` | Dashboard only (port 3000) |
| `bun run dev:docs` | Docs only (port 3001) |
| `bun run dev:terminal` | Terminal web client only |
| `bun run dev:terminal-server` | CLI agent dev loop |
| `bun run dev:api` | API server only |
| `bun run dev:video` | Remotion studio |
| `bun run supercode` | Run the published CLI in dev mode |
| `bun run supercode:prod` | Run the built CLI from `dist/` |
### Build & Quality
| Script | What it does |
|--------|--------------|
| `bun run build` | Build all apps and packages |
| `bun run lint` | Run ESLint across all packages |
| `bun run typecheck` | Run TypeScript checks |
### Database
From `packages/db/`:
```bash
bun run db:generate # Clean and regenerate Prisma client
bun run db:migrate # Deploy migrations to the configured DB
bunx prisma studio # Open Prisma Studio
bunx prisma migrate dev --name migration_name # Create a new migration
The terminal CLI has its own database and Prisma schema under packages/db-terminal/:
cd packages/db-terminal
bun run db:generate
bunx prisma migrate dev --name migration_nameSee .env.example for the full template. The variables below are documented for convenience.
| Variable | Description |
|---|---|
DATABASE_URL |
PostgreSQL connection string |
BETTER_AUTH_SECRET |
Session encryption secret (generate with openssl rand -base64 32) |
BETTER_AUTH_URL |
Base URL of the dashboard (e.g., http://localhost:3000 for dev) |
GITHUB_CLIENT_ID |
GitHub OAuth app client ID |
GITHUB_CLIENT_SECRET |
GitHub OAuth app secret |
NEXT_PUBLIC_BETTER_AUTH_URL |
Public auth URL exposed to the client |
NEXT_PUBLIC_APP_BASE_URL |
Public base URL of the app (used for OAuth callbacks, absolute links) |
| Variable | Description |
|---|---|
GOOGLE_GEMINI_API_KEY |
Google Gemini (embeddings + text) |
PINECONE_DB_API_KEY |
Pinecone vector database |
HUGGING_FACE_TOKEN |
Hugging Face API token |
TINKER_API_KEY |
Tinker API key for LLM fine-tuning |
VERCEL_OIDC_TOKEN |
Auto-generated by Vercel CLI for deployment |
We welcome contributions! Please see the Contributing Guide for details on:
- Development setup
- Code style guidelines
- Commit conventions
- Pull request process
This project is licensed under the MIT License β see apps/supercode-cli/server/LICENSE for the published CLI's terms. Internal application code is currently private and proprietary to the Supercode team.