Kodebots VSCode Extension
The Kodebots VSCode extension provides an alternative interface to the existing Kodebots service, offering seamless AI-powered branch management directly within your development environment. The extension maintains full compatibility with the existing CLI tool - both can be used interchangeably as they operate on the same backend service and branch system.
Features
- 🔐 Seamless Authentication - Uses the same authentication system as the CLI
- 📂 Workspace-Aware - Automatically detects and works with your current Git repository
- 🤖 AI Branch Management - Create and manage AI-generated branches
- 🔄 CLI Compatibility - Works alongside the CLI tool, sharing branches and authentication
- 📊 Status Bar Integration - Shows authentication status, repository status, and active branches
- 🌳 Native VSCode Integration - Uses VSCode's native UI components and commands
Installation
Copy the extension folder to your VSCode extensions directory:
- Windows:
%USERPROFILE%\.vscode\extensions\
- macOS:
~/.vscode/extensions/
- Linux:
~/.vscode/extensions/
Restart VSCode
The extension will activate automatically when you open a workspace containing a Git repository
Getting Started
Prerequisites
- VSCode 1.85.0 or higher
- A Git repository in your workspace
- Access to a Kodebots-enabled organization
First Time Setup
- Open a Git Repository: Open a workspace that contains a Git repository
- Check Status Bar: Look for the Kodebots status items in the bottom status bar:
$(robot) 0 active
- Shows active branch count
- Repository name with status indicator
$(x) Kodebots
- Authentication status (red if not authenticated)
- Sign In: Click on the authentication status or use
Ctrl+Shift+P
→ "Kodebots: Sign In"
- Browser Authentication: Complete the authentication flow in your browser
- Start Creating Branches: Once authenticated and your repository is enabled, you can create branches!
Usage
Commands
All commands are available through the Command Palette (Ctrl+Shift+P
/ Cmd+Shift+P
):
Kodebots: Create Branch
- Create a new AI branch for the current repository
Kodebots: View Branches
- View branch history and status
Kodebots: Open Branch Panel
- Open the main Kodebots panel
Kodebots: Open Branch
- Quick access to AI-generated branches
Kodebots: Sign In
- Authenticate with Kodebots
Kodebots: Sign Out
- Sign out and clear stored credentials
Status Bar Indicators
The extension adds three status bar items (from left to right):
Branch Status: $(robot) 2 active
- Shows number of currently active branches
- Click to open the branch panel
- Green background when branches are active
Repository Status: $(check) org/repo-name
- Shows current repository and its Kodebots status
- Green checkmark: Repository is enabled for Kodebots
- Yellow alert: Repository not enabled
- Red error: Not a Git repository
Authentication Status: $(check) Kodebots
- Shows current authentication status
- Green checkmark: Authenticated
- Red X: Not authenticated (click to sign in)
Creating Branches
- Ensure you're authenticated and in a Kodebots-enabled repository
- Use
Kodebots: Create Branch
from the Command Palette or click the branch status bar item
- Enter your branch description (e.g., "Add user authentication to the login page")
- The branch will be created and you can monitor its progress in the status bar
Working with AI Branches
Kodebots creates timestamped branches for each AI task (format: kodebots-YYYYMMDD-HHMMSS
). These branches are compatible between the CLI and VSCode extension, so you can:
- Create a branch in the CLI and open it in VSCode
- Create a branch in VSCode and continue working with the CLI
- Switch between tools seamlessly
CLI Compatibility
The extension is designed to coexist with the CLI tool:
- Shared Authentication: Same token storage and authentication system
- Shared Branch History: Both tools can view and manage the same branches
- Shared Configuration: Uses same backend API and organization settings
- Branch Compatibility: Both tools generate compatible branch names
You can use both tools simultaneously without any conflicts.
Architecture
The extension reuses and adapts CLI logic but doesn't replace it. Key components:
- AuthManager: Handles Firebase authentication using the same flow as CLI
- ApiClient: Communicates with the same Firebase Functions as CLI
- RepositoryDetector: Analyzes workspace Git repositories
- StatusBar: Provides real-time status updates
- TaskManager: Manages task creation and polling (coming soon)
Development
Building from Source
- Clone the repository
- Navigate to the extension directory:
cd kodebots-vscode
- Install dependencies:
npm install
- Compile TypeScript:
npm run compile
- The compiled extension will be in the
dist/
directory
Project Structure
kodebots-vscode/
├── package.json # Extension manifest
├── src/
│ ├── extension.ts # Main extension entry point
│ ├── auth/ # Authentication components
│ ├── api/ # Firebase API integration
│ ├── git/ # Git repository analysis
│ ├── ui/ # VSCode UI components
│ └── types.ts # Shared type definitions
└── dist/ # Compiled JavaScript output
Configuration
The extension uses the same configuration as the CLI tool:
- Web App URL:
https://fir-proxy-project.web.app
(or custom via CLI_LINK_URL
)
- Firebase Project:
fir-proxy-project
- Authentication: Firebase Custom Token flow with browser handoff
Troubleshooting
Extension Not Activating
- Ensure you're in a workspace with a Git repository (
.git
folder present)
- Check the VSCode Output panel for error messages
- Restart VSCode
Authentication Issues
- Clear stored credentials: Use
Kodebots: Sign Out
- Check browser pop-up blockers
- Ensure you have access to the configured Firebase project
Repository Not Enabled
- Verify your repository is added to your Kodebots organization
- Check that your Git remote URL matches the organization's repositories
- Contact your organization admin to enable the repository
Task Creation Fails
- Ensure you're authenticated (green checkmark in status bar)
- Verify repository is enabled for Kodebots
- Check VSCode Output panel for detailed error messages
Support
For issues and feature requests, please refer to the main Kodebots project or contact your organization administrator.
License
This extension is part of the Kodebots project. Refer to the main project license for terms and conditions.