@tailored-ai/cli
The tai command. The most common way to run TAI.
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:3000when you runtai. Chat, sessions, agents, workflows, memory, tasks. - Setup wizard (
tai init): probes your provider, discovers models, writesconfig.yamland.env. - HTTP service: same Hono API from
@tailored-ai/server, with channels, cron, schedules, workers, rooms, and webhook intake running in-process.
Commands
| Command | What it does |
|---|---|
tai | Start 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-agents | Print all agents your config defines. |
tai --list-sessions | Print recent sessions. |
tai init | Create or replace the instance config with the setup wizard. |
tai edit | Edit the current instance in the terminal settings UI. |
tai project init --name "…" | Register cwd as a project. |
tai project list | Show all registered projects. |
tai vault set <ns> <key> | Store a secret in the encrypted vault (browser-mediator $ref expansion). |
tai vault list | List vault keys (no values). |
tai resources list | List 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:
- Build your own UI against the HTTP API and serve it separately.
- Package a UI provider plugin, register it with
ctx.uiProviders.register(id, factory), and select it withserver.ui.provider. - To change the bundled UI itself, edit
packages/ui/src/and runpnpm --filter @tailored-ai/ui run build.
Set server.ui.enabled: false for a headless deployment.
Source
packages/cli/
in the monorepo.