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

FromMeaning
operatorruns resource commands in a shell
main.tsbuildProgram, constructs the programs with bound handlers

Outbound edges

FromToMeaning
servemain.tsinvokes serve()
db migratemain.tsinvokes migrate()
remote commandsDaemonClientevery remote call funnels through one client
DaemonClientoperation registryrenders requests from
DaemonClientlisten(bind:port)HTTP + Bearer token

Rules

  1. The CLI imports no command and no query. It renders paths from http/contract/ and speaks HTTP.
  2. This layer may import domain, contract, and cli — nothing else.