Generated Go CLI for Mosoo integrators: Public Thread API, Console GraphQL, and console REST.
make buildThis clones or updates the Mosoo repository under .cache/mosoo, exports OpenAPI / GraphQL
specs, renders specs/sources.yaml and overlays/*.yaml, runs Lathe code generation, and
builds bin/mosoo.
Override the API host base baked into per-module defaults:
make build MOSOO_HOST_BASE=https://api.example.comRequires Lathe on PATH for codegen (go install github.com/lathe-cli/lathe/cmd/lathe@main).
make installBy default, installation uses go env GOBIN, or $(go env GOPATH)/bin when
GOBIN is empty. Override the destination with BINDIR:
make install BINDIR="$HOME/.bin"cli.command_path is namespaced: every generated command lives under its source module
(console, console-rest, or public-thread-api). Root-level flat mounting is not used
because the CLI ships three API surfaces.
Help text, examples, and error hints for generated commands come from overlays/*.yaml
(regenerated by scripts/render-overlays.ts during make build).
Three API surfaces share one deployment but use different URL bases:
| CLI module | Default hostname (from MOSOO_HOST_BASE) |
Example paths |
|---|---|---|
console, console-rest |
{base}/api |
/graphql, /access-tokens, /files |
public-thread-api |
{base}/api/v1 |
/agents/{id}/threads, /threads/{id}/events |
Defaults are baked at codegen time (MOSOO_HOST_BASE, default http://127.0.0.1:8787).
Override any command with --hostname or $MOSOO_HOST.
Create a personal access token from the Mosoo web app, then log in once per hostname base (same token is fine):
mosoo auth login --hostname http://127.0.0.1:8787/api
mosoo auth login --hostname http://127.0.0.1:8787/api/v1 --skip-validateauth login validates the token against GET /access-tokens on the /api host.
The /api/v1 entry reuses the same credential; --skip-validate avoids a 404 on that base.
mosoo console user viewer
mosoo console apps app-list --organization-id <org-id>
mosoo public-thread-api threads create --agent-id <agent-id> --file body.json
mosoo public-thread-api events list-events --thread-id <thread-id>
mosoo search "list apps" --json
mosoo commands show console apps app-list --jsonUse commands show before executing an unfamiliar generated command so flags,
body shape, auth, and output format are explicit.