Background coding agent and real-time web interface
See the codeAn open-source background coding agent. Designed to understand, reason about, and contribute to existing codebases. Licensed for open-source use under MIT License
Sets up isolated execution environments for AI agents to work on GitHub repositories with tools to understand code, edit files, and much more.
Shadow supports two execution modes through an abstraction layer:
Mode selection is controlled by NODE_ENV and AGENT_MODE environment variables.
apps/frontend/) - Next.js application with real-time chat interface, terminal emulator, file explorer, and task managementapps/server/) - Node.js orchestrator handling LLM integration, WebSocket communication, task initialization, and API endpointsapps/sidecar/) - Express.js service providing REST APIs for file operations within isolated containersapps/website/) - Marketing and landing pagepackages/db/) - Prisma schema and PostgreSQL client with comprehensive data modelspackages/types/) - Shared TypeScript type definitions for the entire platformpackages/command-security/) - Security utilities for command validation and sanitizationpackages/eslint-config/) - Shared linting rulespackages/typescript-config/) - Shared TypeScript configurationsgit clone <repository-url>
cd shadow
npm install
# Copy example environment files
cp apps/server/.env.template apps/server/.env
cp apps/frontend/.env.template apps/frontend/.env
cp packages/db/.env.template packages/db/.env
# Create local PostgreSQL database
psql -U postgres -c "CREATE DATABASE shadow_dev;"
# Update packages/db/.env with your database URL
DATABASE_URL="postgres://postgres:@127.0.0.1:5432/shadow_dev"
# Generate Prisma client and push schema
npm run generate
npm run db:push
# Start all services
npm run dev
# Or start specific services
npm run dev --filter=frontend
npm run dev --filter=server
npm run dev --filter=sidecar
Set variables in the following files:
apps/frontend/.env.localapps/server/.envpackages/db/.envUse a personal GitHub token so the GitHub selector works instantly without installing our app.
repo, read:org.An easy way to do this is run the ./setup-script.sh which will take in your input variables and autoset them in the right places for you! If you would like to do it manually, follow the instructions below
apps/server/.env
# Required
DATABASE_URL="postgres://postgres:@127.0.0.1:5432/shadow_dev"
BETTER_AUTH_SECRET="dev-secret"
GITHUB_PERSONAL_ACCESS_TOKEN=ghp_xxx
# Local mode
NODE_ENV=development
AGENT_MODE=local
# Optional: Pinecone for semantic search
PINECONE_API_KEY="" # TODO: Set this to your Pinecone API key
PINECONE_INDEX_NAME="shadow"
# Workspace directory for local agent:
WORKSPACE_DIR= # TODO: Set this to your local workspace directory
apps/frontend/.env.local
# Point frontend to your server if needed
NEXT_PUBLIC_SERVER_URL=http://localhost:4000
# Marks environment; any value other than "production" enables local behavior
NEXT_PUBLIC_VERCEL_ENV=development
GITHUB_PERSONAL_ACCESS_TOKEN=ghp_xxx
GITHUB_CLIENT_ID=
GITHUB_CLIENT_SECRET=
# Optional (only if you want OAuth login locally)
BETTER_AUTH_SECRET=dev-secret
packages/db/.env
DATABASE_URL="postgres://postgres:@127.0.0.1:5432/shadow_dev"
DIRECT_URL="postgres://postgres:@127.0.0.1:5432/shadow_dev"
With GITHUB_PERSONAL_ACCESS_TOKEN set on the server and NEXT_PUBLIC_VERCEL_ENV not equal to production, the backend uses your PAT for repo/branch/issue queries. The frontend's GitHub selector works immediately.
# Lint all packages and apps
npm run lint
# Format code with Prettier
npm run format
# Type checking
npm run check-types
# Generate Prisma client from schema
npm run generate
# Push schema changes to database (for development)
npm run db:push
# Reset database and push schema (destructive)
npm run db:push:reset
# Open Prisma Studio GUI
npm run db:studio
# Run migrations in development
npm run db:migrate:dev
# Build all packages and apps
npm run build
# Build specific app
npm run build --filter=frontend
npm run build --filter=server
npm run build --filter=sidecar
Shadow provides a comprehensive set of tools for AI agents:
read_file - Read file contents with line range supportedit_file - Write and modify filessearch_replace - Precise string replacementdelete_file - Safe file deletionlist_dir - Directory explorationgrep_search - Pattern matching with regexfile_search - Fuzzy filename searchsemantic_search - AI-powered semantic code searchrun_terminal_cmd - Command execution with real-time outputtodo_write - Structured task managementadd_memory - Repository-specific knowledge storagelist_memories - Retrieve stored knowledgeWe're excited to see what you've built with Shadow!
Ishaan Dey — X
324 followers · starred Aug 2025
1,828 followers · starred Aug 2025
240 followers · starred Aug 2025
1,057 followers · starred Aug 2025
Background coding agent and real-time web interface
See the codeAn open-source background coding agent. Designed to understand, reason about, and contribute to existing codebases. Licensed for open-source use under MIT License
Sets up isolated execution environments for AI agents to work on GitHub repositories with tools to understand code, edit files, and much more.
Shadow supports two execution modes through an abstraction layer:
Mode selection is controlled by NODE_ENV and AGENT_MODE environment variables.
apps/frontend/) - Next.js application with real-time chat interface, terminal emulator, file explorer, and task managementapps/server/) - Node.js orchestrator handling LLM integration, WebSocket communication, task initialization, and API endpointsapps/sidecar/) - Express.js service providing REST APIs for file operations within isolated containersapps/website/) - Marketing and landing pagepackages/db/) - Prisma schema and PostgreSQL client with comprehensive data modelspackages/types/) - Shared TypeScript type definitions for the entire platformpackages/command-security/) - Security utilities for command validation and sanitizationpackages/eslint-config/) - Shared linting rulespackages/typescript-config/) - Shared TypeScript configurationsgit clone <repository-url>
cd shadow
npm install
# Copy example environment files
cp apps/server/.env.template apps/server/.env
cp apps/frontend/.env.template apps/frontend/.env
cp packages/db/.env.template packages/db/.env
# Create local PostgreSQL database
psql -U postgres -c "CREATE DATABASE shadow_dev;"
# Update packages/db/.env with your database URL
DATABASE_URL="postgres://postgres:@127.0.0.1:5432/shadow_dev"
# Generate Prisma client and push schema
npm run generate
npm run db:push
# Start all services
npm run dev
# Or start specific services
npm run dev --filter=frontend
npm run dev --filter=server
npm run dev --filter=sidecar
Set variables in the following files:
apps/frontend/.env.localapps/server/.envpackages/db/.envUse a personal GitHub token so the GitHub selector works instantly without installing our app.
repo, read:org.An easy way to do this is run the ./setup-script.sh which will take in your input variables and autoset them in the right places for you! If you would like to do it manually, follow the instructions below
apps/server/.env
# Required
DATABASE_URL="postgres://postgres:@127.0.0.1:5432/shadow_dev"
BETTER_AUTH_SECRET="dev-secret"
GITHUB_PERSONAL_ACCESS_TOKEN=ghp_xxx
# Local mode
NODE_ENV=development
AGENT_MODE=local
# Optional: Pinecone for semantic search
PINECONE_API_KEY="" # TODO: Set this to your Pinecone API key
PINECONE_INDEX_NAME="shadow"
# Workspace directory for local agent:
WORKSPACE_DIR= # TODO: Set this to your local workspace directory
apps/frontend/.env.local
# Point frontend to your server if needed
NEXT_PUBLIC_SERVER_URL=http://localhost:4000
# Marks environment; any value other than "production" enables local behavior
NEXT_PUBLIC_VERCEL_ENV=development
GITHUB_PERSONAL_ACCESS_TOKEN=ghp_xxx
GITHUB_CLIENT_ID=
GITHUB_CLIENT_SECRET=
# Optional (only if you want OAuth login locally)
BETTER_AUTH_SECRET=dev-secret
packages/db/.env
DATABASE_URL="postgres://postgres:@127.0.0.1:5432/shadow_dev"
DIRECT_URL="postgres://postgres:@127.0.0.1:5432/shadow_dev"
With GITHUB_PERSONAL_ACCESS_TOKEN set on the server and NEXT_PUBLIC_VERCEL_ENV not equal to production, the backend uses your PAT for repo/branch/issue queries. The frontend's GitHub selector works immediately.
# Lint all packages and apps
npm run lint
# Format code with Prettier
npm run format
# Type checking
npm run check-types
# Generate Prisma client from schema
npm run generate
# Push schema changes to database (for development)
npm run db:push
# Reset database and push schema (destructive)
npm run db:push:reset
# Open Prisma Studio GUI
npm run db:studio
# Run migrations in development
npm run db:migrate:dev
# Build all packages and apps
npm run build
# Build specific app
npm run build --filter=frontend
npm run build --filter=server
npm run build --filter=sidecar
Shadow provides a comprehensive set of tools for AI agents:
read_file - Read file contents with line range supportedit_file - Write and modify filessearch_replace - Precise string replacementdelete_file - Safe file deletionlist_dir - Directory explorationgrep_search - Pattern matching with regexfile_search - Fuzzy filename searchsemantic_search - AI-powered semantic code searchrun_terminal_cmd - Command execution with real-time outputtodo_write - Structured task managementadd_memory - Repository-specific knowledge storagelist_memories - Retrieve stored knowledgeWe're excited to see what you've built with Shadow!
Ishaan Dey — X
324 followers · starred Aug 2025
1,828 followers · starred Aug 2025
240 followers · starred Aug 2025
1,057 followers · starred Aug 2025