You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+36-51Lines changed: 36 additions & 51 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,41 +1,41 @@
1
1
# tdc
2
2
3
-
`tdc`is the command-line interface for TiDB Cloud Filesystem and TiDB Cloud Starter.
3
+
tdc ([TiDB Cloud](https://tidbcloud.com) CLI) is a unified tool to manage your TiDB Cloud Filesystem (FS) and Starter services.
4
4
5
-
> tdc is currently in Preview. Its features and command-line interface might change without prior notice.
5
+
- TiDB Cloud Filesystem is a serverless distributed file system designed specifically for AI coding agent workloads.
6
+
- TiDB Cloud Starter provides serverless distributed database clusters that are fully compatible with MySQL.
6
7
7
-
- TiDB Cloud Filesystem is a distributed file system designed specifically for AI coding agent workloads, with zero infrastructure.
8
-
- TiDB Cloud Starter provides distributed database clusters that are fully compatible with MySQL, with zero infrastructure.
8
+
> `tdc` is currently in preview. Subcommands labeled as preview are subject to change without prior notice.
9
9
10
-
## Your Agent's Toolbelt
10
+
## 3-Command Superpower for Your Agent
11
11
12
-
### Always-on, zero infrastructure file system for sandboxes — The 3-Command Superpower
12
+
### Always-On File System for Sandboxes — Zero Infrastructure Required
13
13
14
-
An agent can persist state between sessions, share files across sandboxes, snapshot its workspace before attempting a risky operation, and roll back on failure — all through a CLI with POSIX compatibility.
14
+
With `tdc`, an agent can persist state between sessions, share files across sandboxes, snapshot its workspace before attempting a risky operation, and roll back on failure — all through a CLI with POSIX compatibility.
15
15
16
-
1. Create a filesystem resource and get the returning token (one-time, out of the sandbox)
16
+
1. Create a file system and obtain the file system token (performed once, outside the sandbox).
### Always-on, zero infrastructure MySQL — The 3-Command Superpower
36
+
### Always-On MySQL — Zero Infrastructure Required
37
37
38
-
An agent can go from zero to live HTAP SQL (Hybrid Transaction / Analytical Processing) in three commands:
38
+
With `tdc`, an agent can go from zero to live HTAP SQL (Hybrid Transaction / Analytical Processing) in three commands:
39
39
40
40
1. Provision a serverless MySQL-compatible cluster, wait until it is active, and capture its ID
41
41
@@ -93,28 +93,31 @@ Add `$HOME\.tdc\bin` to your user `PATH` to keep tdc available in new PowerShell
93
93
94
94
### Configure
95
95
96
-
Configure `tdc` with a TiDB Cloud Public Key and Private Key from the [TiDB Cloud](https://tidbcloud.com/org-settings/api-keys) console. Supported region codes are `aws-us-east-1`, `aws-us-west-2`, `aws-eu-central-1`, `aws-ap-northeast-1`, `aws-ap-southeast-1`, and `ali-ap-southeast-1`.
96
+
- Authentication: a TiDB Cloud Public Key and a Private Key from the [TiDB Cloud API Keys](https://tidbcloud.com/org-settings/api-keys) console.
97
+
- Default region: one of aws-us-east-1, aws-us-west-2, aws-eu-central-1, aws-ap-northeast-1, aws-ap-southeast-1, or ali-ap-southeast-1.
98
+
- Regions support TiDB Cloud Filesystem: aws-us-east-1, aws-ap-southeast-1.
99
+
- Regions support TiDB Cloud Starter: aws-us-east-1, aws-us-west-2, aws-eu-central-1, aws-ap-northeast-1, aws-ap-southeast-1, or ali-ap-southeast-1.
Configure verifies the API key by listing all accessible projects, requires exactly one project with `type = "tidbx_virtual"`, and stores its ID as the profile's default `project_id` in `~/.tdc/config`. API credentials remain in `~/.tdc/credentials`. Configuration fails without changing the profile when project discovery fails.
107
+
Alternatively, set up a default profile interactively by running the command below. You will be prompted to enter your TiDB Cloud Public Key, Private Key, and the default region:
103
108
104
-
```toml
105
-
[default]
106
-
region_code = "aws-us-east-1"
107
-
project_id = "1372813089454645969"
109
+
```shell
110
+
tdc configure
108
111
```
109
112
110
-
### TiDB Cloud Filesystem
113
+
`tdc configure` stores non-sensitive settings in `~/.tdc/config` and API credentials to `~/.tdc/credentials`.
111
114
112
-
Supported regions: `aws-us-east-1` and `aws-ap-southeast-1`.
Automatic mounting uses FUSE on Linux and WebDAV on macOS and Windows. macOS users can install macFUSE and explicitly add `--driver fuse` for the full FUSE experience.
Without `--wait`, file system creation returns after Drive9 accepts provisioning. With the flag, tdc waits up to 10 minutes until the file system root is readable through the public Drive9 data-plane CLI. A timeout or interruption leaves the file system and its locally stored credentials intact.
137
-
138
139
An agent sandbox can then use that existing file system without running `tdc configure` or providing TiDB Cloud API keys:
> **Preview Note:** Creating a new file system automatically provisions and manages a TiDB Cloud Starter database cluster (name prefix `tidbcloud-fs-`) in your TiDB Cloud organization. This is temporary behavior; in future releases, this backend database cluster will no longer be displayed or count against your TiDB Cloud Starter slot limits.
147
+
145
148
### TiDB Cloud Starter
146
149
147
150
```shell
148
151
tdc db create-db-cluster --db-cluster-name my-distributed-mysql --db-cluster-type starter --wait
149
152
```
150
153
151
-
Cluster creation uses the configured `project_id` by default. Use optional `--project-id <project-id>` to create in another accessible project. An explicit empty `--project-id` is rejected instead of falling back to the profile.
152
-
153
-
Without `--wait`, cluster creation returns as soon as TiDB Cloud accepts the asynchronous create request. With the flag, tdc waits up to 12 minutes and returns the final `ACTIVE` cluster. A timeout or interruption leaves the created cluster intact and reports its ID for inspection.
154
-
155
-
Branch creation and cluster deletion have equivalent explicit wait modes:
156
-
157
-
```shell
158
-
tdc db create-db-cluster-branch --db-cluster-id <CLUSTER_ID> --db-cluster-branch-name development --wait
159
-
tdc db delete-db-cluster --db-cluster-id <CLUSTER_ID> --wait
160
-
```
161
-
162
-
Branch waiting lasts up to 5 minutes. Cluster deletion waiting lasts up to 12 minutes and succeeds when the API reports `DELETED` or the deleted cluster is no longer accessible.
163
-
164
-
### Organization Projects
165
-
166
-
```shell
167
-
tdc organization list-projects
168
-
```
169
-
170
-
Each project includes a `type`: `tidbx` identifies a regular project and `tidbx_virtual` identifies a virtual project.
171
-
172
-
## Commands
154
+
## Get Help
173
155
174
-
Running `tdc` without a command returns a usage error and a compact two-level command synopsis. Run `tdc help`, `tdc <command> help`, or `tdc <command> <subcommand> help` for the full command list, flags, and examples. Help displays flag value types in angle brackets and marks required flags with `(required)`.
0 commit comments