Set up Tiden with your agent
One prompt, and your coding agent installs Tiden, connects your repository, and starts drafting your specs.
Works withClaude CodeCursorCopilotCodexGemini CLI

Copy this into your agent.
Run it in your repository. In your browser, you approve the sign-in, then choose a plan and install the GitHub App on one page.
Set up Tiden: follow https://tiden.ai/agentRather do it yourself? Install the CLI, then run tiden setup.
$ curl -fsSL https://tiden.ai/install.sh | bashThe quickstart has the rest.
What your agent reads.
This is the response your agent gets at tiden.ai/agent, also at /agent.md.
HTTP/2 200 OK
content-type: text/markdown; charset=utf-8
# Set up Tiden in this repository
You are a coding agent, and the user asked you to set up Tiden in the
repository you are working in. Tiden reads the repository, drafts its specs
(what the code is supposed to do), and shows which specs no test proves.
If a tool summarized this page for you, fetch the exact text instead:
`curl -fsSL https://tiden.ai/agent.md`.
Work through the steps in order. Every step is safe to run again. Choose
defaults yourself and tell the user what you chose. Stop only where a step
says **STOP FOR THE USER**.
## Rules
- Never ask the user for a password, API token, or card number. Sign-in and
plan choice happen in their browser.
- Never invent a workspace or product name when the user has to choose one.
Ask them.
- Never work around a STOP FOR THE USER step.
- Pass `--format json` to every `tiden` command whose output you read.
- Exit code 3 means the user has to do something. It is not a failure: show
them the link and wait.
## 1. Check the repository
```
git rev-parse --show-toplevel
git remote get-url origin
```
- The first must succeed. If it fails, tell the user Tiden needs a git
repository and stop.
- The remote should be on GitHub. For GitLab or Azure Repos, finish steps
2 and 3, then tell the user to connect the repository at
https://app.tiden.ai and stop.
## 2. Install the CLI
If `tiden version` already works, run `tiden upgrade` instead, so the CLI
has the commands below.
macOS or Linux:
```
curl -fsSL https://tiden.ai/install.sh | bash -s -- --skip-setup
```
macOS with Homebrew, if the user prefers it:
```
brew install --cask qase-tms/tap/tiden
```
Windows (PowerShell):
```
& ([scriptblock]::Create((irm https://github.com/qase-tms/homebrew-tap/releases/latest/download/install.ps1))) -SkipSetup
```
The installer prints `Installed: <path>`. If `tiden` is not on PATH in your
shell, call it by that path for the rest of these steps.
## 3. Sign in and bind the repository
```
tiden setup --agent --yes --skip-claude-permissions --skip-codex-sandbox --format json
```
**STOP FOR THE USER** when it exits 3. It prints a sign-in link and a code, and
tries to open the link in the browser. Show the user both and ask them to
approve (a new user signs up on the same page). When they say they have,
run the same command again. It picks up the same sign-in.
When it succeeds it prints JSON with `workspaceName`, `productId`, and
`repoBound`. It binds this repository to a Tiden product: the only one there
is, or a new one named after the repository. It writes `.tiden/config.json`,
which is safe to commit, installs Tiden's skills for your agent, and adds
capture hooks so Tiden can see what each coding session was asked to do.
Tell the user what it set up.
If it stops to ask for a choice, see the table below.
## 4. Connect GitHub and start drafting specs
```
tiden onboard --format json
```
**STOP FOR THE USER** when it exits 3 with `"status": "action_required"`.
`missing` says what is left: `plan` (choose a plan)
and/or `github_app` (install the Tiden GitHub App on this repository). Both
happen on the one page in `connectUrl`. Show the user that link. When they
say they are done, run `tiden onboard --format json` again.
When it prints `"status": "drafting"`, Tiden has started drafting the specs.
It runs in the background, so don't wait for it. Tiden emails the user when
it is done, and the Tiden web app shows the progress.
## 5. Show the user what Tiden drafted
```
tiden onboard status --format json
```
- `"status": "drafting"`: still running. Tell the user it is under way and
that they can ask you to check again once Tiden's email arrives. If you can
keep a long command running, `--wait 5m` waits up to five minutes for it
to finish.
- `"status": "ready"` or `"partial"`: summarize the result for the user:
the components (`components`), how many specs Tiden drafted (`specCount`),
and the specs no test proves yet (`unproven`, `unprovenCount`). Those are
where tests are missing. Point them to `specsUrl` to review the drafted
specs.
- `"status": "failed"`: tell the user `error`. If `next` says so, retry with
`tiden onboard --retry --format json`.
## When something goes wrong
| Message | What to do |
|---|---|
| `unknown flag: --agent` | The CLI is older than these steps. Run `tiden upgrade`, then step 3. |
| `Not logged in, and no terminal for browser approval.` | You ran `tiden setup` without `--agent`. Run step 3 as written. |
| `Waiting for the user to approve this CLI in the browser.` (exit 3) | Show the user the link and code, wait for them, then run step 3 again. |
| `The sign-in link is no longer valid` | The link expired after 10 minutes. Run step 3 again for a new one. |
| `Sign-in was denied in the browser.` | Ask the user whether they meant to deny it. Run step 3 again only if they ask. |
| `This repository needs a choice: <id> (<name>) — <account>; ...` (exit 2) | **STOP FOR THE USER.** Ask which workspace to use, then run step 3 with `--workspace-id <id>`. No second sign-in is needed. |
| `multiple products found; rerun with --product-id` | **STOP FOR THE USER.** Run `tiden product list --format json`, ask which product this repository belongs to, then run step 3 with `--product-id <id>`. |
| `--product-id is required` | Step 3 did not bind the repository. Run it again. |
| This repository has no `origin` remote. | Ask the user for the GitHub repository and pass it: `tiden onboard --repo github.com/<owner>/<repo> --format json`. |
| `... already belongs to another Tiden product.` | **STOP FOR THE USER.** Tell the user the repository is already in another Tiden product, and to sort it out in the Tiden web app. |
| `The plan has no room for another repository on this product.` | Tell the user to change their plan in the Tiden web app, then run step 4 again. |
| `Agent onboarding connects GitHub repositories` | Tell the user to connect this repository at https://app.tiden.ai. |
| `rate limited after retries` | Tell the user to try again later. |
| `authentication failed — token invalid or expired` (exit 2) | Run step 3 again to sign in. |
| `BILLING_BLOCKED` | Tell the user their Tiden organization needs attention in the web app's billing settings. |
For anything else, show the user the error and the `hint:` lines the CLI
printed.