PKA CODE is a free, open-source AI coding assistant that works in your terminal and your browser. Powered by DeepSeek, Gemini, Groq, and OpenRouter free models.
PKA CODE — AI coding assistant in your terminal and browser
- 2 Interfaces — Terminal CLI (
pkacode) and Web Chat (pkacodeweb) - 4 AI Providers — DeepSeek (via OpenRouter), Gemini, Groq, OpenRouter
- 21+ Free Models — All with generous free tiers, no credit card needed
- Streaming Responses — Word-by-word SSE streaming in both interfaces
- Session Management — Save, resume, and manage conversations
- Shared Config — One config file for both CLI and Web
- Instant Mode — Chat with DeepSeek V4 Flash without any API key (rate-limited)
- Unlimited Mode — Add your own API key for unlimited usage
- Cross-Platform — Windows, Linux, macOS
The pkacodeweb command launches the PKA CODE web server, giving you a browser-based AI chat interface.
Web Chat interface — browser-based AI conversations
# Install the CLI globally
npm install -g pkacode-cli
# Launch the Web Chat server
pkacodewebYour browser will automatically open at http://localhost:3721/chat — start chatting instantly!
| Step | Action |
|---|---|
| 1 | Run pkacodeweb in your terminal |
| 2 | Server starts on port 3721 and browser opens automatically |
| 3 | Chat instantly with DeepSeek V4 Flash — no API key needed |
| 4 | Or add your own API key in Settings (^_ Config) for unlimited access |
- Chat instantly with up to 20 messages per hour
- Uses the server's built-in API key
- No signup, no credit card required
- Perfect for quick questions and exploration
- Add your own OpenRouter, Gemini, or Groq API key in Settings
- No rate limits — use as much as you want
- Keys are stored securely in your browser's localStorage
- Switch between providers on-the-fly from the dropdown
You can also start the server directly from the source folder:
cd server
npm install
node index.jsThen open http://localhost:3721/chat in your browser.
The server broadcasts on your local network. Access from your phone or tablet:
http://<your-ip>:3721/chat
Both devices must be on the same WiFi network.
| Key | Action |
|---|---|
Enter |
Send message |
Shift+Enter |
New line |
/clear |
Clear conversation |
/new |
Start new conversation |
Once the server is running, these API endpoints are available:
| Endpoint | Method | Description |
|---|---|---|
/api/health |
GET | Server health check |
/api/config |
GET/POST | Read/update configuration |
/api/providers |
GET | List AI providers and models |
/api/chat |
POST | Streaming chat (SSE) |
/api/sessions |
GET/POST | List/save sessions |
/api/sessions/:id |
GET/DELETE | Load/delete a session |
The web chat source code is located in the server/ folder:
pkacode/
├── server/
│ ├── index.js # Express.js backend (API + streaming)
│ ├── chat.html # Frontend chat UI (single HTML file)
│ ├── package.json # Server dependencies
│ ├── start.bat # Windows launcher
│ ├── start.cmd # Silent Windows launcher
│ └── start-silent.vbs # Background launcher (Windows)
├── api/ # Vercel serverless functions (alternative deployment)
├── index.html # Landing page
├── styles.css # Global styles
└── script.js # Landing page interactions
The project is Vercel-ready. The api/ folder contains serverless functions that replicate the same chat API. Deploy with:
vercel
Terminal CLI — interactive AI-powered coding
For full project control with file system access and command execution:
npm install -g pkacode-cli# Login to a provider (get free API key from their website)
pkacode auth login gemini
pkacode auth login groq
pkacode auth login openrouter# Start interactive chat
pkacode
# Single prompt mode
pkacode -p "explain this function"
# Switch providers
pkacode provider set groq
pkacode provider set openrouter
# List all available models
pkacode models list
# Manage sessions
pkacode sessions list
pkacode resume <session-id>| Mode | Description |
|---|---|
| Default | Read-only auto, edits and bash ask for confirmation |
| Auto-edit | Read/write/edit auto, bash asks you |
| Plan | Read-only only — no edits, no bash |
| Yolo | Everything automatic — no prompts |
| Command | Description |
|---|---|
/theme |
Switch color theme |
/session or /info |
Show session info |
/new |
Start fresh session |
/resume |
Continue a saved session |
/sessions |
List all sessions |
/permissions or /perm |
Change permission mode |
/exit or /quit |
Exit |
/clear |
Clear conversation |
/help |
Show help |
All providers offer generous free tiers — no credit card required.
| Provider | Free Tier | Get Key |
|---|---|---|
| Gemini | 60 req/min | Google AI Studio |
| Groq | 30 req/min | Groq Console |
| OpenRouter | 20+ free models | OpenRouter |
| OpenRouter 2 (DeepSeek) | Via OpenRouter key | OpenRouter |
- DeepSeek V4 Flash — Default model for Web Chat (via OpenRouter)
- Gemini 2.0 Flash — Fast, vision-capable, 1M context
- Llama 3.3 70B — Strong general purpose (via Groq)
- Mixtral 8x7B — MoE, strong reasoning (via Groq)
- Qwen 2.5 Coder 32B — Best for coding (via OpenRouter)
- Node.js 18+ (LTS recommended)
- Windows 10+ / Linux / macOS 12+
Both CLI and Web Chat share the same config file:
| Platform | Config Path |
|---|---|
| Windows | %APPDATA%\pka\config.json |
| Linux | ~/.config/pka/config.json |
| macOS | ~/.config/pka/config.json |
┌─────────────────────────────────────────────────────┐
│ PKA CODE │
├──────────────────┬──────────────────────────────────┤
│ Terminal CLI │ Web Chat │
│ (pkacode) │ (pkacodeweb) │
├──────────────────┼──────────────────────────────────┤
│ Commander.js │ Express.js + SSE │
│ Interactive │ Single-page HTML app │
│ File access │ Browser-based │
│ Tool execution │ Mobile responsive │
├──────────────────┴──────────────────────────────────┤
│ AI Providers │
│ Gemini │ Groq │ OpenRouter │ DeepSeek │
└─────────────────────────────────────────────────────┘
MIT License — see the LICENSE file for details.
- GitHub: github.com/Pisethz/pkacode-cli
- npm: npmjs.com/package/pkacode-cli
- Web: pkacode.vercel.app
- Author: @Pisethz