Skip to main content

Advanced

The terminal way: the xiaohe command, terminal chat, running a Session that windows connect to, and model providers. Everything on this page runs on the machine that hosts the Agent.

Install the Agent first — see the Quickstart. After a fresh install, open a new terminal and see where things stand:

xiaohe init # continue setup if the installer left steps pending
xiaohe doctor # report what is missing

xiaohe init resumes rather than restarts, so it is safe to repeat.

Terminal chat​

A model key is required before replies are useful — see Model providers.

xiaohe # start the default agent
xiaohe workspace init # scaffold a project workspace (optional)

Running a Session for windows​

xiaohe server ensure # install + start + write a local chat key when missing

This is the command that lets the desktop Client, the Web UI, and the phone connect. xiaohe server pair mints an additional key, prints it once, and by default writes it into the desktop settings file (--write-client). A browser ignores that file, so its key has to be pasted by hand.

To check on the service:

xiaohe server status
xiaohe server doctor
xiaohe server logs

Manage keys later with xiaohe keys issue|list|revoke …. A Session key is for chat only — it is neither a Pro license nor a cloud token. Overview keeps the four credentials side by side.

Model providers​

A fresh install has no DeepSeek preset yet. Add one, then switch to it:

xiaohe provider add DeepSeek --kind deepseek --switch
xiaohe switch provider # list presets
xiaohe switch provider deepseek # switch to an existing DeepSeek preset
xiaohe switch provider kimi --model kimi-k2.6 --base-url <URL>
xiaohe switch provider claude

add prompts for the key with hidden input. The --key flag on the same command is meant for scripts — it lands in your shell history.

xiaohe provider also lists, removes, and stores keys. They stay on that machine, and the same setting appears as Settings → Assistant in the app.

Update and uninstall​

xiaohe upgrade # public channel
xiaohe upgrade --beta # soak channel
xiaohe uninstall

Command reference​

AreaCommands
Localstatus · version · doctor · init (setup) · upgrade · uninstall · switch · provider · completion
Serverensure · install · start · stop · restart · status · doctor · logs · pair · uninstall

Prefer these lifecycle commands day to day over the hidden foreground helpers (server api, worker, and the like) that the OS service calls internally.

For integrations​

  • Session API — REST endpoints for driving agents from your own tools and pipelines
  • Model gateway — one Anthropic-compatible endpoint for DeepSeek, Kimi, and Claude