Command-line interface

Talk to Rootcomputer models from a terminal.

ChatHaikuCLI is a lightweight Python client for interactive model use. Switch between the whole Rootcomputer lineup by name, connect key-protected providers, download training corpora, run plugin workflows, tune sampling, and collect local preference data.

$ python chathaiku.py
No pip install 7 models API key manager Dataset browser Plugin-ready SFT / DPO JSONL
chathaiku_dev.py
$ python chathaiku_dev.py Endpoint: https://chathaiku.com/api/haiku.php You: /endpoint epos3 Probing Epos 3... ok You: Explain quantum computing epos3: Quantum computing uses qubits to represent and process information in ways classical bits cannot. You: /endpoint silas karotte requires an API key. karotte API key (input hidden): ******** Probing Silas... ok You: /rc list datasets 9 dataset(s) available
Two clients

Simple chat when you need it. Developer controls when you need more.

The repository ships with a public client for everyday terminal use and a developer client for endpoint testing, sampling control, and preference-data collection.

chathaiku.py Public client

Start chatting immediately.

Uses the default public ChatHaiku endpoint, supports basic commands, and keeps the interface intentionally small.

$python chathaiku.py
  • Interactive conversation loop
  • Clear and save transcripts
  • Custom endpoint support
  • ANSI color toggle
chathaiku_dev.py Developer client

Evaluate model behavior from the terminal.

Switch models by name, manage provider API keys, download training corpora, inspect health, tune sampling, reload plugins, and collect structured SFT/DPO records locally.

$python chathaiku_dev.py --server epos3
  • Model switching by key
  • API key management
  • Dataset browser and downloader
  • Sampling controls and presets
  • Runtime plugin reloads
  • Preference-data capture
Model registry

Switch models by name, not by URL.

The developer client keeps a registry of every Rootcomputer model plus partner providers. Type a key and it resolves the endpoint, probes it, and switches. Endpoint locations are published as a manifest, so new models appear without updating the client.

model switching
/models
  Registered models (probing 7 endpoints)...
  * haiku   Haiku H2   ok   params=217,515,008
    tanka   Tanka 3.5  ok
    epos    Epos       ok
    epos2   Epos 2     ok
    epos3   Epos 3     ok
    koda    Koda       ok
    silas   Silas      ok   [no sampling]

/endpoint epos3
/endpoint silas
/karotte list models
Model families

Two wire protocols, one interface.

Rootcomputer models use the chathaiku shape with full sampling control. Partner models such as Silas use the karotte shape, which is stateless per request and exposes no sampling parameters. The client detects the shape from the route structure and handles each protocol correctly, so switching between them is a single command.

/endpoint koda /endpoint karotte:silas

01

Rootcomputer lineup

Haiku H2, Tanka 3.5, Epos, Epos 2, Epos 3, and Koda are registered out of the box. No key required.

/endpoint haiku · /endpoint epos3
02

Silas by Karotte

A partner model reachable through the same interface. Requires an API key, which the client prompts for and stores securely.

/endpoint silas
03

Live status board

Probe every registered endpoint at once and see which are reachable, which model each reports, and their parameter counts.

/models · /rc list models
Terminal tools

Practical controls for model testing.

01

Endpoint switching

Move between registered models, a local /api/chat route, or any self-hosted base server without editing the script.

/endpoint epos3 · /endpoint localhost:8000
02

Sampling controls

Adjust temperature, top-p, top-k, max tokens, repetition penalty, and no-repeat n-gram settings during a session.

/temp 0.7 · /top-p 0.9 · /max-new 200
03

Health checks

Probe any endpoint without switching to it. Failures report the exact route, HTTP status, and reason instead of a bare error.

/ping silas · /info
04

Conversation tools

Clear context, view history, save transcripts, retry the last generation, or undo the last exchange.

/history · /save FILE · /retry · /undo
05

SFT positives

Mark good replies and save positive examples for supervised fine-tuning datasets.

/good → data/sft_positive.jsonl
06

DPO pairs

Rewrite poor answers into chosen/rejected preference pairs for alignment experiments.

/bad · /rewrite → data/dpo_pairs.jsonl
07

API key management

Keys are prompted for without echo, stored outside the endpoint config with restricted permissions, and always displayed masked.

/apikey set karotte · /apikey test
08

Dataset browser

List the training corpora published on rootcomputer.dev and download any of them with a progress bar and resume-safe writes.

/rc list datasets · /rc get dataset ID
09

Endpoint discovery

Model locations are fetched from a published manifest and cached locally, so the lineup can change without a client update.

/endpoints · /endpoints refresh
10

Screen clearing

Clear the terminal the way a shell does, keeping the session header in place while wiping scrollback.

/cls
11

Optional plugins

Drop plugin files into a /plugins folder, reload from the terminal, and extend the developer client without editing the core script.

/plugin · /plugin reload · /plugin help
Optional plugins

Extend the developer client without changing the core script.

ChatHaikuCLI can load Python plugin files from a local plugins/ folder. Plugins can register their own slash commands, inspect or adjust sampling state, read conversation history, write preference data, and run one-off chat calls through the active endpoint.

plugin session
$ python chathaiku_dev.py --plugins-dir plugins
/plugin
  autodpo: /autodpo
  duel: /duel, /vs
  evaluator: /evaluator, /eval
/plugin help duel
/duel run epos koda --max-turns 20
Plugin contract

Small files, clear boundaries.

Each plugin defines a Plugin subclass with a name, optional slash commands, and a handler. The client provides a session context so plugins can work with the current endpoint, sampling profile, conversation, and local SFT/DPO collectors — and can resolve and call any registered model, not just the active one.

plugins/my_tool.py /plugin reload
autodpo.py

AutoDPO

Regenerates DPO preference data using your current model's actual output. Point it at an existing dataset of prompt and chosen rewrites, and AutoDPO queries your model fresh for every prompt, captures the response as the new rejected, and writes a clean training-ready JSONL — clearing conversation history between every record to keep pairs context-independent.

  • Live model queries. Each rejected sample reflects your current deployed model rather than historical failures.
  • Identical-response filtering. Skips pairs where the model already produces the chosen reply, so you only train on real preference gaps.
  • Resumable runs. Use --resume to continue after a Ctrl-C or crash. Output is appended live, so partial progress is never lost.
  • HuggingFace-ready. Accepts both line-delimited JSONL and standard JSON-array files without conversion.
  • Configurable filters. Length thresholds, per-request delay, and processing limits adjust via flags.
  • Live progress reporting. Accepted/rejected counts, throughput, and ETA print every five records.
/ autodpo run input.jsonl output.jsonl --resume
evaluator.py

Evaluator

Runs multi-choice benchmark tests against the currently selected model endpoint. Drop JSONL test files into plugins/evaluator/tests/, then run one test or the full suite directly from ChatHaikuCLI. Evaluator formats each question, queries the model with deterministic sampling, parses the answer letter, and saves structured JSON results to plugins/evaluator/results/.

  • Drop-in test files. Add any number of .jsonl benchmark files to the tests folder with no registration step.
  • Single-test or suite runs. Run one benchmark with /evaluator run or every available test with /evaluator run-all.
  • Deterministic scoring. Uses eval-focused sampling defaults so model answers are easier to compare across runs.
  • Category breakdowns. When questions include a category field, results include per-category accuracy summaries.
  • Partial result saving. Ctrl-C during a run preserves completed progress instead of losing the session.
  • Result history. Saved JSON result files can be listed and reopened from inside the CLI.
/ evaluator run example.jsonl --verbose
duel.py

Duel

Puts two model endpoints into conversation with each other. Each model believes it is talking to a user — in reality its "user" is the other model. Useful for cross-model behavioural evaluation, adversarial probing, generating self-play datasets, and watching two small models try to hold a conversation.

  • Any two endpoints. Model keys, family:model pairs, or raw URLs — including across different providers.
  • Per-model sampling. Give each side its own temperature, top-p, top-k, and token budget to pit a hot model against a cold one.
  • Independent histories. Each model keeps its own view of the conversation, so neither can tell it is talking to a machine.
  • Full transcripts. Every run is saved as JSONL with per-turn latency, speaker, and a run summary.
  • Cross-protocol duels. Handles differing wire protocols automatically, so a Rootcomputer model can debate a partner model.
  • Interruptible. Ctrl-C ends the run cleanly and still writes a valid transcript.
/ duel run epos koda --max-turns 20 --a-temp 0.9
Workflow

One terminal session can test, tune, and collect training data.

The developer client is designed for iterative model review. Use it to compare models side by side, pull training corpora, adjust generation behavior, load optional plugins, save good answers, and convert poor replies into useful preference examples.

01 Pick a model

Switch by key, or point at a direct chat route or local base URL.

02 Run prompts

Chat normally while the CLI manages JSON payloads and history.

03 Adjust sampling

Tune generation parameters without restarting the process.

04 Collect feedback

Write positive SFT examples and DPO pairs as local JSONL files.

05 Pull datasets

Download training corpora from rootcomputer.dev without leaving the terminal.

Compatible HTTP API

Small client. Plain JSON contract.

ChatHaikuCLI speaks two endpoint shapes. Rootcomputer servers expose POST /api/chat returning a JSON reply field, with an optional /api/health route. Partner endpoints such as Karotte use a stateless shape the client detects automatically from the route structure.

request.json
{
  "history": [
    { "role": "user", "content": "Hello" }
  ],
  "temperature": 0.85,
  "top_p": 0.92,
  "max_new_tokens": 200
}
response.json
{
  "reply": "Hello. How can I help?"
}
karotte-request.json
POST {base}/ai/chat
{
  "model": "silas",
  "message_history": { },
  "message": "Hello"
}
karotte-response.json
{
  "answer": "Hello! How can I help you today?",
  "message_history": { }
}