Baseline.dev is a VS Code extension that provides AI-powered assistance specialized in web platform features and browser compatibility. Unlike general-purpose coding assistants, Baseline.dev understands when web features became "Baseline" (widely available across major browsers) and helps you modernize your code accordingly.
- π€ AI Chat Interface - Interactive chat with context-aware responses about web features
- π Feature Discovery - Discover newly available web platform features for your project
- β»οΈ Smart Refactoring - Modernize legacy code patterns with Baseline-compatible alternatives
- π Feature Status Checker - Query any web feature's Baseline status and browser support
- π― Multi-Model Support - Choose between Claude (Anthropic), Gemini (Google), or Ollama (local)
- π Real-Time Data - Fetches latest Baseline data from Web Platform Dashboard API
- π File Attachment - Attach files for AI analysis and get code suggestions
- β Apply Changes - Accept AI suggestions to create new files or overwrite existing ones
-
Clone the repository
git clone https://github.com/yourusername/baseline-dev.git cd baseline-dev
-
Install dependencies
npm install
-
Compile TypeScript
npm run compile
-
Open in VS Code
code .
-
Run the extension
- Press
F5
to open Extension Development Host - Or use Debug menu: "Run > Start Debugging"
- Press
Once published, search for "Baseline.dev" in VS Code Extensions marketplace.
Baseline.dev supports three AI providers. Choose one based on your preference:
-
Get API Key
- Visit Anthropic Console
- Sign up or log in
- Navigate to "API Keys"
- Create a new API key
-
Configure in VS Code
- Open Command Palette (
Cmd/Ctrl+Shift+P
) - Run:
Baseline.dev: Configure
- Select "Claude" as the model
- Enter your API key when prompted
- Choose model version (default:
claude-3-5-sonnet-20241022
)
- Open Command Palette (
-
Verify Setup
- Open chat:
Cmd/Ctrl+Shift+B
- Send a test message
- Open chat:
-
Get API Key
- Visit Google AI Studio
- Sign in with Google account
- Click "Create API Key"
- Copy the generated key
-
Configure in VS Code
- Run:
Baseline.dev: Configure
- Select "Gemini" as the model
- Enter your API key
- Choose model version (default:
gemini-1.5-flash
)
- Run:
-
Install Ollama
# macOS brew install ollama # Linux curl https://ollama.ai/install.sh | sh # Windows: Download from https://ollama.ai
-
Pull a Model
ollama pull codellama # Or other models: mistral, llama2, deepseek-coder
-
Start Ollama Server
ollama serve # Runs on http://localhost:11434 by default
-
Configure in VS Code
- Run:
Baseline.dev: Configure
- Select "Ollama" as the model
- Verify endpoint:
http://localhost:11434
- Enter model name:
codellama
(or your chosen model)
- Run:
Set which browsers you're targeting for compatibility checks:
- Open VS Code Settings (
Cmd/Ctrl+,
) - Search for "Baseline.dev"
- Configure:
{ "baselinedev.targetBrowsers": ["chrome", "firefox", "safari", "edge"], "baselinedev.baselineThreshold": "high", // or "low" "baselinedev.useRealTimeData": true // Fetch latest data }
Threshold Meanings:
high
- Feature available in all major browsers (highest compatibility)low
- Feature available in some browsers (moderate compatibility)
Open the chat panel:
- Keyboard:
Cmd/Ctrl+Shift+B
- Command Palette:
Baseline.dev: Open Chat
Ask about web features:
You: Can I use Container Queries in production?
AI: Container Queries became Baseline in late 2020...
You: Show me how to use CSS Subgrid
AI: Subgrid is Baseline (high) since 2024-03...
Attach files for analysis:
- Click "π Attach File" button
- AI receives your current file context
- Ask questions about the code
- Get suggestions for improvements
Apply AI suggestions:
- After AI provides code suggestions
- Click "πΎ Save as New File" to create a new file
- Or click "βοΈ Overwrite [filename]" to replace the attached file
- Review changes before accepting
Discover newly available features:
- Open Command Palette (
Cmd/Ctrl+Shift+P
) - Run:
Baseline.dev: Discover New Features
- Choose time range (e.g., "Last 6 months")
- View report of newly Baseline features
- Ask AI for implementation examples
Modernize legacy code:
- Select code in your editor
- Right-click β "Baseline.dev: Refactor for Modern Browsers"
- Or use Command Palette
- AI analyzes and suggests modern alternatives
- Apply changes with one click
Check specific feature status:
- Run:
Baseline.dev: Check Feature Status
- Enter feature name (e.g., "CSS Grid", "Fetch API")
- View:
- Baseline status (widely/newly/limited)
- Browser support details
- Availability dates
- Specification links
Update to latest Baseline data:
- Run:
Baseline.dev: Refresh Baseline Data
- Extension fetches latest from Web Platform Dashboard API
- Cache is cleared for fresh queries
- Smooth Animations - Powered by anime.js for delightful interactions
- Teal/Green Theme - Matches Baseline.dev branding
- Message Bubbles - Clear distinction between user and AI
- Code Highlighting - Syntax-highlighted code blocks
- Auto-scroll - Smooth scroll to latest messages
- Loading Indicators - Animated dots while AI is thinking
Cmd/Ctrl+Enter
- Send messageCmd/Ctrl+Shift+B
- Open chat panelEsc
- Close panels
src/
βββ ai/ # AI Model Integration
β βββ ModelManager.ts # Multi-model orchestration
β βββ PromptBuilder.ts # Context-aware prompts
β βββ providers/ # AI provider implementations
β βββ ClaudeProvider.ts
β βββ GeminiProvider.ts
β βββ OllamaProvider.ts
βββ baseline/ # Baseline Data Management
β βββ BaselineAPI.ts # 3-tier API with fallbacks
β βββ FeatureDatabase.ts # Local feature database
β βββ types.ts # Type definitions
βββ commands/ # VS Code Commands
β βββ openChat.ts
β βββ discoverFeatures.ts
β βββ refactorModern.ts
β βββ checkFeature.ts
β βββ configure.ts
β βββ refreshData.ts
βββ ui/ # User Interface
β βββ ChatPanel.ts # Main chat webview
βββ extension.ts # Extension entry point
3-Tier Fallback System:
-
Web Platform Dashboard API (Primary)
- Real-time, always current
- Advanced query syntax
https://api.webstatus.dev/v1/features
-
GitHub Raw URL (Fallback)
- Direct from source repository
https://raw.githubusercontent.com/web-platform-dx/web-features/
-
Local NPM Package (Offline)
- Works without internet
- Fast, reliable
web-features
npm package
# Compile once
npm run compile
# Watch mode (auto-compile on save)
npm run watch
# Lint code
npm run lint
# Run in Extension Development Host
# Press F5 in VS Code
# Test commands
1. Open chat panel
2. Send messages
3. Attach files
4. Test feature discovery
5. Try refactoring
# Create .vsix package
npm run package
# Install locally
code --install-extension baseline-dev-0.1.0.vsix
We welcome contributions! Here's how to get started:
- Fork the repository
- Clone your fork
- Create a feature branch
git checkout -b feature/amazing-feature
- Make your changes
- Test thoroughly
- Commit with clear messages
git commit -m "Add: Amazing feature description"
- Push to your fork
git push origin feature/amazing-feature
- Open a Pull Request
- Code Style: Follow existing TypeScript conventions
- Commits: Use clear, descriptive commit messages
- Testing: Test all changes in Extension Development Host
- Documentation: Update README if adding features
- API Keys: Never commit API keys or secrets
- π¨ UI/UX improvements
- π New AI provider integrations
- π Additional data visualizations
- π Internationalization
- π§ͺ Test coverage
- π Documentation improvements
- Keys stored in VS Code Secret Storage (encrypted)
- Never stored in plain text or settings files
- Never logged or transmitted except to respective AI providers
- User code only sent to AI when explicitly requested
- No telemetry or analytics collected
- All processing happens locally or via your chosen AI provider
- No data stored on external servers
- Keep API keys confidential
- Review code suggestions before applying
- Use Ollama for sensitive projects (local processing)
- Regularly update the extension
Problem: Messages sent but no AI response
Solutions:
- Check API key is configured:
Baseline.dev: Configure
- Verify internet connection (for Claude/Gemini)
- Check Ollama is running:
ollama serve
(for Ollama) - View Output panel: "Baseline.dev" for errors
- Try refreshing: Reload VS Code window
Problem: "Failed to load features" error
Solutions:
- Check internet connection
- Run:
Baseline.dev: Refresh Baseline Data
- Check VS Code Output panel for specific errors
- Extension will fallback to local package automatically
Problem: Cannot connect to Ollama
Solutions:
- Verify Ollama is installed:
ollama --version
- Start Ollama server:
ollama serve
- Check endpoint in settings:
http://localhost:11434
- Try pulling model again:
ollama pull codellama
Problem: "Save as New File" button doesn't work
Solutions:
- Ensure you've attached a file first
- Check AI response contains code blocks
- Try asking AI to reformat response as code
- Manually copy/paste if needed
This project is licensed under the MIT License - see the LICENSE file for details.
- Web Platform Dashboard Team - For the Baseline initiative
- web-features Maintainers - For the authoritative data package
- Anthropic, Google, Ollama - For AI model APIs
- VS Code Team - For comprehensive extension APIs
- anime.js - For smooth UI animations
- β Interactive chat with AI
- β Multi-model support (Claude, Gemini, Ollama)
- β Feature discovery and status checking
- β Smart refactoring suggestions
- β File attachment and apply changes
- β Real-time Baseline data
- π Hover providers for instant feature info
- π Inline diagnostics for outdated patterns
- π Quick fix code actions
- π Project-wide analysis dashboard
- π Team collaboration features
- π€ Automated PR generation
- π Performance insights
- π Multi-language support
Need help? Here's how to get support:
- π Documentation: Check this README first
- π Bug Reports: Open an issue
- π‘ Feature Requests: Start a discussion
- π§ Email: support@baseline.dev (for sensitive issues)
If you find Baseline.dev useful:
- β Star the repository
- π¦ Share on Twitter
- π Write a blog post
- π€ Contribute code or documentation
- π¬ Tell your colleagues
Built with β€οΈ for the web development community
Website β’ GitHub β’ VS Code Marketplace