Tailored AI

@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 chat with session sidebar, agent switcher, expandable tool results.
  • 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 cron, Discord, 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 --initRe-run the setup wizard.
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 lsList installed skills and resources.

Full reference: tai --help.

Subcommands for cron and workflow inspection (tai cron list, tai workflow run, etc.) are on the v0.2 roadmap. For now the web UI exposes both.

Configuration

The CLI reads config.yaml from the cwd by default, or from $TAI_HOME if set. Override with --config <path> for one-off runs.

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:     startServer() (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. Fork the monorepo, edit packages/ui/src/, run pnpm --filter @tailored-ai/ui run build.
  2. Or build your own UI against the HTTP API and point your tai invocation at it via --ui-dist /path/to/your/build (planned flag).

The CLI has no opinion about which UI it serves. It static-mounts a directory.

Source

packages/cli/ in the monorepo.