Skip to content

feat: introduce provider abstraction with local Claude CLI support - #11

Open
bidah wants to merge 1 commit into
mainfrom
claude/issue-1-20260221-1329
Open

bidah wants to merge 1 commit into
mainfrom
claude/issue-1-20260221-1329

Conversation

@bidah

@bidah bidah commented Feb 23, 2026

Copy link
Copy Markdown
Collaborator

Adds a provider abstraction layer that lets the app run either via the existing E2B cloud sandbox (default) or via a locally-installed Claude CLI subprocess, skipping sandboxing entirely.

Changes

  • New apps/web/lib/providers/ directory with AIProvider interface, LocalCLIProvider, SandboxedClaudeProvider, factory, and local-cli handler
  • claude-code-handler.ts: routes to local handler when CLAUDE_PROVIDER=local-cli
  • .env.example: documents CLAUDE_PROVIDER and LOCAL_PROJECTS_PATH

Closed #1

Generated with Claude Code

Adds a provider abstraction layer that lets the app run either via the
existing E2B cloud sandbox (default) or via a locally-installed Claude CLI
subprocess, skipping sandboxing entirely.

New files in apps/web/lib/providers/:
- types.ts: AIProvider interface and types
- local-cli-provider.ts: spawns claude -p with stream-json
- sandboxed-provider.ts: typed wrapper for existing E2B approach
- factory.ts: createProvider()/isLocalCLIMode() based on CLAUDE_PROVIDER env
- local-cli-handler.ts: handleLocalCLIGeneration() - skips sandbox entirely
- index.ts: re-exports

Modified:
- apps/web/lib/claude-code-handler.ts: routes to local handler when CLAUDE_PROVIDER=local-cli
- .env.example: documents CLAUDE_PROVIDER and LOCAL_PROJECTS_PATH

Closes #1

Co-authored-by: Rodrigo Figueroa <bidah@users.noreply.github.com>
@vercel

vercel Bot commented Feb 23, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
react-native-vibe-code-sdk-docs Error Error Feb 23, 2026 10:27am
react-native-vibe-code-sdk-web Ready Ready Preview, Comment Feb 23, 2026 10:27am

Request Review

This branch had an error being deployed

1 failed and 1 active deployments
Preview – react-native-vibe-code-sdk-docs — e7b62d8f Deployed Feb 21, 2026 by vercel[bot]
Preview – react-native-vibe-code-sdk-web — e7b62d8f Deployed Feb 21, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Introduce Provider Abstraction to Support Claude CLI and Other Local Providers

1 participant