CLI & SDK Reference
Proxima includes a terminal command-line tool (CLI), an OpenAI-compatible local REST server, streaming WebSockets, and developer SDK libraries.
1. CLI Command Reference
The proxima CLI lets you query providers, run debugging corrections, and format outputs directly from your shell.
Primary Operations
# General Chat
proxima ask "Explain concurrency in Go"
proxima ask claude "Review my logic"
# Coding Tools
proxima code explain --file src/index.js
proxima code optimize "function fib(n) { ... }"
# Automatic Repair (Self-Healing Loop)
proxima fix "SyntaxError: Unexpected token"
proxima fix --file error_trace.log
Terminal Piping Support
Forward execution errors, logs, or git differences straight into the command parser:
# Pipeline build issues
npm run build 2>&1 | proxima fix
# Pipeline codebase reviews
git diff | proxima code review
2. REST API & WebSocket Specifications
The desktop app spins up an OpenAI-compatible REST server locally at http://localhost:3210.
REST Endpoints
POST /v1/chat/completions # OpenAI-style completions (streams, tool requests)
GET /v1/models # List available providers (session or BYOK)
GET /v1/stats # Fetch latency and token reports
POST /v1/conversations/new # Reset a provider's active conversation
WebSocket Stream (ws://localhost:3210/ws)
Establishes real-time connection buffers for immediate token parsing:
const ws = new WebSocket("ws://localhost:3210/ws");
ws.send(JSON.stringify({
action: "ask",
model: "claude",
message: "Explain closures in Javascript",
id: "req-1"
}));
ws.onmessage = (e) => {
const chunk = JSON.parse(e.data);
console.log(chunk.content); // Stream outputs
};
3. Developer SDKs
Copy and integrate these quick code wrappers into your local dev scripts:
Python SDK
from proxima import Proxima
client = Proxima()
res = client.chat(
"Hello",
model="claude"
)
print(res.text)
JavaScript SDK
const { Proxima } = require('proxima');
const client = new Proxima();
const res = await client.chat("Hello", {
model: "claude"
});
console.log(res.text);