-
Notifications
You must be signed in to change notification settings - Fork 126
424 docs rfcadd docs for the cli #4453
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
billy-the-fish
wants to merge
36
commits into
503-cli-mcp-agent-milestone-branch
Choose a base branch
from
424-docs-rfcadd-docs-for-the-cli
base: 503-cli-mcp-agent-milestone-branch
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 26 commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
bbdd988
chore: add first files.
a48e482
chore: first draft of the REST API docs
496846a
chore: update and test.
0aa622e
chore: update and test.
5625bfd
Merge branch 'latest' into rest-api
billy-the-fish ddba359
Merge branch 'latest' into rest-api
billy-the-fish 0141fbc
Merge branch 'latest' into rest-api
billy-the-fish 20a0a27
Fix spec. Better examples and documentation
josesahad 2f12d32
Fix replica set retrieval docs
josesahad b31c7e8
Merge branch 'latest' into rest-api
billy-the-fish 81b21fc
chore: few small updates.
39a62ae
chore: few small updates.
15cc114
Merge branch 'latest' into rest-api
billy-the-fish 131c385
Merge branch 'latest' into rest-api
billy-the-fish 3238fef
chore: change title to give space for the CLI
df580c9
Merge branch 'latest' into rest-api
billy-the-fish fece7f1
Merge branch 'latest' into rest-api
billy-the-fish d77f554
chore: commit for pull from latest.
50daa6f
Merge branch 'latest' of https://github.com/timescale/docs into 424-d…
cd73149
chore: cli docs.
6c24803
Apply suggestions from code review
billy-the-fish a45b764
chore: updates on review.
f932dee
Merge branch 'latest' into rest-api
billy-the-fish 1fac045
chore: updates on review.
6c51d65
Merge branch 'rest-api' of https://github.com/timescale/docs into res…
a11bf56
Merge branch 'rest-api' into 424-docs-rfcadd-docs-for-the-cli
billy-the-fish 9519e90
Apply suggestion from @nathanjcochran
billy-the-fish acd6526
Apply suggestion from @nathanjcochran
billy-the-fish 14e1e1f
chore: updates on review.
64eaeb2
Apply suggestions from code review
billy-the-fish 2245ca6
chore: updates on review.
5180505
chore: updates on review.
8ef16b7
chore: updates on review.
1344101
chore: updates on review.
b6b978a
chore: updates on review.
ef3b492
chore: add fork and free.
billy-the-fish File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,218 @@ | ||
import RESTPrereqs from "versionContent/_partials/_prereqs-cloud-account-only.mdx"; | ||
|
||
$CLI_LONG is a command-line interface that you use to manage $CLOUD_LONG resources | ||
including VPCs, services, read replicas, and related infrastructure. $CLI_LONG calls $REST_LONG to communicate with | ||
$CLOUD_LONG. | ||
|
||
This page shows you how to install and set up secure authentication for $CLI_LONG, then create your first | ||
service. | ||
|
||
## Prerequisites | ||
|
||
<RESTPrereqs /> | ||
|
||
|
||
## Install and configure $CLI_LONG | ||
|
||
<Procedure> | ||
|
||
1. ** Install $CLI_LONG** | ||
billy-the-fish marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
||
Use the Terminal to install the $CLI_SHORT: | ||
billy-the-fish marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
<Tabs label="Install Tiger CLI" persistKey="os"> | ||
|
||
<Tab title="Debian" label="debian"> | ||
|
||
```shell | ||
curl -s https://packagecloud.io/install/repositories/timescale/tiger-cli/script.deb.sh | sudo os=any dist=any bash | ||
sudo apt-get install tiger-cli | ||
``` | ||
|
||
</Tab> | ||
|
||
<Tab title="Ubuntu" label="ubuntu"> | ||
|
||
```shell | ||
curl -s https://packagecloud.io/install/repositories/timescale/tiger-cli/script.deb.sh | sudo bash | ||
billy-the-fish marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
sudo apt-get install tiger-cli | ||
``` | ||
</Tab> | ||
|
||
<Tab title="Red Hat" label="redhat"> | ||
|
||
```shell | ||
curl -s https://packagecloud.io/install/repositories/timescale/tiger-cli/script.rpm.sh | sudo os=rpm_any dist=rpm_any bash | ||
sudo yum install tiger-cli | ||
``` | ||
|
||
</Tab> | ||
|
||
<Tab title="Fedora" label="fedora"> | ||
|
||
```shell | ||
curl -s https://packagecloud.io/install/repositories/timescale/tiger-cli/script.rpm.sh | sudo bash | ||
billy-the-fish marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
sudo yum install tiger-cli | ||
``` | ||
|
||
</Tab> | ||
|
||
<Tab title="MacOs" label="macos"> | ||
|
||
```shell | ||
brew install --cask timescale/tap/tiger-cli | ||
``` | ||
|
||
</Tab> | ||
|
||
<Tab title="x-platform" label="xplatform"> | ||
|
||
```shell | ||
curl -fsSL https://tiger-cli-releases.s3.amazonaws.com/install/install.sh | sh | ||
``` | ||
|
||
</Tab> | ||
|
||
</Tabs> | ||
|
||
1. **Set up API credentials** | ||
|
||
1. Log $CLI_LONG into your $ACCOUNT_LONG | ||
billy-the-fish marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
||
```shell | ||
tiger auth login | ||
``` | ||
$CLI_LONG opens $CONSOLE_SHORT in your browser. Login, then click `Authorize`. | ||
billy-the-fish marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
||
1. Select a $PROJECT_LONG. | ||
nathanjcochran marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
||
If only one $PROJECT_SHORT is associated with your $ACCOUNT_SHORT, this step is not shown. | ||
|
||
Where possible, $CLI_LONG stores your authentication information in the system keychain/credential manager. | ||
If that fails, the key is stored in `~/.config/tiger/api-key` with restricted file permissions (600). | ||
$CLI_LONG stores your configuration in `~/.config/tiger/config.yaml`. | ||
|
||
1. **Test your authenticated connection to $CLOUD_LONG by listing services** | ||
|
||
```bash | ||
tiger service list | ||
``` | ||
|
||
This call returns something like: | ||
- No services: | ||
```terminaloutput | ||
🏜️ No services found! Your project is looking a bit empty. | ||
🚀 Ready to get started? Create your first service with: tiger service create | ||
``` | ||
- One or more services: | ||
|
||
```terminaloutput | ||
┌────────────┬─────────────────────┬────────┬─────────────┬──────────────┬──────────────────┐ | ||
│ SERVICE ID │ NAME │ STATUS │ TYPE │ REGION │ CREATED │ | ||
├────────────┼─────────────────────┼────────┼─────────────┼──────────────┼──────────────────┤ | ||
│ tgrservice │ tiger-agent-service │ READY │ TIMESCALEDB │ eu-central-1 │ 2025-09-25 16:09 │ | ||
└────────────┴─────────────────────┴────────┴─────────────┴──────────────┴──────────────────┘ | ||
``` | ||
|
||
</Procedure> | ||
|
||
|
||
## Create your first service | ||
|
||
Create a new $SERVICE_LONG using $CLI_LONG: | ||
|
||
<Procedure> | ||
|
||
1. **Submit a service creation request** | ||
```shell | ||
tiger service create | ||
``` | ||
$CLOUD_LONG creates a Development environment for you. That is, no delete protection, high-availability, spooling or | ||
read-replication. You see something like: | ||
billy-the-fish marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
```terminaloutput | ||
🚀 Creating service 'db-11111' (auto-generated name)... | ||
✅ Service creation request accepted! | ||
📋 Service ID: happyservice | ||
🔐 Password saved to system keyring for automatic authentication | ||
🎯 Set service 'happyservice' as default service. | ||
⏳ Waiting for service to be ready (wait timeout: 30m0s)... | ||
⏳ Service status: QUEUED... | ||
🎉 Service is ready and running! | ||
``` | ||
This $SERVICE_SHORT is set as default by the $CLI_SHORT. | ||
|
||
1. **Check the $CLI_SHORT configuration** | ||
```shell | ||
tiger config show | ||
``` | ||
You see something like: | ||
```terminaloutput | ||
api_url: https://console.cloud.timescale.com/public/api/v1 | ||
console_url: https://console.cloud.timescale.com | ||
gateway_url: https://console.cloud.timescale.com/api | ||
docs_mcp: true | ||
docs_mcp_url: https://mcp.tigerdata.com/docs | ||
project_id: tgrproject | ||
service_id: tgrservice | ||
output: table | ||
analytics: true | ||
password_storage: keyring | ||
debug: false | ||
config_dir: /Users/<username>/.config/tiger | ||
``` | ||
|
||
</Procedure> | ||
|
||
And that is it, you are ready to use $CLI_LONG to manage your $SERVICE_SHORTs in $CLOUD_LONG. | ||
|
||
## Commands | ||
|
||
You can use the following commands with $CLI_LONG. For more information on each command, use the `-h` flag. For example: | ||
`tiger auth login -h` | ||
|
||
| Command | Subcommand | Description | | ||
|---------|----------------------------------|------------------------------------------------------------------------------------------------| | ||
| auth | | Manage authentication and the credentials for your $ACCOUNT_LONG | | ||
| | login | Create an authenticated connection to your $ACCOUNT_LONG | | ||
| | logout | Remove the credentials used to create authenticated connections to $CLOUD_LONG | | ||
| | whoami | Show information about the current user | | ||
| version | | Show information about the currently installed version of $CLI_LONG | | ||
| config | | Manage your $CLI_LONG configuration | | ||
| | show | Show the current configuration | | ||
| | set `<key>` `<value>` | Set a specific value in your configuration. For example, `tiger config set debug true` | | ||
| | unset `<key>` | Clear the value of a configuration parameter. For example, `tiger config unset debug` | | ||
| | reset | Reset the configuration to the defaults. This also logs you out from the current $PROJECT_LONG | | ||
| service | | Manage the $SERVICE_LONGs in this $PROJECT_SHORT | | ||
| | describe `<service-id>` | Show detailed information about a specific $SERVICE_SHORT in this $PROJECT_SHORT | | ||
| | list | List all the $SERVICE_SHORTs in this $PROJECT_SHORT | | ||
| | create | Create a new $SERVICE_SHORT in this $PROJECT_SHORT | | ||
| | delete `<service-id>` | Delete a $SERVICE_SHORT from this $PROJECT_SHORT | | ||
| | update-password `<service-id>` | Update the password for a $SERVICE_SHORT | | ||
| db | | Database operations and management | | ||
| | connection-string `<service-id>` | Retrieve the connection string for a $SERVICE_SHORT | | ||
| | connect `<service-id>` | Connect to a $SERVICE_SHORT | | ||
| | test-connection `<service-id>` | Test the connectivity to a $SERVICE_SHORT | | ||
| mcp | | Manage the $MCP_LONG | | ||
| | start | Start the $MCP_LONG. This is the same as `tiger mcp start stdio` | | ||
| | start `stdio` \| `http` | Start the $MCP_LONG with stdio or HTTP transport. | | ||
billy-the-fish marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
||
## Flags | ||
|
||
You can use the following global flags with $CLI_LONG: | ||
|
||
| Flag | Default | Description | | ||
|--|-----------------|-----------------------------------------------------------------------| | ||
| --analytics | `true` | Set to `false` to disable usage analytics. | | ||
billy-the-fish marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| --config-dir string | `.config/tiger` | Set the directory that holds `config.yaml` | | ||
| --debug | No debugging | Enable debug logging | | ||
| -o, --output string | table | Set the output format. Options are `json`, `yaml`, or `table` | | ||
| --password-storage string | keyring | Set the password storage method. Options are `keyring`, `pgpass`, or `none` | | ||
| --project-id string | - | Set the $PROJECT_LONG to manage. | | ||
billy-the-fish marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| --service-id string | - | Set the $SERVICE_LONG to manage. | | ||
billy-the-fish marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
||
|
||
|
||
[rest-api-reference]: /api/:currentVersion:/api-reference/ | ||
[rest-api-credentials]: https://console.cloud.timescale.com/dashboard/settings | ||
[get-project-id]: /integrations/:currentVersion:/find-connection-details/#find-your-project-and-service-id | ||
[create-client-credentials]: /integrations/:currentVersion:/find-connection-details/#create-client-credentials | ||
[curl]: https://curl.se/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,158 @@ | ||
import RESTPrereqs from "versionContent/_partials/_prereqs-cloud-account-only.mdx"; | ||
|
||
[$REST_LONG][rest-api-reference] is a comprehensive RESTful API you use to manage $CLOUD_LONG resources | ||
including VPCs, $SERVICE_SHORTs, and read replicas. | ||
|
||
This page shows you how to set up secure authentication for the $REST_LONG and create your first $SERVICE_SHORT. | ||
|
||
## Prerequisites | ||
|
||
<RESTPrereqs /> | ||
|
||
* Install [curl][curl]. | ||
|
||
|
||
## Configure secure authentication | ||
|
||
$REST_LONG uses HTTP Basic Authentication with access keys and secret keys. All API requests must include | ||
proper authentication headers. | ||
|
||
<Procedure> | ||
|
||
1. **Set up API credentials** | ||
|
||
1. In $CONSOLE [copy your project ID][get-project-id] and store it securely using an environment variable: | ||
billy-the-fish marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
||
```bash | ||
export TIGERDATA_PROJECT_ID="your-project-id" | ||
``` | ||
|
||
1. In $CONSOLE [create your client credentials][create-client-credentials] and store them securely using environment variables: | ||
billy-the-fish marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
||
```bash | ||
export TIGERDATA_ACCESS_KEY="Public key" | ||
export TIGERDATA_SECRET_KEY="Secret key" | ||
``` | ||
|
||
1. **Configure the API endpoint** | ||
|
||
Set the base URL in your environment: | ||
|
||
```bash | ||
export API_BASE_URL="https://console.cloud.timescale.com/public/api/v1" | ||
``` | ||
|
||
1. **Test your authenticated connection to $REST_LONG by listing the $SERVICE_SHORTs in the current $PROJECT_LONG** | ||
|
||
```bash | ||
curl -X GET "${API_BASE_URL}/projects/${TIGERDATA_PROJECT_ID}/services" \ | ||
-u "${TIGERDATA_ACCESS_KEY}:${TIGERDATA_SECRET_KEY}" \ | ||
-H "Content-Type: application/json" | ||
``` | ||
|
||
This call returns something like: | ||
- No $SERVICE_SHORTs: | ||
```terminaloutput | ||
[]% | ||
``` | ||
- One or more $SERVICE_SHORTs: | ||
|
||
```terminaloutput | ||
[{"service_id":"a59clooxoe","project_id":"c8nmagk8zh","name":"events", | ||
"region_code":"eu-central-1","service_type":"TIMESCALEDB", | ||
"created":"2025-09-09T08:37:15.816443Z","paused":false,"status":"READY", | ||
"resources":[{"id":"101228","spec":{"cpu_millis":500,"memory_gbs":2,"volume_type":""}}], | ||
"metadata":{"environment":"DEV"},"endpoint":{"host":"oh.yeah.tsdb.cloud.timescale.com", | ||
"port":12345}}] | ||
``` | ||
|
||
</Procedure> | ||
|
||
|
||
## Create your first $SERVICE_LONG | ||
|
||
Create a new $SERVICE_SHORT using the $REST_LONG: | ||
|
||
<Procedure> | ||
|
||
1. **Create a $SERVICE_SHORT using the POST endpoint** | ||
```bash | ||
curl -X POST "${API_BASE_URL}/projects/${TIGERDATA_PROJECT_ID}/services" \ | ||
-u "${TIGERDATA_ACCESS_KEY}:${TIGERDATA_SECRET_KEY}" \ | ||
-H "Content-Type: application/json" \ | ||
-d '{ | ||
"name": "my-first-service", | ||
"service_type": "TIMESCALEDB", | ||
"region_code": "us-east-1", | ||
"replica_count": 1, | ||
"cpu_millis": 1000, | ||
"memory_gbs": 4 | ||
}' | ||
``` | ||
$CLOUD_LONG creates a Development environment for you. That is, no delete protection, high-availability, spooling or | ||
read-replication. You see something like: | ||
billy-the-fish marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
```terminaloutput | ||
{ | ||
"service_id":"asdfasdfasdf","project_id":"asdasdfasf","name":"my-first-service", | ||
"region_code":"us-east-1", "service_type":"TIMESCALEDB", | ||
"created":"2025-09-09T09:24:31.997767396Z", "paused":false,"status":"READY", | ||
"resources":[{"id":"101240", | ||
"spec":{"cpu_millis":1000,"memory_gbs":4,"volume_type":""}}], | ||
"metadata":{"environment":"PROD"}, | ||
"endpoint":{"host":"oh.yeah.tsdb.cloud.timescale.com","port":123435}, | ||
"initial_password":"very-secret", | ||
"ha_replicas":{"sync_replica_count":0,"replica_count":1} | ||
} | ||
``` | ||
|
||
1. Save `service_id` from the response to a variable: | ||
billy-the-fish marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
```bash | ||
# Extract service_id from the JSON response | ||
export SERVICE_ID="service_id-from-response" | ||
``` | ||
|
||
1. **Check the configuration for the ** | ||
billy-the-fish marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
||
```bash | ||
curl -X GET "${API_BASE_URL}/projects/${TIGERDATA_PROJECT_ID}/services/${SERVICE_ID}" \ | ||
-u "${TIGERDATA_ACCESS_KEY}:${TIGERDATA_SECRET_KEY}" \ | ||
-H "Content-Type: application/json" | ||
``` | ||
You see something like: | ||
billy-the-fish marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
```terminaloutput | ||
{"service_id":"tgrservice","project_id":"tgrproject","name":"my-first-service","region_code":"us-east-1", | ||
"service_type":"TIMESCALEDB","created":"2025-09-30T12:08:54.438785Z","paused":false,"status":"READY", | ||
"resources":[{"id":"102879","spec":{"cpu_millis":1000,"memory_gbs":4,"volume_type":""}}], | ||
"metadata":{"environment":"DEV"},"endpoint":{"host":"ohhhh.yeahhhhh.tsdb.cloud.timescale.com","port":33867}, | ||
"ha_replicas":{"sync_replica_count":0,"replica_count":1}} | ||
``` | ||
|
||
</Procedure> | ||
|
||
And that is it, you are ready to use the [$REST_LONG][rest-api-reference] to manage your | ||
$SERVICE_SHORTs in $CLOUD_LONG. | ||
|
||
## Security best practices | ||
|
||
Follow these security guidelines when working with the $REST_LONG: | ||
|
||
- **Credential management** | ||
- Store API credentials as environment variables, not in code | ||
- Use credential rotation policies for production environments | ||
- Never commit credentials to version control systems | ||
|
||
- **Network security** | ||
- Use HTTPS endpoints exclusively for API communication | ||
- Implement proper certificate validation in your HTTP clients | ||
- Consider IP allowlisting for production API access | ||
billy-the-fish marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
||
- **Data protection** | ||
- Use secure storage for service connection strings and passwords | ||
- Implement proper backup and recovery procedures for created services | ||
- Follow data residency requirements for your region | ||
|
||
[rest-api-reference]: /api/:currentVersion:/api-reference/ | ||
[rest-api-credentials]: https://console.cloud.timescale.com/dashboard/settings | ||
[get-project-id]: /integrations/:currentVersion:/find-connection-details/#find-your-project-and-service-id | ||
[create-client-credentials]: /integrations/:currentVersion:/find-connection-details/#create-client-credentials | ||
[curl]: https://curl.se/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
To follow the steps on this page: | ||
|
||
* Create a target [$ACCOUNT_LONG][create-account]. | ||
|
||
[create-account]: /getting-started/:currentVersion:/services/#create-a-tiger-cloud-account |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.