@tailored-ai/cli

The tai command. The most common way to run TAI.

bash
npm install -g @tailored-ai/cli

What ships

  • REPL: an interactive terminal conversation with the selected agent.
  • One-shot mode (tai -m "…"): runs a single message and exits. Useful for shell scripts and quick prototyping.
  • Project mode (tai project init): register a directory as a project. Sessions, cron, tasks, and Discord channel mappings scope to it.
  • Bundled web UI: served at http://localhost:3000 when you run tai. Chat, sessions, agents, workflows, memory, tasks.
  • Setup wizard (tai init): probes your provider, discovers models, writes config.yaml and .env.
  • HTTP service: same Hono API from @tailored-ai/server, with channels, cron, schedules, workers, rooms, and webhook intake running in-process.

Commands

CommandWhat it does
taiStart the HTTP API, web UI, Discord bot (if configured), and cron scheduler. Drops into a REPL on stdin.
tai -m "msg"One-shot message. Prints response, exits.
tai -a coder -m "…"Use a specific named agent.
tai -s <session-id>Resume an existing session.
tai --json -m "…"Output structured JSON. Designed for scripting.
tai --list-agentsPrint all agents your config defines.
tai --list-sessionsPrint recent sessions.
tai initCreate or replace the instance config with the setup wizard.
tai editEdit the current instance in the terminal settings UI.
tai project init --name "…"Register cwd as a project.
tai project listShow all registered projects.
tai vault set <ns> <key>Store a secret in the encrypted vault (browser-mediator $ref expansion).
tai vault listList vault keys (no values).
tai resources listList installed skills and resources.

Full reference: tai --help.

The CLI does not currently expose cron and workflow inspection subcommands. Use the web UI or HTTP API for those surfaces.

Configuration

The CLI reads ~/.tailored-ai/config.yaml by default, or the config under $TAI_HOME when set. Override with --config <path>; its parent becomes the home directory for that run.

Everything else lives in Configuration. The CLI adds no required config beyond what the core runtime requires.

How the CLI relates to the other packages

The CLI is a thin wrapper:

tai  →  loads config.yaml
     →  creates AgentRuntime (from @tailored-ai/core)
     →  wires up channels (Discord, file-drop, pollers)
     →  either: REPL loop  (interactive)
        or:     createServer() (from @tailored-ai/server)

Most of the logic — tool registry, agent loop, session compaction, cron, memory — lives in @tailored-ai/core. To build a fundamentally different surface (a TUI, a Discord-only deployment, a Slack-only deployment), skip the CLI and embed @tailored-ai/core directly.

Replacing the bundled UI

ui-dist/ inside the published tarball is the built React SPA. To customize:

  1. Build your own UI against the HTTP API and serve it separately.
  2. Package a UI provider plugin, register it with ctx.uiProviders.register(id, factory), and select it with server.ui.provider.
  3. To change the bundled UI itself, edit packages/ui/src/ and run pnpm --filter @tailored-ai/ui run build.

Set server.ui.enabled: false for a headless deployment.

Source

packages/cli/ in the monorepo.