Skip to main content

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

  1. Sign up or log in to JCIL.AI
  2. Navigate to Code Lab
  3. Connect your GitHub account (optional)
  4. Clone a repository or start from scratch
  5. 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

ToolDescriptionParameters
read_fileRead the contents of a filepath: string
write_fileCreate or overwrite a filepath: string, content: string
edit_fileMake precise edits to a filepath: string, old_string: string, new_string: string
multi_editMake multiple edits in one operationpath: string, edits: Array<{old: string, new: string}>
list_filesList files in a directorypath?: string (defaults to /workspace)
search_filesFind files by glob patternpattern: string
search_codeSearch file contents with regexpattern: string, path?: string, file_pattern?: string

# Git Integration

ToolDescriptionParameters
git_statusView repository statusnone
git_diffView changesstaged?: boolean, file?: string
git_commitStage and commit changesmessage: 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

1
enter_plan_mode - Start planning with a reason
2
Explore codebase with file/search tools
3
write_plan - Document your approach
4
exit_plan_mode - Request user approval
5
User approves → Implementation begins

# MCP Servers

Model Context Protocol servers extend Code Lab's capabilities with additional tools.

Available Servers

filesystem

Enhanced file access

github

GitHub API integration

puppeteer

Browser automation

postgres

Database queries

memory

Persistent memory store

# Hooks System

Hooks run commands in response to events like tool execution.

Event Types

pre_toolBefore a tool executes
post_toolAfter a tool executes
session_startWhen session begins
session_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

1

Use Planning Mode for Complex Tasks

Don't dive into implementation. Plan first, get approval.

2

Commit Early and Often

Make small, focused commits with clear messages.

3

Use Project Memory

Document project-specific context in CODELAB.md.

4

Enable Relevant Hooks

Use pre-commit hooks to catch issues early.

5

Keep Sessions Organized

Use clear session names. Clean up when done.

Ready to Start?

Launch Code Lab and experience AI-assisted development.

Open Code Lab