Simforge VS Code Extension
Quickly jump from your code to the Simforge web portal to modify prompt configurations, with compile-time type checking powered by the BAML runtime.
Monorepo Setup
This package is part of a pnpm workspace monorepo. The workspace structure separates concerns:
- Root
package.json: Contains only shared dev dependencies (Biome, TypeScript, Knip, Madge)
- Package
package.json: Contains runtime dependencies specific to this package
- You can run tests and validation from the root directory:
pnpm test or pnpm validate
- No need to manually update shared dev tooling versions across packages
Installing Dependencies
Always install dependencies from the root directory:
# From the root directory
pnpm install
Updating pnpm
To update pnpm across the monorepo:
# From the root directory
pnpm pnpm:update
This automatically updates pnpm and syncs the version in package.json and CI/CD workflows.
Running Commands
You can run commands from this directory or from the root:
# From this directory
pnpm build
pnpm validate
# From the root directory (runs across all packages)
pnpm test # Run all tests
pnpm validate # Run lint + tsc + test
This package includes the following shared development tools:
| Tool |
Purpose |
Command |
| Biome |
Fast linting & formatting |
pnpm lint |
| TypeScript |
Type checking |
pnpm tsc |
| Knip |
Find unused dependencies/exports |
pnpm knip |
| Madge |
Detect circular dependencies |
pnpm madge |
Run individual tools:
# Lint and format code
pnpm lint
# Type check without building
pnpm tsc
# Find unused dependencies
pnpm knip
# Check for circular dependencies
pnpm madge
# Run all validation checks
pnpm validate
Features
🔍 Type Checking with BAML Runtime (NEW!)
Get TRUE compile-time type checking for your simforge.call() invocations! The extension uses the @boundaryml/baml runtime (the same library used in production) to validate your arguments.
- ✅ Runtime-Powered Validation: Uses the actual BAML runtime for 100% accurate type checking
- ✅ Complex Type Support: Validates classes, unions, arrays, maps, and all BAML types
- ✅ Type Mismatch Detection: Catch type errors (e.g., passing
123 when string is expected)
- ✅ Missing Required Parameters: Get errors when you forget required parameters
- ✅ Smart Caching: Function schemas are cached to minimize API calls
- ✅ Per-Function Refresh: Click "🔄 Refresh Types" CodeLens to update specific functions
- ✅ Real-Time Feedback: See errors as you type (debounced)
Supported Languages: TypeScript, JavaScript, TSX, JSX
Read the Type Checking documentation →
Read the BAML Runtime Integration guide →
⚒️ CodeLens Integration
When you have simforge.call("methodName", ...) in your code, clickable actions appear above it:
- "⚒️ Open in Simforge" - Opens the function in the web portal
- "🔄 Refresh Types" - Clears cache and re-validates types (TypeScript/JavaScript only)

Supports:
- TypeScript / JavaScript (both actions)
- Python (Open in Simforge only)
⚙️ Settings
Configure your Simforge API key and service URL in VS Code settings:
- Open Command Palette (
Cmd+Shift+P / Ctrl+Shift+P)
- Run
Simforge: Set API Key
- Enter your API key
Or set it manually in settings.json:
{
"simforge.apiKey": "your-api-key-here",
"simforge.serviceUrl": "https://simforge.goharvest.ai",
"simforge.typeChecking.enabled": true,
"simforge.typeChecking.cacheTimeout": 300000
}
Installation
- Download the
.vsix file
- Open VS Code
- Go to Extensions (
Cmd+Shift+X)
- Click the
... menu → "Install from VSIX..."
- Select the
.vsix file
Usage
- Set your API key - Run
Simforge: Set API Key from the Command Palette
- Write code - Use
simforge.call("myFunction", {...}) in your code
- Get type checking - See real-time errors for type mismatches and missing parameters (TypeScript/JavaScript)
- Use CodeLens actions:
- Click "⚒️ Open in Simforge" to edit the function in the web portal
- Click "🔄 Refresh Types" to update types after changing the function definition
Supported Patterns
The extension detects these patterns:
// TypeScript/JavaScript
simforge.call("extractData", { text: "..." });
sf.call("summarize", { content: "..." });
client.call("analyze", { data: "..." });
# Python
simforge.call("extract_data", text="...")
sf.call("summarize", content="...")
client.call("analyze", data="...")
License
MIT