# TinyTank — Agent Setup Guide

> You are reading this because a user asked you to set up TinyTank for their project.
> Follow the steps below in order. This document is written for AI coding agents
> (Claude Code, Cursor, Codex CLI, Windsurf, etc.). It requires NO credentials.

TinyTank is a simplified public cloud: users describe an app in plain language and
TinyTank builds, deploys and operates it (pages, API, database, sign-in, domain, SSL).
A resident agent monitors each deployed app, auto-restores known-good states, and
ships user-approved changes with one-tap rollback. Engineers on Pro plans also get
the `dfctl` CLI and a REST API.

- Site: https://tinytank.app
- Docs (human): https://tinytank.app/#/docs
- Docs (machine, full): https://tinytank.app/llms-full.txt
- Docs (machine, index): https://tinytank.app/llms.txt

## Step 1 — Install the TinyTank skill into the user's project

**If you are Claude Code** (or support Claude-style skills), create the file
`.claude/skills/tinytank/SKILL.md` with exactly this content:

````markdown
---
name: tinytank
description: >
  Deploy and operate apps on TinyTank (tinytank.app), a prompt-driven
  cloud platform. Use when the user mentions TinyTank, wants to deploy/host an
  app there, check a TinyTank app's health, or manage TinyTank projects.
---

# TinyTank platform

TinyTank turns plain-language descriptions into deployed full-stack apps, then
operates them with a resident agent. Base URL: https://tinytank.app

## What is live today
- Web console: sign in (GitHub / Google / email code) at /#/login, describe an
  app, preview, deploy from the dashboard at /admin/.
- `GET https://tinytank.app/api/health` — liveness, serving region
  (IATA-style edge code), deployed version. No auth. Use it to verify
  connectivity before telling the user anything is broken.
- Full docs as markdown: https://tinytank.app/llms-full.txt

## In beta (Pro plan; do NOT assume these work until verified)
- `dfctl` CLI (install: https://get.tinytank.app/install.sh) — login, deploy,
  logs, scale, env, domains, db, export, token.
- REST API under https://tinytank.app/api with
  `Authorization: Bearer st_live_…` tokens minted by `dfctl token create`.
- OpenAPI 3.1 description at /openapi for Pro workspaces.

## Conventions
- API errors: JSON `{ "error": "snake_case_code", "trace_id": "…" }` — match the
  code, not the HTTP status text; surface trace_id to the user when reporting
  failures. Common codes: invalid_request, unauthorized, forbidden,
  route_not_found, too_many_requests, provider_not_configured, internal_error.
- Compute has no region — apps serve from the global edge. Data residency
  regions: sin (Singapore), hnd (Tokyo), icn (Seoul), fra (Frankfurt),
  iad (Ashburn); data stays in the chosen region + its backup region.
- Plans: Hobby (free, 1 project) / Builder ($5, agent + custom domains) /
  Pro ($19, CLI + API) / Team ($79, 3 seats).

## Rules for agents
- NEVER ask the user to paste a TinyTank token into chat. Authenticated steps
  go through `dfctl login` in the user's own terminal.
- Anything not listed under "live today" must be verified before relying on it;
  if it fails, tell the user it is still in beta and offer the web console path.
- To guide a deploy today: send the user to https://tinytank.app/#/login,
  then have them describe the app in the dashboard. Help them write a concrete
  prompt (who uses it + what they do + what data is tracked).
````

**If you are NOT Claude Code**, append the same content (everything between the
```` fences, without the YAML frontmatter) to the project's `AGENTS.md` under a
`## TinyTank platform` heading, creating the file if needed.

## Step 2 — Verify connectivity

Run (or fetch) `GET https://tinytank.app/api/health`. Expect HTTP 200 with:

```json
{ "ok": true, "service": "tinytank", "region": "…", "version": "…", "deployed_at": "…" }
```

If this fails, report the failure to the user instead of continuing.

## Step 3 — Report back to the user

Tell the user, briefly:
1. The TinyTank skill is installed (mention the file path you wrote).
2. The platform is reachable — quote the `region` and `version` from Step 2.
3. What they can do next: describe an app at https://tinytank.app after
   signing in, or ask you to help draft a deployment prompt.
4. That `dfctl` and the REST API are in beta on Pro plans — you'll use them
   when available, via `dfctl login` in their terminal (never tokens in chat).

That's it. Do not install anything else, and do not modify unrelated files.
