Web Chat — Server Setup
Launch the PKA CODE web server and chat with AI instantly. One command does everything.
Install the CLI globally, then run:
pkacodeweb
The server starts on http://localhost:3721 and your browser opens automatically.
The chat opens at:
http://localhost:3721/chat
Start chatting with DeepSeek V4 Flash immediately — no API key needed.
Chat instantly with up to 20 messages per hour. The server uses its own API key for instant access.
For unlimited usage, add your own OpenRouter API key in Settings. One free key gives access to all providers.
You can also start the server manually:
cd server && node index.js
Then open http://localhost:3721/chat in your browser.
The server broadcasts on your local network. Access from your phone at:
http://<your-ip>:3721/chat
Both devices must be on the same WiFi.
Installation
Install globally via npm. Node.js 18+ required.
npm install -g pkacode-cli
pkacode
pkacode -p "explain this function"
pkacode "build a todo app"
pkacode -p "read package.json and explain it"
System requirements
Minimal dependencies. Runs on any modern terminal.
| Platform | Requirement | Notes |
|---|---|---|
| All | Node.js 18+ | LTS recommended |
| Windows 10+ | Windows Terminal (recommended) | Clipboard built-in via clip |
| Linux | Any modern distro | Install xclip or wl-clipboard |
| macOS 12+ | Intel & Apple Silicon | Clipboard built-in via pbcopy |
Authentication
Set your FREE API key from any supported provider.
pkacode auth login gemini
pkacode auth login groq
pkacode auth login openrouter
pkacode provider set gemini
pkacode provider set groq
pkacode provider set openrouter
CLI commands
All available commands for the pkacode CLI.
| Command | Description |
|---|---|
pkacode | Start interactive chat mode |
pkacode "prompt" | Single-prompt mode |
pkacode -p "prompt" | Headless print mode |
pkacode --help | Show help |
pkacode --version | Show version |
pkacodeweb | Start web server and open chat in browser |
pkacode theme [dark|light] | Switch color theme |
pkacode auth login <provider> | Set API key |
pkacode provider set <name> | Switch provider |
pkacode model set <name> | Switch model |
pkacode models list | List all models |
pkacode config | Show config |
pkacode config set <key> <value> | Set config value |
pkacode permissions | Show permission rules |
pkacode permissions reset | Reset to defaults |
pkacode sessions list | List saved sessions |
pkacode resume [session] | Resume a session |
pkacode sandbox | Toggle sandbox mode |
In-chat commands
Slash commands available during interactive chat.
| Command | Alias | Description |
|---|---|---|
/theme | — | Switch color theme |
/session | /info | Show session ID, model, turns, tokens |
/new | — | Start a fresh session |
/resume | — | Interactive picker to continue a session |
/sessions | — | List all saved sessions |
/permissions | /perm | View and change permission mode |
/exit | /quit | Exit the assistant |
/clear | — | Clear conversation history |
/help | — | Show help |
/commands | — | Show all PKA CLI commands |
/model | — | Show or switch active model |
/models | — | List available models |
/provider | — | Show or switch AI provider |
/auth | — | Login/logout from providers |
/tokens | — | Show token usage |
/config | — | Show current configuration |
/reset | — | Reset configuration to defaults |
/sandbox | — | Toggle sandbox preference |
/multiline | — | Enter multi-line input mode |
Configuration
Config is stored as JSON. Accessible and editable.
Config paths
- Windows:
%APPDATA%\pka\config.json - Linux / macOS:
~/.config/pka/config.json
{
"provider": "gemini",
"model": "gemini-2.0-flash",
"apiKeys": {
"gemini": "AIzaSy...",
"groq": "gsk_...",
"openrouter": "sk-or-..."
},
"permissionMode": "default",
"enabledTools": ["bash", "fs"],
"sandbox": false,
"maxTokens": 4096,
"temperature": 0.3,
"stream": true
}
Config keys
provider— Active AI providermodel— Active model nameapiKeys— Stored API keyspermissionMode— default, auto-edit, plan, or yoloenabledTools— Allowed tool categoriessandbox— Sandbox togglemaxTokens— Max response tokenstemperature— Model temperature (0.0–1.0)stream— Streaming responses
Development
Build from source and contribute to the project.
git clone https://github.com/Pisethz/pkacode-cli.git
cd pkacode-cli
npm install
npm run build
npm link
pkacode
npm run dev