Manage TiDB Cloud Filesystem
With TiDB Cloud CLI (ti), you can create and manage file system resources in TiDB Cloud Filesystem and work with their files from a terminal or automation workflow.
Create and use a file system
Before you begin, install and configure TiDB Cloud CLI with API keys that can create a file system in your organization. Choose a supported file system region when you run ti configure.
Create a file system and wait until it is ready:
ti fs create-file-system --display-name my-workspace --wait
Copy the returned file_system_id and replace <file-system-id> in the following commands. The CLI stores the file system token locally. Treat the returned fs_token (file system token) as a secret; do not share the command output publicly.
echo "Hello from my workspace" | ti fs copy-file --file-system-id "<file-system-id>" --from-stdin --to-remote /hello.txt
ti fs read-file --file-system-id "<file-system-id>" --path /hello.txt
The read returns Hello from my workspace. For supported regions, detailed setup, and cleanup instructions, follow Get Started with TiDB Cloud Filesystem.
More file system tasks
After creating a file system, refer to the following guides for file system tasks:
For syntax, flags, and output fields, see the ti fs command reference.