Code Lab Documentation
# Getting Started
Code Lab is a full AI development environment that runs in your browser. It provides:
- •Isolated E2B Sandbox: Each session runs in a secure Linux container
- •30+ Tools: File operations, Git, shell execution, and more
- •Persistent Workspaces: Your work is saved between sessions
- •GitHub Integration: Clone repos, push changes, create PRs
Quick Start
- Sign up or log in to JCIL.AI
- Navigate to Code Lab
- Connect your GitHub account (optional)
- Clone a repository or start from scratch
- Start chatting with the AI to write code
Basic Commands
# File operations
"Create a new file at src/index.ts"
"Read the package.json file"
# Shell commands
"Run npm install"
# Git operations
"Show me the git status"
"Commit these changes with message 'feat: add auth'"
# Tool Reference
Code Lab provides 30+ tools for development tasks. All tools are called automatically based on your natural language requests.
# File Operations
| Tool | Description | Parameters |
|---|---|---|
read_file | Read the contents of a file | path: string |
write_file | Create or overwrite a file | path: string, content: string |
edit_file | Make precise edits to a file | path: string, old_string: string, new_string: string |
multi_edit | Make multiple edits in one operation | path: string, edits: Array<{old: string, new: string}> |
list_files | List files in a directory | path?: string (defaults to /workspace) |
search_files | Find files by glob pattern | pattern: string |
search_code | Search file contents with regex | pattern: string, path?: string, file_pattern?: string |
# Git Integration
| Tool | Description | Parameters |
|---|---|---|
git_status | View repository status | none |
git_diff | View changes | staged?: boolean, file?: string |
git_commit | Stage and commit changes | message: string, files?: string[] |
Note: Git operations require a cloned repository. Use the GitHub integration to clone repos securely with your PAT.
# Planning Mode
Use planning mode for complex tasks that need careful design before implementation.
When to Use
- •Multiple valid approaches exist
- •Significant architectural decisions needed
- •Changes touch many files
- •Requirements are unclear
Workflow
# MCP Servers
Model Context Protocol servers extend Code Lab's capabilities with additional tools.
Available Servers
filesystemEnhanced file access
githubGitHub API integration
puppeteerBrowser automation
postgresDatabase queries
memoryPersistent memory store
# Hooks System
Hooks run commands in response to events like tool execution.
Event Types
pre_toolBefore a tool executespost_toolAfter a tool executessession_startWhen session beginssession_endWhen session ends# Project Memory
CODELAB.md stores project-specific context that persists across sessions.
What to Include
- •Project overview
- •Code style conventions
- •Architecture notes
- •Common tasks
- •Preferences (run tests after changes, etc.)
- •Things to avoid
# Background Tasks
Run long-running commands without blocking the conversation.
# Start a dev server
bg_run "npm run dev"
# Check running tasks
bg_list
# Check output
bg_output task-id
# Stop the task
bg_kill task-id
# Best Practices
Use Planning Mode for Complex Tasks
Don't dive into implementation. Plan first, get approval.
Commit Early and Often
Make small, focused commits with clear messages.
Use Project Memory
Document project-specific context in CODELAB.md.
Enable Relevant Hooks
Use pre-commit hooks to catch issues early.
Keep Sessions Organized
Use clear session names. Clean up when done.