dfctl Getting started入门
TinyTank turns a plain-language description into a running full-stack app — pages, API, database and sign-in — then keeps it running with a resident agent that monitors, fixes and ships the changes you ask for.TinyTank 把一句大白话变成一个运行中的全栈应用——页面、接口、数据库、登录一应俱全;随后由常驻智能体接管:监控、修复,并按你的要求持续上线改动。
One sentence becomes a deployed app with a domain and SSL. No YAML, no dashboards to wire together.一句话变成已部署、带域名和 SSL 的应用。没有 YAML,不用拼接一堆控制台。
A resident agent watches logs and metrics 24/7, patches failures, and ships approved changes with one-tap undo.常驻智能体 7×24 盯着日志与指标,自动修复故障;改动经你确认后上线,随时一键撤销。
Full CLI (dfctl) and REST API on Pro plans. Eject any project to a plain Git repo, any time.专业版提供完整 CLI(dfctl)与 REST API;任何项目随时可导出为标准 Git 仓库。
Plan comparison and prices live on the Pricing page — the docs don't repeat them. Where a capability needs a specific plan, you'll see a PRO badge next to it.套餐对比与价格统一在定价页,文档不再重复。需要特定套餐的能力,旁边会标 PRO 徽标。
Getting started入门
From sign-up to a live app in about five minutes. Nothing to install — everything happens in the browser.从注册到应用上线大约五分钟。无需安装任何东西——全程在浏览器里完成。
Go to tinytank → Log in and continue with GitHub, Google, or an email code. Your first sign-in creates the account — no extra forms.打开 tinytank → 登录,用 GitHub、Google 或邮箱验证码继续。首次登录自动建号,不用填任何表单。
In the dashboard, write what you want in one or two sentences. Be concrete about who uses it and what they do:在控制台用一两句话写出你想要什么。把谁来用和用它做什么说具体:
A booking site for my pottery studio. Customers pick a class from a weekly calendar, pay a deposit, and get a confirmation email. I manage classes and see bookings in a private admin page.
TinyTank drafts the app and shows a working preview: every page, the data model, and sign-in flow. Click around. Anything off? Say so in plain words — "the calendar should start on Monday" — and the preview updates.TinyTank 会生成应用初稿并给出可点击的预览:每个页面、数据模型、登录流程。随便点点看,哪里不对就直接说——比如「日历应该从周一开始」——预览随之更新。
Press Deploy. Your app goes live on a platform subdomain with SSL, e.g. https://pottery.tinytank.app. Share the link — it's already fast worldwide.点击部署。应用即刻上线,带平台子域名和 SSL,例如 https://pottery.tinytank.app。直接分享链接——全球访问都很快。
After launch, changes go through your resident agent (Builder plan and up). Open the project, type the request, approve the proposal:上线后,改动都经由常驻智能体完成(创造者档及以上)。打开项目,输入需求,确认方案:
Add a "gift voucher" option at checkout — fixed amounts of $30 / $50 / $100, delivered as a PDF by email.
The agent replies with a plain-language plan and a preview diff. Nothing ships until you approve, and every shipped change has a one-tap undo.智能体会用大白话回复改动方案,并附预览对比。未经你确认不会上线;每次上线的改动都支持一键撤销。
Getting started入门 · AI
If you already use a coding agent — Claude Code, Cursor, Codex CLI, Windsurf — it can learn TinyTank by reading one URL. No SDK, no API key required to get started.如果你已经在用编码智能体——Claude Code、Cursor、Codex CLI、Windsurf——只要让它读一个网址,它就能学会 TinyTank。起步不需要 SDK,也不需要 API key。
Your agent fetches the page, installs a TinyTank skill into your project, and verifies the platform connection — then it knows how to deploy and operate apps here.它会自己抓取页面、往你的项目里安装 TinyTank skill、并验证平台连通性——之后它就知道怎么在这里部署和运维应用了。
Read https://tinytank.app/install.md and set up TinyTank for this project.
/install.md — a machine-oriented setup guide with explicit, ordered steps.读取 /install.md——一份面向机器的接入指南,步骤明确且有序。.claude/skills/tinytank/SKILL.md; for other tools it adds an AGENTS.md section. The skill teaches platform concepts, CLI commands and API conventions.安装 skill——Claude Code 写入 .claude/skills/tinytank/SKILL.md,其它工具则在 AGENTS.md 里加一节。skill 教会它平台概念、CLI 命令和 API 规约。GET /api/health and reports the live region and version back to you.验证连通性——调用 GET /api/health,把线上区域和版本号汇报给你。| URL | Format格式 | Purpose用途 |
|---|---|---|
/llms.txt | llms.txt standardllms.txt 标准 | Index of docs for LLMs — start here for discovery.给 LLM 的文档索引——发现入口从这里开始。 |
/llms-full.txt | Markdown | The entire documentation in one file, for context windows.全部文档合一的单文件,方便塞进上下文窗口。 |
/install.md | Markdown | Agent setup instructions: install the skill, verify, report.智能体接入指南:装 skill、验证、汇报。 |
/api/health | JSON | Liveness, serving region and deployed version. No auth.存活状态、服务区域、部署版本。无需鉴权。 |
dfctl login yourself — keep secrets in your terminal, not the transcript.永远不要把 API token 粘进聊天。整个接入流程不需要任何凭证。之后智能体需要鉴权访问时,它会请你自己在终端执行 dfctl login——密钥留在终端里,不进聊天记录。Guides指南
The prompt is your spec. A few habits make the difference between a first draft you keep and one you redo.提示词就是你的需求文档。几个小习惯,决定初稿是「直接能用」还是「推倒重来」。
| Instead of…与其说… | Say…不如说… | Why为什么 |
|---|---|---|
| "A website for my business"「给我的店做个网站」 | "A booking site for my pottery studio with paid reservations"「给我的陶艺工作室做个可在线付款的预约网站」 | Names the user and the core action.点明了用户是谁、核心动作是什么。 |
| "Make it look nice"「做好看点」 | "Warm, craft-shop feel; big photos; works well on phones"「温暖的手作小店风;大图;手机上要好用」 | Style words the builder can act on.这些风格词是可以落地执行的。 |
| "Add a database"「加个数据库」 | "Track classes (date, capacity, price) and bookings per customer"「记录课程(日期、名额、价格)和每位顾客的预约」 | Describe the data, not the technology.描述数据本身,而不是技术名词。 |
| "Login system"「要有登录系统」 | "Customers book as guests; only I sign in, to manage classes"「顾客免登录直接预约;只有我登录管理课程」 | Who needs auth is the real decision.真正要决定的是「谁需要登录」。 |
Treat the preview like a conversation, not a final exam. Three small rounds beat one giant prompt:把预览当成对话,而不是期末考试。三轮小迭代,胜过一个巨型提示词:
Get the main flow working end to end first — list classes, book, pay.先让主链路端到端跑通——浏览课程、预约、付款。
"Calendar starts Monday." "Deposits are 20%." "Send me an email per booking." Each lands as its own reviewed change.「日历从周一开始」「定金改 20%」「每笔预约给我发邮件」。每条都是一次可审阅的独立改动。
Once live, your resident agent reports what visitors actually hit — and proposes the next improvements.上线后,常驻智能体会汇报访客实际遇到了什么,并主动提出下一步改进。
Guides指南
Every project on Builder and above gets an agent that lives next to your app. It's the part of TinyTank nobody else does — hosting that doesn't just run your app, but looks after it.创造者档及以上,每个项目都配有一个与应用同在的智能体。这是 TinyTank 独有的部分——托管不只是让应用跑着,还有人照看它。
| Capability能力 | Trigger触发方式 | Needs approval?需要确认吗? |
|---|---|---|
| Watch — logs, metrics, uptime probes值守——日志、指标、存活探测 | Continuous, 24/77×24 持续进行 | No (read-only)否(只读) |
| Fix — restore to last known-good state, restart, roll back a bad deploy修复——恢复到最近正常状态、重启、回滚坏的部署 | Detected failure检测到故障 | No — recovery only, reported after否——仅限恢复,事后汇报 |
| Change — new features, copy, design, data model edits改动——新功能、文案、设计、数据模型调整 | Your plain-language request你的大白话需求 | Always永远需要 |
| Upkeep — certificate renewals, database upgrades, backups保养——证书续期、数据库升级、备份 | Scheduled按计划进行 | No, announced in advance否,但会提前告知 |
The agent never spends beyond what you set. Each project has a monthly agent budget (default: included in your plan); anything that would exceed it — say, a load test or a large migration — is quoted first and waits for your go-ahead.智能体的开销永远不会超过你的设定。每个项目都有月度智能体预算(默认已含在套餐内);任何会超出预算的事——比如压测或大型迁移——都会先报价,等你点头。
Pick your channel in project settings: email digests, push notifications via the mobile app, or a webhook (API reference). Incidents and auto-fixes are always reported, with the before/after and the reason.在项目设置里选你的通知渠道:邮件摘要、App 推送,或 webhook(见 API 参考)。事故与自动修复一定会汇报,附改动前后对比和原因。
Guides指南
Every app launches on a platform subdomain like pottery.tinytank.app. On Builder and above, attach your own domain in two steps.每个应用上线时都带平台子域名,如 pottery.tinytank.app。创造者档及以上,两步即可绑定你自己的域名。
Project → Settings → Domains → Add, enter www.potterybythebay.com. TinyTank shows the DNS records to create.项目 → 设置 → 域名 → 添加,输入 www.potterybythebay.com。TinyTank 会列出需要创建的 DNS 记录。
At your registrar, create the records exactly as shown:在你的域名注册商处,按提示原样创建记录:
| Type类型 | Name名称 | Value值 |
|---|---|---|
CNAME | www | edge.tinytank.app |
TXT | _stratum-verify | stratum-site-verification=… (shown in settings)(设置页可见) |
Verification usually completes within a minute of DNS propagating. Certificates are issued and renewed automatically — your resident agent treats an expiring cert as routine upkeep, so you never think about TLS again.DNS 生效后通常一分钟内完成校验。证书自动签发并自动续期——常驻智能体把临期证书当作日常保养处理,你从此不用再想 TLS 这回事。
potterybythebay.com without www) work too — use an ALIAS/ANAME record, or let TinyTank host the DNS zone and we handle it for you.裸域名(不带 www 的 potterybythebay.com)同样支持——用 ALIAS/ANAME 记录,或者把 DNS 托管给 TinyTank,我们替你搞定。Reference参考 · PRO BETA
Engineers get the same platform with full control: deploy any repository, tail logs, manage environments. dfctl is included with Pro and Team plans and is currently in beta.工程师以完全可控的方式使用同一个平台:部署任意仓库、跟踪日志、管理环境。dfctl 含于专业版与团队版,目前处于 beta。
curl -fsSL https://get.tinytank.app/install.sh | sh dfctl --version
brew install tinytank-cloud/tap/dfctl dfctl --version
winget install TinyTank.dfctl dfctl --version
# Authenticate (opens the browser once, stores a scoped token) $ dfctl login # Deploy the current repo — auto-detects build, or uses your Dockerfile $ dfctl deploy --data-region sin ✓ built in 41s · deployed to https://pottery.tinytank.app ✓ data region sin · backup hnd · serving at the global edge # Watch it run $ dfctl logs api --follow $ dfctl status
| Command命令 | What it does作用 |
|---|---|
dfctl login | Authenticate via browser; stores a scoped token in your OS keychain.浏览器授权登录;受限 token 存进系统钥匙串。 |
dfctl init | Create tinytank.json in the current repo (name, data region, services).在当前仓库生成 tinytank.json(名称、数据驻留区域、服务)。 |
dfctl deploy | Build and ship the current directory. --data-region, --env staging.构建并发布当前目录。支持 --data-region、--env staging。 |
dfctl status | Health, version and traffic for every service in the project.项目内各服务的健康、版本与流量。 |
dfctl logs <svc> | Tail logs. --follow, --since 1h, --grep.查看日志。支持 --follow、--since 1h、--grep。 |
dfctl scale <svc> <n> | Set instance count, or --auto with scale-to-zero.设定实例数,或 --auto 自动伸缩(可缩到零)。 |
dfctl env | List / set / unset environment variables and secrets per environment.按环境查看/设置/删除环境变量与密钥。 |
dfctl domains | Attach and verify custom domains from the terminal.在终端里绑定并校验自定义域名。 |
dfctl db | Open a console, create branches, trigger backups of the built-in database.内置数据库:开控制台、建分支、触发备份。 |
dfctl export | Eject the project to a plain Git repo with Dockerfiles and config.把项目导出为带 Dockerfile 和配置的标准 Git 仓库。 |
dfctl token create | Mint a scoped API token for CI or your coding agent.为 CI 或编码智能体签发受限 API token。 |
dfctl open | Open the project dashboard in the browser.在浏览器打开项目控制台。 |
dfctl projects and described apps coexist in the same workspace — your team can mix both. Every project, from either path, can be exported with dfctl export.dfctl 项目与「一句话应用」共存于同一工作区,团队可以混用两种方式。无论哪种来路的项目,都能用 dfctl export 导出。Reference参考 · PRO BETA
Everything the dashboard does is available over HTTPS.控制台能做的一切都可以通过 HTTPS 完成。
Base URL: https://tinytank.app/api
Create a scoped token with dfctl token create, then send it as a bearer header. Tokens are scoped per project and per permission (read / deploy / admin).先用 dfctl token create 签发受限 token,然后放进 bearer 请求头。token 按项目、按权限(读 / 部署 / 管理)隔离。
curl https://tinytank.app/api/projects \ -H "Authorization: Bearer st_live_…"
GET /api/health is open and live on this very site. It returns the serving region (an IATA-style edge code) and the deployed version:GET /api/health 在本站就是开放且真实在线的。它返回服务区域(IATA 风格的边缘节点码)和部署版本:
$ curl -s https://tinytank.app/api/health
{
"ok": true,
"service": "tinytank",
"region": "SIN",
"version": "8d4c02b1-…",
"deployed_at": "2026-06-12T08:15:00Z"
}| Method & path方法与路径 | Description说明 |
|---|---|
GET /api/health | Liveness, region, version. No auth.存活、区域、版本。无需鉴权。 |
GET /api/projects | List projects in your workspace.列出工作区内的项目。 |
POST /api/projects | Create a project from a prompt or a repo URL.用提示词或仓库地址创建项目。 |
GET /api/projects/:id | Project detail: services, domains, environments.项目详情:服务、域名、环境。 |
POST /api/projects/:id/deploys | Trigger a deploy (from source upload or Git ref).触发部署(源码上传或 Git 引用)。 |
GET /api/projects/:id/deploys | Deploy history with status and rollback targets.部署历史,含状态与可回滚目标。 |
POST /api/projects/:id/rollback | One-tap undo, as an API call.一键撤销的 API 形态。 |
GET /api/projects/:id/logs | Query logs. ?since=, ?grep=, ?follow=1 (SSE).查询日志。?since=、?grep=、?follow=1(SSE)。 |
GET /api/usage | Metered usage and current spend, per project.按项目的计量用量与当前花费。 |
POST /api/webhooks | Subscribe to deploy / incident / agent-report events.订阅部署 / 事故 / 智能体汇报事件。 |
An OpenAPI 3.1 description is available to Pro workspaces at /openapi.专业版工作区可在 /openapi 获取 OpenAPI 3.1 描述文件。
Errors are JSON with a machine-readable error code in snake_case — match on the code, not the HTTP text. Every error carries a trace_id (also echoed as the x-trace-id header); include it when contacting support:错误响应是 JSON,带 snake_case 的机器可读 error 码——请匹配错误码,不要匹配 HTTP 文案。每个错误都带 trace_id(同时回显在 x-trace-id 响应头);联系支持时请附上:
{ "error": "too_many_requests", "trace_id": "8f2c1a4be9d03c77" }| Code错误码 | HTTP | Meaning含义 |
|---|---|---|
invalid_request | 400 | Malformed body or missing field.请求体格式错误或缺字段。 |
unauthorized | 401 | Missing or expired token.token 缺失或过期。 |
forbidden | 403 | Token lacks the required scope.token 权限范围不足。 |
route_not_found | 404 | No such endpoint or resource.端点或资源不存在。 |
too_many_requests | 429 | Rate limited — back off per Retry-After.触发限流——按 Retry-After 退避。 |
provider_not_configured | 501 | The feature isn't enabled for this workspace.该功能在此工作区未开通。 |
internal_error | 500 | Our fault. Retried safely; report if persistent.我们的问题。可安全重试;持续出现请反馈。 |
Reference参考
Compute has no region — your app and static assets are served from the global edge, close to every visitor. What you choose is where data lives: five residency regions, each backed up to a second one.计算没有区域概念——应用与静态资源一律由全球边缘就近服务。需要选择的是数据存放在哪:五个驻留区域,各自备份到第二区域。
| Residency region驻留区域 | Slug | Location位置 | Backup region备份区域 |
|---|---|---|---|
| 🇸🇬 Singapore新加坡 | sin | Singapore新加坡 | Tokyo东京 |
| 🇯🇵 Japan日本 | hnd | Tokyo东京 | Seoul首尔 |
| 🇰🇷 Korea韩国 | icn | Seoul首尔 | Tokyo东京 |
| 🇪🇺 EU欧洲 | fra | Frankfurt法兰克福 | Amsterdam阿姆斯特丹 |
| 🇺🇸 US美国 | iad | Ashburn, Virginia弗吉尼亚 Ashburn | Dallas达拉斯 |
Feature comparison and prices are on the Pricing page; below are the technical numbers the docs are asked about most.功能对比与价格见定价页;这里只列文档里最常被问到的技术数字。
| Hobby | Builder | Pro | Team | |
|---|---|---|---|---|
| Storage存储 | 100 MB | 5 GB | 50 GB | 200 GB |
| Log retention日志保留 | 48 h | 7 days7 天 | 30 days30 天 | 90 days90 天 |
| Environments环境数 | 1 | 1 | 3 | 3 |
| Custom domains自定义域名 | — | 3 / project3 个/项目 | 20 / project20 个/项目 | 20 / project20 个/项目 |
| API rate limitAPI 限流 | — | — | 600 req/min | 1,200 req/min |
Soft limits (request volume, build minutes) scale elastically with usage.软性限额(请求量、构建时长)随用量弹性扩展。
Reference参考
Short answers to the questions we hear most. Something missing? Ask your resident agent — or your own coding agent, once it's connected.高频问题的简短回答。没找到想问的?问你的常驻智能体——或者接入之后,问你自己的编码智能体。
dfctl export (or ask the agent) to get the full project as a plain Git repo with Dockerfiles and config — no proprietary runtime.是的。代码、数据、域名都是你的。执行 dfctl export(或直接吩咐智能体)即可把完整项目导出为带 Dockerfile 和配置的标准 Git 仓库——没有私有运行时。dfctl deploy ships any repo, with auto-detected builds or your own Dockerfile. Described apps and code-first apps coexist in one workspace.可以,专业版支持:dfctl deploy 能发布任意仓库,自动识别构建或用你自己的 Dockerfile。「一句话应用」和代码优先的应用共存于同一工作区。dfctl export is that the result builds anywhere.无聊但可带走的那种:带类型的 Web 框架、兼容 Postgres 的数据库、标准 Docker 镜像。dfctl export 的意义就在于,导出的东西在哪都能构建。