FabricFabricHarness
CLI

Fiber terminal console

Operate jobs, persistent agents, streams, tool calls, and approvals from a keyboard-first terminal UI.

Fiber is Fabric Harness's optional terminal UI. Open it with fh fiber. Fiber is a client of the public Fabric HTTP protocol: it does not start a second runtime or bypass server policy. Authentication, tenant isolation, durable admission, offsets, tool events, and approval resolution behave the same as other clients.

For the shortest local loop, start the Node dev server and Fiber together:

FABRIC_HARNESS_API_TOKEN=local-token fh dev --mock --console

--console is intentionally limited to fh dev --target node. Cloudflare and Temporal development processes keep their existing external lifecycle and can be observed by running fh fiber --url ... separately.

Start the server in one terminal:

FABRIC_HARNESS_API_TOKEN=local-token fh dev --mock

Then open the interactive console:

FABRIC_HARNESS_API_TOKEN=local-token fh fiber

Fiber reads /admin/agents and presents an explicit selected row, connection state, activity pane, and input line. Use the arrow keys and Enter to choose a finite job or persistent agent. Persistent agents use --id <instance> when supplied and default otherwise. Messages are admitted asynchronously. You can keep typing while a turn is active: Fiber shows pending prompts and admits them in order through the server's durable FIFO path. It follows each returned offset and renders assistant messages, tool calls, tool results, approval events, errors, and terminal settlement. Model and tool output is stripped of terminal control sequences before it is rendered. Color is supplemental—selection and run state are also labeled in text.

Use Escape to return to target selection when the queue is idle. Ctrl-C aborts the active client request, clears prompts that have not been admitted, and exits. Fiber never prints bearer tokens.

One-shot jobs

fh fiber --job report --input '{"topic":"weekly usage"}'

Input must be JSON. The job uses the authenticated /jobs/:name route and prints the complete result envelope.

One-shot persistent messages

fh fiber \
  --agent support \
  --id customer-42 \
  --session billing \
  --message "Where is invoice 1007?"

Use --url for a deployed server, --tenant for explicit operator tenant selection, and --token-env when the bearer token is stored under a different environment variable:

PROD_AGENT_TOKEN=... fh fiber \
  --url https://agents.example.com \
  --token-env PROD_AGENT_TOKEN \
  --tenant acme \
  --agent support --id customer-42 --message "Retry the export"

Tokens are read from the environment rather than command arguments, so they do not appear in shell history or process listings.

Plain and non-interactive terminals

Use fh fiber --plain for the line-oriented prompt. CI and redirected stdin are not TTYs, so Fiber fails with actionable guidance in those environments. One-shot --job and --agent --message commands remain non-interactive and do not load Fiber.

Interactive commands

CommandEffect
:approvals <session-id>List approval requests for a session.
:approve <session-id> <approval-id> [reason]Approve through the server's RBAC route.
:reject <session-id> <approval-id> [reason]Reject through the same route.
:quitClose the terminal client.

The identity used to resolve an approval comes from the authenticated server principal. Text typed after the approval id is a reason, not an actor override.

Failure behavior

  • Connection and HTTP failures remain visible in the status and activity panes; they never become successful output.
  • Additional prompts remain visible in Fiber's queue and are admitted in order; a failed prompt does not prevent the next queued prompt from running.
  • Closing Fiber aborts active polling and discards prompts that were not yet admitted. Work already durably admitted remains governed by the server and can be inspected by run/submission id.
  • ANSI, OSC, and control bytes in model/tool output are removed before terminal rendering.
  • Missing or invalid authentication is reported by the server and Fiber preserves the server's public, redacted error message.
  • Exiting Fiber launched by fh dev --console closes the watcher and dev server cleanly.