Purpose of this page: show what the CLI offers, and why it speaks HTTP
instead of importing application code — with one deliberate exception.
Layer 2
cli/ (commander)
The only user interface. Commander programs that reach the daemon over HTTP, or run before it exists.
Components
kanthord serve
Starts the daemon. Invokes serve() in main.ts, which wires every
dependency and binds the listener.
kanthord db migrate
The one direct-storage command in the product. main.ts constructs the storage implementation and passes the migration handler into the program, so this file still imports no implementation.
kanthord config generate
Generates a local daemon configuration file.
Remote resource commands
project · node · plan · repository · credential · actor · event · status. Each one is a typed client of an HTTP operation.
DaemonClient (cli/client.ts)
Renders the request path from the operation registry in
http/contract/, then calls fetch. One client serves every remote command.
Inbound edges
| From | Meaning |
|---|---|
| operator | runs resource commands in a shell |
| main.ts | buildProgram, constructs the programs with bound handlers |
Outbound edges
| From | To | Meaning |
|---|---|---|
| serve | main.ts | invokes serve() |
| db migrate | main.ts | invokes migrate() |
| remote commands | DaemonClient | every remote call funnels through one client |
| DaemonClient | operation registry | renders requests from |
| DaemonClient | listen(bind:port) | HTTP + Bearer token |
Rules
- The CLI imports no command and no query. It renders paths from
http/contract/and speaks HTTP. - This layer may import domain, contract, and cli — nothing else.