feat(cli): add tigris init wizard for AI agent onboarding#203
Conversation
Port the init command from tigrisdata/cli@feat/init-wizard into the monorepo. `tigris init` runs an interactive setup (editor selection, CLI install/update, remote MCP config, agent skills); `tigris init --agent` emits an onboarding plan for an AI coding agent. Assisted-by: Claude Opus 4.8 via Claude Code Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Greptile SummaryThis PR adds an onboarding wizard for connecting Tigris to AI coding agents. The main changes are:
Confidence Score: 4/5The onboarding path is not safe to merge until organization selection, credential cleanup, and configuration failure handling are fixed.
packages/cli/src/lib/init/plan.ts, packages/cli/src/lib/init/shared.ts, packages/cli/src/lib/init/interactive.ts
|
| Filename | Overview |
|---|---|
| packages/cli/src/lib/init/interactive.ts | Adds the interactive flow, CLI installation, MCP writes, and skill installation; write and update failures can leave setup incomplete. |
| packages/cli/src/lib/init/shared.ts | Adds editor definitions, path detection, skill arguments, and JSON/TOML merging; existing alternate config shapes are not handled safely. |
| packages/cli/src/lib/init/plan.ts | Adds the agent setup recipe; organization selection is not applied and temporary credentials are not securely removed. |
| packages/cli/src/lib/init/index.ts | Dispatches cleanly between interactive and agent modes. |
| packages/cli/src/specs.yaml | Registers the new command, alias, examples, and agent flag. |
| packages/cli/package.json | Adds the prompt library used by the interactive wizard. |
Reviews (1): Last reviewed commit: "feat(cli): expand init editors, all-skil..." | Re-trigger Greptile
| if (latest && isNewerVersion(installed, latest)) { | ||
| runCommand( | ||
| 'npm', | ||
| ['install', '-g', '@tigrisdata/cli@latest', '--ignore-scripts'], | ||
| `Updating Tigris CLI ${installed} → ${latest}` | ||
| ); | ||
| return true; | ||
| } |
There was a problem hiding this comment.
Failed Update Reports CLI Available
When the installed CLI is outdated and the global npm update fails, this branch discards the failure and returns true. The handoff then recommends tigris init --agent; an older release that predates init cannot run that command, despite the wizard continuing as if setup succeeded.
| if (latest && isNewerVersion(installed, latest)) { | |
| runCommand( | |
| 'npm', | |
| ['install', '-g', '@tigrisdata/cli@latest', '--ignore-scripts'], | |
| `Updating Tigris CLI ${installed} → ${latest}` | |
| ); | |
| return true; | |
| } | |
| if (latest && isNewerVersion(installed, latest)) { | |
| return runCommand( | |
| 'npm', | |
| ['install', '-g', '@tigrisdata/cli@latest', '--ignore-scripts'], | |
| `Updating Tigris CLI ${installed} → ${latest}` | |
| ).ok; | |
| } |
Xe
left a comment
There was a problem hiding this comment.
Approved modulo the bugbot gripes
| * coding agent to follow — running the listed `tigris` commands itself and | ||
| * making decisions per each step. | ||
| */ | ||
| export function printAgentSetup() { |
There was a problem hiding this comment.
Why is this a function instead of an exposed public const?
There was a problem hiding this comment.
yeah we don't need this as a function
| Add `tigris init` to connect Tigris to AI coding agents. The interactive wizard | ||
| detects installed editors, installs/updates the CLI, writes the Tigris remote | ||
| MCP server config for 10 editors (Claude Code, Cursor, VS Code, Windsurf, Codex, | ||
| Gemini CLI, Cline, Zed, Roo Code, opencode), and installs the Tigris agent |
There was a problem hiding this comment.
replaced with Antigravity CLI
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 85b7cd7. Configure here.
… recipe Build on the initial `tigris init` port: - Support 10 AI editors, each with its verified MCP config: Claude Code, Cursor, VS Code, Windsurf, Codex (TOML), Antigravity CLI, Cline (VS Code globalStorage), Zed (mcp-remote bridge), Roo Code, opencode. MCP files are edited with jsonc-parser so JSONC (comments/trailing commas) survives; shape guards reject non-object maps and inline/annotated TOML keys. - "Defaults" installs all skills without prompting; only "Customize" asks. - `tigris init --agent` prints a plain-text setup recipe (org select, secure temp file for the secret, correct IAM endpoint) and suppresses the update-notifier so stdout stays clean. - Cross-platform: spawn npm/npx/tigris via cmd.exe on Windows; global skills dirs honor XDG_CONFIG_HOME/CODEX_HOME; detect editors where we actually write (Cline globalStorage, Antigravity ~/.gemini/config, opencode .jsonc). - Robust command handling: keep the process alive during the registry check, surface install/update failures, verify `tigris` on PATH after install, and update via the CLI's own updater (npm/brew/binary). Adds @clack/prompts and jsonc-parser; changeset included. Assisted-by: Claude Opus 4.8 via Claude Code Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
85b7cd7 to
6c29adc
Compare

What
Adds
tigris init— brings over the init-wizard work from the oldtigrisdata/clirepo (feat/init-wizard) into the monorepo'spackages/cli, then extends it.Two modes:
tigris init— interactive wizard: detects installed editors, installs/updates the CLI, writes the Tigris remote MCP server config, and installs the Tigris agent skills (vianpx skills). No login — the remote MCP server authenticates in-browser on first connect.tigris init --agent— prints a plain-text setup recipe for an AI coding agent to run itself (no interactive prompts, no JSON).Editors supported (MCP config + skills)
10 editors, each written with its real MCP config shape (verified against each tool's docs):
mcpServershttpUrlmcp{type:remote,enabled}mcpServersstreamable-http, project.roo/mcp.jsoncontext_serversmcp-remotebridge[mcp_servers.tigris]upsertNotes
@clack/promptspinned to^1.7.0.Verification
tigris init --agentoutput and the non-TTY guard exercised end-to-end.specs-completeness).@tigrisdata/climinor).🤖 Generated with Claude Code
Note
Medium Risk
The wizard writes and merges user/editor config files and can run global
npm install/npx; mistakes could break local MCP setups, though errors are isolated per editor and secrets are only described in the--agentrecipe, not written by init itself.Overview
Adds
tigris init(aliasstart) as a new onboarding command inspecs.yaml, wired throughpackages/cli/src/lib/init/.Interactive mode runs a
@clack/promptswizard: detect installed AI editors, optionally install/update the global CLI (npm install -gortigris update), merge the hosted Tigris MCP server (https://mcp.storage.dev/mcp) into each editor’s config (JSON/JSONC viajsonc-parser, TOML for Codex), and install Tigris skills vianpx skills add. It setsTIGRIS_NO_UPDATE_CHECKso the normal post-command update notifier doesn’t interrupt the flow, requires a TTY, and ends with a note to runtigris init --agent(ornpx @tigrisdata/cli init --agent).--agentmode only prints the plain-text recipe fromplan.ts(login, org/bucket, access key +.envguidance) for a coding agent to execute—no prompts or file writes in that path.Shared logic in
shared.tscovers 10 editors (per-tool MCP shapes, scope fallbacks, editor detection, skills args). Per-editor MCP failures are logged and skipped so one bad config doesn’t abort the rest.Minor release noted in
.changeset/cli-init-wizard.md; lockfile picks up the new dependencies.Reviewed by Cursor Bugbot for commit 6c29adc. Bugbot is set up for automated code reviews on this repo. Configure here.