An agentic AI coding assistant powered by local language models.
Works with any OpenAI-compatible API — Ollama, llama.cpp, LM Studio, vLLM, and more.
pocketaihub.com · Getting Started · Features · Configuration · License
- Install the PocketAI 1.0.20 VSIX with VS Code's
Extensions: Install from VSIX...command (or build from source) - Start a local model server — e.g.
ollama serve - Open PocketAI with
Cmd+L(orCtrl+Lon Windows/Linux) - Chat — ask it to read, edit, refactor, debug, or explain your code
PocketAI connects to http://127.0.0.1:39457 by default. Add additional endpoints in settings.
PocketAI now includes a built-in Connect to Codex section in the settings sidebar.
- Open the PocketAI sidebar
- In the settings view, click Connect to Codex
- If you are not signed in yet, PocketAI opens a VS Code terminal and runs
codex loginfor you - When sign-in completes, PocketAI refreshes the Codex endpoint automatically
What this setup does for you:
- Adds a
Codex Bridgeendpoint athttp://127.0.0.1:39458 - Starts the local compatibility bridge automatically
- Switches PocketAI to that endpoint for chat
- Keeps Codex chat-first without changing tool behavior for your other endpoints
Manual fallback:
codex login
npm run codex-bridgeNotes:
apiKeyis ignored by the bridge. Authentication comes from your localcodex loginsession.- PocketAI remains the executable tool system. The bridge disables Codex-native tools and translates PocketAI tool requests back into PocketAI approvals, inline diffs, and tool execution.
- PocketAI may still send
temperature,top_p, andmax_tokens, but Codex app-server does not expose Chat Completions-style tuning controls, so those values are not forwarded 1:1. - If you want Codex to use a different workspace root, you can still launch the bridge manually with
CODEX_BRIDGE_CWD=/path/to/project npm run codex-bridge.
PocketAI also includes a built-in Connect to Claude section in the settings sidebar.
- Open the PocketAI sidebar
- In the settings view, click Connect to Claude
- If you are not signed in yet, PocketAI opens a VS Code terminal and runs
claude auth loginfor you - When sign-in completes, PocketAI refreshes the Claude endpoint automatically
What this setup does for you:
- Adds a
Claude Bridgeendpoint athttp://127.0.0.1:39460 - Starts the local compatibility bridge automatically
- Switches PocketAI to that endpoint for chat
- Keeps PocketAI in charge of tool calling while Claude provides the assistant responses
Manual fallback:
claude auth login
npm run claude-bridgeNotes:
apiKeyis ignored by the bridge. Authentication comes from your localclaude auth loginsession.- PocketAI remains the executable tool system. The bridge disables Claude-native tools and translates PocketAI tool requests back into PocketAI approvals, inline diffs, and tool execution.
- The bridge runs Claude in print mode with Claude-native tools disabled and slash commands turned off, so the experience stays consistent with PocketAI's own harness.
- If you want Claude to use a different workspace root, you can still launch the bridge manually with
CLAUDE_BRIDGE_CWD=/path/to/project npm run claude-bridge.
PocketAI includes a built-in Connect to DeepSeek API section in the settings sidebar.
- Open the PocketAI sidebar
- In the settings view, paste your DeepSeek API key and click Save Key
- Click Connect to DeepSeek
- Pick
deepseek-v4-proordeepseek-v4-flashfrom the model selector
What this setup does for you:
- Adds a
DeepSeek API Bridgeendpoint athttp://127.0.0.1:39464 - Starts a local OpenAI-compatible proxy to
https://api.deepseek.com - Stores the API key in VS Code secret storage
- Keeps PocketAI in charge of tool execution while DeepSeek provides model responses
Manual fallback:
export DEEPSEEK_API_KEY="sk-..."
npm run deepseek-bridgeNotes:
- The bridge exposes DeepSeek V4 model IDs:
deepseek-v4-proanddeepseek-v4-flash. - Reasoning controls are available as
highandmax; when selected, the bridge enables DeepSeek thinking mode for the request. - The bridge uses port
39464to avoid the existing Hermes bridge on39463.
PocketAI doesn't just generate text — it acts. The model can chain together file reads, edits, terminal commands, searches, and git operations autonomously, looping until the task is done.
| Mode | Behavior |
|---|---|
| Ask | Presents each change for approval before applying |
| Auto | Non-destructive tools run automatically; destructive ones still require approval |
| Plan | Describes what it would do without making any changes |
Switch modes with /mode ask, /mode auto, or /mode plan.
Pending edits appear directly in your editor with highlighted removed lines and ghost-text previews of replacements. Accept or reject changes via CodeLens buttons without leaving the file.
Shell commands execute in VS Code's integrated terminal so you can see exactly what's running. Output is captured and fed back to the model for the next step.
PocketAI automatically gathers context with each message:
- Workspace file tree and active file contents
- Open editor tabs
- Git branch and status
- VS Code diagnostics (errors and warnings)
All configurable — disable any context source in settings.
- MCP Servers — Connect external tool servers via Model Context Protocol for additional capabilities
- Multi-Session — Create, fork, search, and switch between independent chat sessions
- Checkpoints & Undo — Every file edit creates a checkpoint; rewind code and conversation at any time
- Project Instructions — Drop a
.pocketai.mdin your repo root to customize system behavior per-project - Hooks — Run shell commands on lifecycle events (
postEdit,preToolUse,postCreate, etc.) - Permission Rules — Allow or deny tool calls with glob patterns (e.g. deny
run_command(rm *)) - Session Compaction — Auto-summarizes long conversations to stay within your model's context window
- @ Mentions — Reference files with
@filenameautocomplete in the chat input - Web Search — The model can search the web when it needs external information
- Image Support — Paste or attach images to your prompts (for multimodal models)
All settings live under pocketai.* in VS Code settings.
| Setting | Default | Description |
|---|---|---|
pocketai.endpoints |
Local Ollama | List of OpenAI-compatible API endpoints with per-endpoint model, token limit, and system prompt |
pocketai.useStructuredTools |
true |
Use OpenAI function calling instead of text-based tool parsing (disable if your model does not support it) |
pocketai.contextWindowSize |
8192 |
Your model's context window size — used by the token meter and auto-compaction |
| Setting | Default | Description |
|---|---|---|
pocketai.useIntegratedTerminal |
true |
Run commands in VS Code's terminal instead of a background process |
pocketai.includeGitContext |
true |
Include git branch and status in context |
pocketai.includeDiagnostics |
true |
Include VS Code errors/warnings in context |
pocketai.projectInstructionsFile |
.pocketai.md |
Filename for per-project system prompt instructions |
pocketai.maxContinuations |
3 |
Max auto-continuations when the model hits its token limit mid-response |
"pocketai.permissions": {
"allow": ["read_file(**)", "grep(**)", "glob(**)"],
"deny": ["read_file(*.env)", "run_command(rm *)"]
}| Command | Description |
|---|---|
/clear |
Clear the conversation |
/model <name> |
Switch model |
/mode <ask|auto|plan> |
Switch interaction mode |
/compact |
Summarize conversation to free context |
/fork |
Fork the current session into a new tab |
/branch [name] |
Show, create, or switch git branches |
/tokens |
Show cumulative token usage for the session |
/endpoint [name] |
Switch between configured endpoints |
/sessions |
List all sessions |
| Shortcut | Action |
|---|---|
Cmd+L / Ctrl+L |
Focus chat input |
Cmd+Shift+L / Ctrl+Shift+L |
Send current selection to chat |
git clone https://github.com/PocketAIHub/pocketai-vscode.git
cd pocketai-vscode
npm ci
npm run typecheck
npm test
npm run package:vsixThen press F5 in VS Code to launch the extension in a development host. Run
npm run test:extension for the isolated Extension Host suite, or
npm run release:check for the complete local release gate.
