diff --git a/src/content/docs/build/tiger-cli-mcp/agent-best-practices.mdx b/src/content/docs/build/tiger-cli-mcp/agent-best-practices.mdx index e649d252..85898454 100644 --- a/src/content/docs/build/tiger-cli-mcp/agent-best-practices.mdx +++ b/src/content/docs/build/tiger-cli-mcp/agent-best-practices.mdx @@ -22,12 +22,14 @@ Keep production {C.SERVICE_SHORT}s in read-only mode and only escalate to write For an additional layer of security, create a dedicated read-only database role, save its password with `tiger db save-password --role --password=`, then connect the agent as that role (`tiger db connect --role `, or the `role` parameter on {C.MCP_SHORT}'s database tools). Because the restriction is enforced by the database itself, it applies no matter how the agent connects. See [Manage data security in your {C.SERVICE_LONG}](/deploy/tiger-cloud/tiger-cloud-aws/security/read-only-role#create-a-read-only-user) to create the role. +Grant the role `SELECT` on the tables the agent needs. A role created with `tiger db create role --read-only` can log in but holds no table privileges, so an agent connecting as it gets `permission denied` on every query until you grant access. + ## Test against a fork or a read replica For exploratory or agent-driven work, point the agent at a copy of your data instead of production: -- **Fork** a {C.SERVICE_SHORT} to get an isolated, writable copy you can experiment on and then discard. See [Manage your services](/build/tiger-cli-mcp/common-tasks#manage-your-services). -- **{C.READ_REPLICA_CAP}**: connect the agent to a {C.READ_REPLICA} so exploration never touches the primary or its write performance. Add a {C.READ_REPLICA} [in {C.CONSOLE}](/deploy/tiger-cloud/tiger-cloud-aws/high-availability/read-scaling#create-a-read-replica-set), then point the agent at that set's own connection details. +- **Fork** a {C.SERVICE_SHORT} to get an isolated, writable copy you can experiment on and then discard: `tiger service fork --now`, or ask your agent (`service_fork`). See [Manage your services](/build/tiger-cli-mcp/common-tasks#manage-your-services). +- **{C.READ_REPLICA_CAP}**: connect the agent to a {C.READ_REPLICA} so exploration never touches the primary or its write performance. There is no {C.CLI_SHORT} or {C.MCP_SHORT} tool for creating a {C.READ_REPLICA} set; add one [in {C.CONSOLE}](/deploy/tiger-cloud/tiger-cloud-aws/high-availability/read-scaling#create-a-read-replica-set) (an agent should ask you to do this step, not attempt a command for it), then point the agent at that set's own connection details. ## Have the database do the work @@ -39,7 +41,30 @@ Agents sometimes pull large result sets to the client and process them locally, ## Guardrails for coding agents -When you use an agent like Claude Code against your database, add project instructions (for example, in `CLAUDE.md`) that state which {C.SERVICE_SHORT}s are production, that production is read-only, and which {C.PROJECT_SHORT} to use. This reduces mistakes when an agent switches context. +When you use an agent like Claude Code against your database, add project instructions (for example, in `CLAUDE.md`) that state which {C.SERVICE_SHORT}s are production and that production is read-only. This reduces mistakes when an agent switches context. For example: + +```markdown +## Database access via Tiger MCP + +- Production service ID: ``. Treat as READ-ONLY: never call a mutating + service tool against it (for example `service_resize`, `service_stop`, + `service_update_password`), and never run write or DDL SQL against it, without + explicit approval. +- For schema changes or risky queries, fork production first (`service_fork`) and test + on the fork. +- Development service ID: ``. Safe to modify freely. +- Show the SQL you're about to run before calling `db_execute_query` with anything other + than a `SELECT`. +``` + +### Guardrails checklist + +- Keep production {C.SERVICE_SHORT}s in [read-only mode](#restrict-agents-to-read-only) by default. +- Connect the agent as a dedicated read-only database role, not `tsdbadmin`. +- Point exploratory or agent-driven work at a fork or {C.READ_REPLICA}, never production directly. +- Ask for a single computed answer instead of raw rows, and set an explicit row limit. +- Ask the agent to show the SQL it will run before it executes anything that writes. +- State which {C.SERVICE_SHORT}s are production in your project instructions (for example, `CLAUDE.md`). ## Next steps diff --git a/src/content/docs/build/tiger-cli-mcp/common-tasks.mdx b/src/content/docs/build/tiger-cli-mcp/common-tasks.mdx index bf019998..c627cc93 100644 --- a/src/content/docs/build/tiger-cli-mcp/common-tasks.mdx +++ b/src/content/docs/build/tiger-cli-mcp/common-tasks.mdx @@ -20,17 +20,66 @@ Commands and tools can change between releases, so run `tiger --help` for the cu ## Manage your services -Every service task is a `tiger service` command in the {C.CLI_SHORT}, and the {C.MCP_SHORT} has a matching tool, so you can instead just describe what you want: - -| Task | {C.CLI_SHORT} command | Ask your agent | -| --- | --- | --- | -| Create a service | `tiger service create --name analytics --region us-east-1` | _"Create a time-series service called analytics in us-east-1."_ | -| Fork a service to test a change safely | `tiger service fork --now` | _"Fork service abc123 so I can test a schema change."_ | -| Resize a service | `tiger service resize --cpu 4 --memory 16` | _"Resize service abc123 to 4 CPU and 16 GB."_ | -| Start or stop a service | `tiger service start `, `tiger service stop ` | _"Stop service abc123."_ | -| Rotate the database password | `tiger service update-password ` | _"Reset the password on service abc123."_ | -| List, inspect, and check logs | `tiger service list`, `tiger service get `, `tiger service logs --tail 100` | _"List my services and show recent logs for abc123."_ | -| Delete a service | `tiger service delete ` | Not available. There is no {C.MCP_SHORT} tool for delete; use the {C.CLI_SHORT} command. | +Every service task is a `tiger service` command in the {C.CLI_SHORT}, and the {C.MCP_SHORT} has a matching tool, so you can instead just describe what you want. See the [{C.CLI_LONG} reference](/reference/tiger-cloud/tiger-cli#services) for each command's full flags and sample output, the [{C.MCP_LONG} reference](/reference/tiger-cloud/tiger-mcp) for each tool's parameters and return value, and the [{C.CLI_LONG} and {C.MCP_LONG}](/learn/tiger-cli-mcp#how-tiger-cli-and-tiger-mcp-work-together) overview for the full command-to-tool mapping. + +### How do I create a service? + +```bash +tiger service create --name analytics --region us-east-1 +``` + +Or ask your agent: _"Create a time-series service called analytics in us-east-1."_ (calls [`service_create`](/reference/tiger-cloud/tiger-mcp#service_create)). + +### How do I test a change without risking production data? + +```bash +tiger service fork --now +``` + +Or ask your agent: _"Fork service abc123 so I can test a schema change."_ (calls [`service_fork`](/reference/tiger-cloud/tiger-mcp#service_fork)). See [Test a change safely on a fork](/build/tiger-cli-mcp/cookbook#test-a-change-safely-on-a-fork) for a full workflow. + +### How do I resize a service? + +```bash +tiger service resize --cpu 4000 --memory 16 +``` + +Or ask your agent: _"Resize service abc123 to 4 CPU and 16 GB."_ (calls [`service_resize`](/reference/tiger-cloud/tiger-mcp#service_resize)). + +### How do I start or stop a service? + +```bash +tiger service start +tiger service stop +``` + +Or ask your agent: _"Stop service abc123."_ (calls [`service_start`](/reference/tiger-cloud/tiger-mcp#service_start) or [`service_stop`](/reference/tiger-cloud/tiger-mcp#service_stop)). + +### How do I rotate the database password? + +```bash +tiger service update-password --auto-generate +``` + +Or ask your agent: _"Reset the password on service abc123."_ (calls [`service_update_password`](/reference/tiger-cloud/tiger-mcp#service_update_password)). + +### How do I list, inspect, and check logs for a service? + +```bash +tiger service list +tiger service get +tiger service logs --tail 100 +``` + +Or ask your agent: _"List my services and show recent logs for abc123."_ (calls [`service_list`](/reference/tiger-cloud/tiger-mcp#service_list), [`service_get`](/reference/tiger-cloud/tiger-mcp#service_get), [`service_logs`](/reference/tiger-cloud/tiger-mcp#service_logs)). + +### How do I delete a service? + +```bash +tiger service delete --confirm +``` + +There is no {C.MCP_SHORT} tool for delete; run this {C.CLI_SHORT} command yourself. ## Work with your data @@ -69,7 +118,7 @@ Some data work goes beyond running SQL. Using its built-in skills, {C.MCP_LONG} - Find hypertable candidates: _"Analyze my database and tell me which tables should be hypertables."_ - Review and optimize: _"Review my schema and indexes against best practices and suggest improvements."_ -Planning a change is also read-only, but testing it needs write access: forking a {C.SERVICE_SHORT} (`service_fork`) is itself one of the tools read-only mode disables. +Planning a change is also read-only, but testing it needs write access: forking a {C.SERVICE_SHORT} ([`service_fork`](/reference/tiger-cloud/tiger-mcp#service_fork)) is itself one of the tools read-only mode disables. - Plan a schema change: _"Plan a zero-downtime migration to add a status column to metrics, and test it on a fork first."_ diff --git a/src/content/docs/build/tiger-cli-mcp/cookbook.mdx b/src/content/docs/build/tiger-cli-mcp/cookbook.mdx index f4c649ff..787c1ec8 100644 --- a/src/content/docs/build/tiger-cli-mcp/cookbook.mdx +++ b/src/content/docs/build/tiger-cli-mcp/cookbook.mdx @@ -34,6 +34,8 @@ The agent designs the `CREATE TABLE ... WITH (tsdb.hypertable, ...)` statement, ## Analyze your data +**Setup**: assumes the `sensor_data` {C.HYPERTABLE} from [Design a schema and load your data](#design-a-schema-and-load-your-data). Substitute your own table if you're starting from an existing service. + **Safety**: read-only. ```text @@ -63,6 +65,8 @@ For more patterns like this, see [Query data](/build/data-management/query-data/ ## Compare performance with and without a continuous aggregate +**Setup**: assumes the `sensor_data` {C.HYPERTABLE} and `sensor_data_hourly` {C.CAGG} from [Design a schema and load your data](#design-a-schema-and-load-your-data). + **Safety**: read-only. ```text @@ -89,6 +93,8 @@ GROUP BY bucket, sensor_id; ## Test a change safely on a fork +**Setup**: assumes the `analytics-poc` {C.SERVICE_SHORT} from [Design a schema and load your data](#design-a-schema-and-load-your-data). Substitute your own {C.SERVICE_SHORT} name if you're starting from an existing one. + **Safety**: destructive steps run only on an isolated fork; the source {C.SERVICE_SHORT} is never modified. ```text @@ -96,7 +102,7 @@ GROUP BY bucket, sensor_id; 2. On the fork only, add a retention policy that drops data older than 30 days, and wait for the job to run. 3. Compare row counts on the fork before and after. 4. Confirm the original service's row count is unchanged. -5. Delete the fork when I'm done. +5. When I'm done, remind me to delete the fork. ``` A fork is an independent, writable copy of a {C.SERVICE_SHORT}. Nothing you do on it reaches the source. See [Manage your services](/build/tiger-cli-mcp/common-tasks#manage-your-services) for the fork command and its strategies (`--now`, `--last-snapshot`, `--to-timestamp`). This same fork-first pattern applies to any risky change: schema migrations, configuration tuning, or bulk deletes. @@ -105,6 +111,8 @@ A fork is an independent, writable copy of a {C.SERVICE_SHORT}. Nothing you do o ## Optimize a hypertable's configuration +**Setup**: assumes the `sensor_data` {C.HYPERTABLE} from [Design a schema and load your data](#design-a-schema-and-load-your-data). + **Safety**: two-step. Step 1 only analyzes and writes a file; nothing changes until you review it and run step 2. ```text @@ -140,6 +148,8 @@ CREATE INDEX idx_sensor_data_sensor_time ON sensor_data (sensor_id, time DESC); ## Find and fix slow queries +**Setup**: works on any {C.SERVICE_SHORT} that has been running your workload long enough to have query history. Nothing from the earlier recipes is required. + **Safety**: two-step, same analyze-then-apply pattern as above. Step 1 uses `EXPLAIN` (not `EXPLAIN ANALYZE`) so it doesn't re-run slow queries. ```text diff --git a/src/content/docs/deploy/tiger-cloud/tiger-cloud-AWS/service-management/change-resources.mdx b/src/content/docs/deploy/tiger-cloud/tiger-cloud-AWS/service-management/change-resources.mdx index 4a36f852..19bf2b19 100644 --- a/src/content/docs/deploy/tiger-cloud/tiger-cloud-AWS/service-management/change-resources.mdx +++ b/src/content/docs/deploy/tiger-cloud/tiger-cloud-AWS/service-management/change-resources.mdx @@ -13,14 +13,20 @@ import OutOfMemoryErrors from "../../../../../../partials/_out-of-memory-errors. +If the {C.SERVICE_SHORT} has [HA replication](/deploy/tiger-cloud/tiger-cloud-aws/high-availability/overview) enabled, {C.CLOUD_LONG} resizes the replica, waits for it to catch up, switches over to it, then restarts the primary, so the interruption is briefer than resizing without HA. Enable HA before resizing production {C.SERVICE_SHORT}s where possible. + +To change the resources of a free {C.SERVICE_SHORT}, first [convert it to a standard one](/deploy/tiger-cloud/tiger-cloud-aws/service-management/service-management#convert-a-free-service-to-a-standard-one). + +Resizing a free {C.SERVICE_SHORT} converts it to a standard, billable one. + diff --git a/src/content/docs/deploy/tiger-cloud/tiger-cloud-azure/service-management/change-resources.mdx b/src/content/docs/deploy/tiger-cloud/tiger-cloud-azure/service-management/change-resources.mdx index 4a36f852..6aa447e4 100644 --- a/src/content/docs/deploy/tiger-cloud/tiger-cloud-azure/service-management/change-resources.mdx +++ b/src/content/docs/deploy/tiger-cloud/tiger-cloud-azure/service-management/change-resources.mdx @@ -13,6 +13,8 @@ import OutOfMemoryErrors from "../../../../../../partials/_out-of-memory-errors. +If the {C.SERVICE_SHORT} has [HA replication](/deploy/tiger-cloud/tiger-cloud-azure/high-availability/overview) enabled, {C.CLOUD_LONG} resizes the replica, waits for it to catch up, switches over to it, then restarts the primary, so the interruption is briefer than resizing without HA. Enable HA before resizing production {C.SERVICE_SHORT}s where possible. + diff --git a/src/content/docs/get-started/quickstart/mcp-cli.mdx b/src/content/docs/get-started/quickstart/mcp-cli.mdx index 91f30df8..99f80a99 100644 --- a/src/content/docs/get-started/quickstart/mcp-cli.mdx +++ b/src/content/docs/get-started/quickstart/mcp-cli.mdx @@ -28,7 +28,7 @@ import { Prerequisites } from "@components/Prerequisites"; {C.MCP_LONG} is built into the {C.CLI_LONG} binary. Alongside tools to manage {C.SERVICE_SHORT}s and run SQL, it includes built-in skills (for example, schema design, {C.HYPERTABLE} setup, and migration planning) and is wired to {C.COMPANY} documentation, so your AI agent can design, analyze, and recommend improvements with up-to-date guidance. This page walks you through installing {C.CLI_LONG}, configuring authentication for {C.MCP_LONG}, and managing {C.CLOUD_LONG} resources from your AI agent. - + - An AI agent installed on your machine with an active API key. @@ -90,7 +90,16 @@ import { Prerequisites } from "@components/Prerequisites"; tiger mcp install ``` - Choose the MCP client to integrate with (for example, `claude-code`, `cursor`, `windsurf`, `codex`, `gemini-cli`, `vscode`) and press `Enter`. + Choose the MCP client to integrate with (for example, `claude-code`, `cursor`, `windsurf`, `codex`, `gemini-cli`, `vscode`) and press `Enter`. You'll see something like: + + ```txt + ✅ Successfully installed Tiger MCP server configuration for cursor + 📁 Configuration file: ~/.cursor/mcp.json + + 💡 Next steps: + 1. Restart cursor to load the new configuration + 2. The Tiger MCP server will be available as 'tiger' + ``` The exact list of clients and subcommands (for example, `tiger mcp install`, @@ -116,12 +125,18 @@ Once connected, you can manage {C.SERVICE_SHORT}s and learn best practices throu -Ask: _"Is the {C.MCP_LONG} server active?"_ You should see a summary of available tools ({C.SERVICE_SHORT} management, database operations, documentation search, skills for {C.HYPERTABLE}s, and others). +Ask: _"Is the {C.MCP_LONG} server active?"_ You should see a summary of available tools: service management ([`service_list`](/reference/tiger-cloud/tiger-mcp#service_list), [`service_get`](/reference/tiger-cloud/tiger-mcp#service_get), [`service_create`](/reference/tiger-cloud/tiger-mcp#service_create), [`service_fork`](/reference/tiger-cloud/tiger-mcp#service_fork), [`service_resize`](/reference/tiger-cloud/tiger-mcp#service_resize), [`service_start`](/reference/tiger-cloud/tiger-mcp#service_start), [`service_stop`](/reference/tiger-cloud/tiger-mcp#service_stop), [`service_update_password`](/reference/tiger-cloud/tiger-mcp#service_update_password), [`service_logs`](/reference/tiger-cloud/tiger-mcp#service_logs)), database operations ([`db_execute_query`](/reference/tiger-cloud/tiger-mcp#db_execute_query), [`db_schema`](/reference/tiger-cloud/tiger-mcp#db_schema)), and documentation and skills ([`search_docs`](/reference/tiger-cloud/tiger-mcp#search_docs), [`view_skill`](/reference/tiger-cloud/tiger-mcp#view_skill)). -Ask: _"Can you list my active {C.SERVICE_SHORT}s?"_ to see your {C.CLOUD_LONG} {C.SERVICE_SHORT}s. +Ask: _"Can you list my active {C.SERVICE_SHORT}s?"_ The agent calls `service_list` and reports back something like: + +```txt +You have 2 services: +- analytics () — READY, TIMESCALEDB, us-east-1, 1 CPU / 4 GB +- tiger-docs () — READY, TIMESCALEDB, eu-central-1, 0.5 CPU / 2 GB +``` diff --git a/src/content/docs/get-started/quickstart/tiger-cli.mdx b/src/content/docs/get-started/quickstart/tiger-cli.mdx index 1c7ce20b..b9d2a277 100644 --- a/src/content/docs/get-started/quickstart/tiger-cli.mdx +++ b/src/content/docs/get-started/quickstart/tiger-cli.mdx @@ -8,8 +8,14 @@ sidebar: import * as C from "@constants"; import CLIGetStarted from "../../../../partials/_devops-cli-get-started.mdx"; +import RESTPrereqs from "../../../../partials/_prereqs-cloud-account-only.mdx"; +import { Prerequisites } from "@components/Prerequisites"; -{C.CLI_LONG} is a command-line interface for managing {C.CLOUD_LONG} programmatically. It lets you, your scripts, and AI agents provision, configure, and manage {C.SERVICE_LONG}s. {C.CLI_LONG} calls {C.REST_LONG} under the hood and bundles {C.MCP_LONG} for AI agents. For how these compare and where each fits, see [{C.CLI_LONG} and {C.MCP_LONG}](/learn/tiger-cli-mcp). +{C.CLI_LONG} is a command-line interface for managing {C.CLOUD_LONG} programmatically. It lets you, your scripts, and AI agents provision, configure, and manage {C.SERVICE_LONG}s. {C.CLI_LONG} calls {C.REST_LONG} under the hood and bundles {C.MCP_LONG} for AI agents. For how these compare and where each fits, see [{C.CLI_LONG} and {C.MCP_LONG}](/learn/tiger-cli-mcp). Want an AI agent to run these commands for you instead? See [Integrate Tiger Cloud with your AI agent](/get-started/quickstart/mcp-cli). + + + + diff --git a/src/content/docs/learn/tiger-cli-mcp/index.mdx b/src/content/docs/learn/tiger-cli-mcp/index.mdx index e5a2ae03..3774a7d6 100644 --- a/src/content/docs/learn/tiger-cli-mcp/index.mdx +++ b/src/content/docs/learn/tiger-cli-mcp/index.mdx @@ -42,6 +42,29 @@ The two tools share a login and overlap on most operations, but each does someth Many workflows use both. An agent explores your data and proposes a change through {C.MCP_SHORT}, then you apply and verify it with {C.CLI_SHORT}. +| Task | {C.CLI_SHORT} command | {C.MCP_SHORT} tool | +| --- | --- | --- | +| Create a {C.SERVICE_SHORT} | `tiger service create` | `service_create` | +| List {C.SERVICE_SHORT}s | `tiger service list` | `service_list` | +| Get {C.SERVICE_SHORT} details | `tiger service get` | `service_get` | +| Fork a {C.SERVICE_SHORT} | `tiger service fork` | `service_fork` | +| Resize a {C.SERVICE_SHORT} | `tiger service resize` | `service_resize` | +| Start a {C.SERVICE_SHORT} | `tiger service start` | `service_start` | +| Stop a {C.SERVICE_SHORT} | `tiger service stop` | `service_stop` | +| Rotate the master password | `tiger service update-password` | `service_update_password` | +| View logs | `tiger service logs` | `service_logs` | +| Delete a {C.SERVICE_SHORT} | `tiger service delete` | None — {C.CLI_SHORT} only | +| Run SQL | `tiger db connect` | `db_execute_query` | +| View schema | `tiger db schema` | `db_schema` | +| Print a connection string | `tiger db connection-string` | None — {C.CLI_SHORT} only | +| Create a database role | `tiger db create role` | None — {C.CLI_SHORT} only | +| Save a password locally | `tiger db save-password` | None — {C.CLI_SHORT} only | +| Test connectivity | `tiger db test-connection` | None — {C.CLI_SHORT} only | +| Search documentation | None — {C.MCP_SHORT} only | `search_docs` | +| View a best-practice skill | None — {C.MCP_SHORT} only | `view_skill` | + +`tiger auth`, `tiger version`, `tiger config`, and `tiger mcp` manage the tool itself, not {C.CLOUD_LONG}, so they have no {C.MCP_SHORT} equivalent. See the [{C.MCP_LONG} reference](/reference/tiger-cloud/tiger-mcp) for each tool's parameters and return value, and [common tasks](/build/tiger-cli-mcp/common-tasks#manage-your-services) for the command-line details. + ## Where they fit in your workflow Between them, {C.CLI_LONG} and {C.MCP_LONG} cover the whole lifecycle of working with {C.CLOUD_LONG}. Most operations work from either tool. Setup runs through {C.CLI_LONG}, and design and review belong to {C.MCP_LONG}. @@ -60,6 +83,38 @@ Because {C.MCP_LONG} lets an agent act on your database, decide up front what it - Point an agent at a fork or a {C.READ_REPLICA} for exploratory work, so production is never in the path. - Ask for a single computed answer rather than a raw export, so the database does the work and less data leaves it. +## FAQ + +**What is {C.CLI_LONG}?** {C.CLI_LONG} is a command-line tool for managing {C.CLOUD_LONG}. From a terminal you can create, fork, resize, start, stop, and inspect {C.SERVICE_SHORT}s, and connect to your databases, the same actions available in {C.CONSOLE}, but scriptable and automatable. + +**What is {C.MCP_LONG}?** {C.MCP_LONG} lets an AI coding agent (such as Cursor, Claude Code, or VS Code) manage {C.CLOUD_LONG} and query your data using natural language. It uses the Model Context Protocol, ships inside {C.CLI_LONG}, and gives the agent tools for {C.SERVICE_SHORT} management and running SQL, plus built-in best-practice guidance (schema design, {C.HYPERTABLE} setup, migration planning) and documentation search. + +**Do I need both {C.CLI_LONG} and {C.MCP_LONG}?** No, choose based on who's driving. Use {C.CLI_LONG} when you or a script run commands directly in a terminal. Use {C.MCP_LONG} when you want an AI agent to do the work for you. Because {C.MCP_LONG} is built into the CLI, installing {C.CLI_LONG} gives you both. + +**How is {C.MCP_LONG} different from a generic {C.PG} MCP server?** A generic {C.PG} MCP server usually does one thing: run SQL against a database connection. {C.MCP_LONG} also manages the {C.CLOUD_LONG} {C.SERVICE_SHORT} itself (create, fork, resize, view logs), includes built-in safety controls such as read-only mode and per-role access limits, and adds {C.COMPANY}-specific knowledge like documentation search and guidance for features such as {C.HYPERTABLE}s and {C.CAGG}s. + +**When should I use {C.CLI_LONG}, {C.MCP_LONG}, or {C.REST_LONG}?** Use {C.REST_LONG} to build {C.CLOUD_LONG} management into your own application. Use {C.CLI_LONG} for direct, scriptable control from a terminal or CI. Use {C.MCP_LONG} to let an AI agent manage {C.SERVICE_SHORT}s and query data for you. {C.REST_LONG} is the complete surface; {C.CLI_LONG} wraps a subset of it for scripting and CI; {C.MCP_LONG} adds skills and documentation search on top for agent-driven work. + +**Which AI tools does {C.MCP_LONG} work with?** {C.MCP_LONG} auto-configures for `claude-code`, `cursor`, `windsurf`, `codex`, `gemini`, `vscode`, `antigravity`, and `kiro-cli` (see the [full list](/get-started/quickstart/mcp-cli#install-and-configure-tiger-mcp)), and works with any client that supports the Model Context Protocol through a standard configuration entry. + +**Is it safe to let an AI agent access my database through {C.MCP_LONG}?** Yes, when you use the built-in controls. Run {C.MCP_LONG} in [read-only mode](/get-started/quickstart/mcp-cli#restrict-tiger-mcp-to-read-only) so an agent can read but not modify data, and scope its access to a specific database role to limit what it can reach. For production, start read-only and grant additional access deliberately. See [best practices for AI agents](/build/tiger-cli-mcp/agent-best-practices). + + + ## Next steps - [Get started with {C.CLI_LONG}](/get-started/quickstart/tiger-cli): Install the CLI, authenticate, and create your first {C.SERVICE_SHORT} from the terminal. diff --git a/src/partials/_change-resources-cli.mdx b/src/partials/_change-resources-cli.mdx index 6065eef1..b979fb77 100644 --- a/src/partials/_change-resources-cli.mdx +++ b/src/partials/_change-resources-cli.mdx @@ -2,12 +2,21 @@ import * as C from "@constants"; ## Update compute resources for a {C.SERVICE_SHORT} -Use `tiger service list` to find the ID of the {C.SERVICE_SHORT} you want to resize, then set the new CPU and memory allocation. CPU is given in millicores, memory in gigabytes: +Use [`tiger service list`](/reference/tiger-cloud/tiger-cli#tiger-service-list) to find the ID of the {C.SERVICE_SHORT} you want to resize, then set the new CPU and memory allocation. CPU is given in millicores, memory in gigabytes: ```bash tiger service resize --cpu 4000 --memory 16 ``` +You see something like: + +```txt +📐 Resizing service '' to 4 CPU/16 GB... +✅ Resize request accepted for service ''! +âŗ Waiting for resize to complete (timeout: 10m0s)... +🎉 Service '' has been successfully resized to 4 CPU/16 GB! +``` + The allowed combinations are: | CPU | Millicores | Memory | diff --git a/src/partials/_change-resources.mdx b/src/partials/_change-resources.mdx index 27834d21..1b6df0f8 100644 --- a/src/partials/_change-resources.mdx +++ b/src/partials/_change-resources.mdx @@ -17,8 +17,6 @@ the {C.SERVICE_SHORT} restarts. You can change the CPU and memory allocation up -To change the resources of a free {C.SERVICE_SHORT}, first [convert it to a standard one](../service-management/service-management#convert-a-free-service-to-a-standard-one). - Note that: - For the 48 CPU / 192 GiB option, 6 CPU / 14 GiB is reserved for platform operations. @@ -34,7 +32,7 @@ is to enable [HA replication](../high-availability/overview) on the {C.SERVICE_S 1. Performs a switchover to the resized replica. 1. Restarts the primary. -HA reduce downtime in the case of resizes or maintenance window restarts, from a minute or so to a couple of seconds. +HA reduces downtime in the case of resizes or maintenance window restarts. When you change resource settings, the current and new charges are displayed immediately so that you can verify how the changes impact your costs. diff --git a/src/partials/_devops-cli-reference.mdx b/src/partials/_devops-cli-reference.mdx index 18e1f493..ece50058 100644 --- a/src/partials/_devops-cli-reference.mdx +++ b/src/partials/_devops-cli-reference.mdx @@ -1,8 +1,9 @@ import * as C from "@constants"; +import { Callout } from "@stainless-api/docs/components"; import GLOBALFLAGS from "./_devops-cli-global-flags.mdx"; import CONFIGOPTIONS from "./_devops-cli-config-options.mdx"; -Use the following commands to manage {C.CLOUD_LONG} from the terminal. Every command supports `-h` for inline help, for example `tiger service create -h`. +Use the following commands to manage {C.CLOUD_LONG} from the terminal. Every command supports `-h` for inline help, for example `tiger service create -h`. For the single-command version of common operations, see [common tasks](/build/tiger-cli-mcp/common-tasks); for longer, multi-step workflows, see the [cookbook](/build/tiger-cli-mcp/cookbook). ## Authentication @@ -10,32 +11,85 @@ Use the following commands to manage {C.CLOUD_LONG} from the terminal. Every com Create an authenticated connection to your {C.ACCOUNT_LONG}. This opens a browser to authorize. For non-interactive login, pass credentials as flags. +**Usage**: `tiger auth login [flags]` + ```bash tiger auth login ``` -- `--public-key`: public key for non-interactive login. -- `--secret-key`: secret key for non-interactive login. +You see something like: + +```txt +Auth URL is: https://console.cloud.tigerdata.com/oauth/authorize?... +Opening browser for authentication... +Select a project: + +> 1. () + 2. () + +Use ↑/↓ arrows or number keys to navigate, enter to select, q to quit +``` + +The project picker only appears if you have multiple {C.PROJECT_SHORT}s. After you select one (or automatically, if you have only one): + +```txt +Successfully logged in (project: ) + +🎉 Next steps: +â€ĸ Install MCP server for your favorite AI coding tool: tiger mcp install +â€ĸ List existing services: tiger service list +â€ĸ Create a new service: tiger service create +â€ĸ Enable read-only mode: tiger config set read_only true +``` + +| Flag | Description | +| --- | --- | +| `--public-key` | Public key for non-interactive login. | +| `--secret-key` | Secret key for non-interactive login. | -You can also set the `TIGER_PUBLIC_KEY` and `TIGER_SECRET_KEY` environment variables; the {C.PROJECT_SHORT} is auto-detected from your credentials. See [Authentication parameters](#authentication-parameters). +You can also set the `TIGER_PUBLIC_KEY` and `TIGER_SECRET_KEY` environment variables; the {C.PROJECT_SHORT} is auto-detected from your credentials. See [Authentication parameters](#authentication-parameters) and [Client credentials](/integrate/find-connection-details#create-client-credentials) for how to create a public/secret key pair. ### `tiger auth logout` Remove the credentials used to connect to {C.CLOUD_LONG}. +**Usage**: `tiger auth logout` + ```bash tiger auth logout ``` +You see: + +```txt +Successfully logged out and removed stored credentials +``` + ### `tiger auth status` -Show your current authentication status and {C.PROJECT_SHORT} ID. +Show your current authentication status. What it lists depends on how you logged in: an OAuth login shows the authentication method and the user, and a client-credentials login shows the credential name, public key, {C.PROJECT_SHORT}, and plan type. + +**Usage**: `tiger auth status [flags]` ```bash tiger auth status ``` -- `--output, -o`: output format: `json`, `yaml`, or `table`. +You see something like: + +```txt +┌─────────────â”Ŧ───────────────────────┐ +│ PROPERTY │ VALUE │ +├─────────────â”ŧ───────────────────────┤ +│ Status │ Logged in │ +│ Auth Method │ OAuth │ +│ User │ () │ +└─────────────┴───────────────────────┘ +``` + +| Flag | Description | +| --- | --- | +| `--output, -o` | Output format: `json`, `yaml`, or `table`. | ## Version @@ -43,21 +97,49 @@ tiger auth status Show the installed {C.CLI_LONG} version. +**Usage**: `tiger version [flags]` + ```bash tiger version ``` -- `--check`: force a check for updates, regardless of the last check time. -- `--output, -o`: output format: `table`, `json`, `yaml`, or `bare`. +You see something like: + +```txt +┌───────────────────â”Ŧ──────────────────────────────────────────┐ +│ Tiger CLI Version │ 0.21.2 │ +│ Build Time │ 2026-07-16T16:23:17Z │ +│ Git Commit │ 377b0e6bbc1e605d55efef9c874f5b7d64ea62ba │ +│ Go Version │ go1.25.5 │ +│ Platform │ darwin/arm64 │ +└───────────────────┴──────────────────────────────────────────┘ +``` + +| Flag | Description | +| --- | --- | +| `--check` | Force a check for updates, regardless of the last check time. | +| `--output, -o` | Output format: `table`, `json`, `yaml`, or `bare`. | ### `tiger upgrade` Download the latest published version of {C.CLI_LONG} and replace the running binary in place. The archive for your platform is verified against its SHA-256 checksum before it is installed. Alias: `update`. +**Usage**: `tiger upgrade` + ```bash tiger upgrade ``` +If you installed {C.CLI_LONG} with the direct install script and a newer version is available, you see: + +```txt +Upgrading tiger 0.21.1 → v0.21.2 +Downloading https://cli.tigerdata.com/releases/v0.21.2/tiger-cli_Darwin_arm64.tar.gz +Verifying checksum +Installing new binary to /tiger +tiger upgraded successfully to v0.21.2 +``` + If you installed {C.CLI_LONG} with a package manager such as Homebrew, `apt`, or `yum`/`dnf`, this command refuses to run and points you to that package manager instead. ## Configuration @@ -66,62 +148,135 @@ If you installed {C.CLI_LONG} with a package manager such as Homebrew, `apt`, or Show the current configuration. +**Usage**: `tiger config show [flags]` + ```bash tiger config show ``` -- `--output, -o`: output format: `json`, `yaml`, or `table`. -- `--no-defaults`: do not show default values for unset fields. -- `--with-env`: apply environment variable overrides. +You see something like: + +```txt +┌──────────────────â”Ŧ───────────────────────────────────────────────────────────────┐ +│ PROPERTY │ VALUE │ +├──────────────────â”ŧ───────────────────────────────────────────────────────────────┤ +│ api_url │ https://console.cloud.tigerdata.com/public/api/v1 │ +│ analytics │ true │ +│ console_url │ https://console.cloud.tigerdata.com │ +│ debug │ false │ +│ docs_mcp │ true │ +│ docs_mcp_url │ https://mcp.tigerdata.com/docs │ +│ gateway_url │ https://console.cloud.tigerdata.com/api │ +│ mcp_max_rows │ 100 │ +│ color │ true │ +│ output │ table │ +│ password_storage │ keyring │ +│ read_only │ false │ +│ releases_url │ https://cli.tigerdata.com │ +│ service_id │ │ +│ version_check │ true │ +└──────────────────┴───────────────────────────────────────────────────────────────┘ +``` + +| Flag | Description | +| --- | --- | +| `--output, -o` | Output format: `json`, `yaml`, or `table`. | +| `--no-defaults` | Do not show default values for unset fields. | +| `--with-env` | Apply environment variable overrides. | ### `tiger config set` Set a configuration value. See [Configuration parameters](#configuration-parameters) for the available keys. +**Usage**: `tiger config set ` + ```bash tiger config set # for example tiger config set read_only true ``` +You see: + +```txt +Set read_only = true +``` + ### `tiger config unset` Clear a configuration value. +**Usage**: `tiger config unset ` + ```bash tiger config unset ``` +You see: + +```txt +Unset read_only +``` + ### `tiger config reset` -Reset the configuration to defaults. This also logs you out of the current {C.PROJECT_LONG}. +Reset the configuration to defaults, including your default {C.SERVICE_SHORT} and output preferences. This does not log you out; your authentication credentials are unaffected. + +**Usage**: `tiger config reset` ```bash tiger config reset ``` +You see: + +```txt +Configuration reset to defaults +``` + ## Services +Manage {C.SERVICE_SHORT}s from the terminal. For the {C.MCP_SHORT}-tool equivalent of each command, see the [{C.MCP_LONG} reference](/reference/tiger-cloud/tiger-mcp); for a task-by-task comparison, see [common tasks](/build/tiger-cli-mcp/common-tasks#manage-your-services). + ### `tiger service create` Create a new {C.SERVICE_SHORT} in the current {C.PROJECT_SHORT}. +**Usage**: `tiger service create [flags]` + ```bash tiger service create --name analytics --region us-east-1 ``` -- `--name`: service name (auto-generated if omitted). -- `--addons`: addons to enable: `time-series`, `ai`. Set to `none` for vanilla {C.PG}. -- `--region`: region code. [Free services](/get-started/quickstart/create-service#what-is-a-tiger-cloud-service) (shared CPU/memory) must use `us-east-1`. -- `--cpu`: CPU allocation in millicores. Set to `shared` for a free service. -- `--memory`: memory allocation in gigabytes. Set to `shared` for a free service. -- `--replicas`: number of high-availability replicas. -- `--environment`: environment tag: `DEV` or `PROD` (default: `DEV`). -- `--no-wait`: return without waiting for the operation to complete. -- `--wait-timeout`: wait timeout (for example, `30m`, `1h30m`, `90s`). -- `--no-set-default`: do not set this service as the default. -- `--with-password`: include the password in the output. -- `--output, -o`: output format: `json`, `yaml`, `env`, or `table`. +You see something like: + +```txt +🚀 Creating service 'analytics'... +✅ Service creation request accepted! +📋 Service ID: +🔐 Password saved to system keyring for automatic authentication +đŸŽ¯ Set service '' as default service. +âŗ Waiting for service to be ready (wait timeout: 30m0s)... +🎉 Service is ready and running! +🔌 Run 'tiger db connect' to connect to your new service +``` + +Then the {C.SERVICE_SHORT}'s details, in the same format as [`service get`](#tiger-service-get). + +| Flag | Description | +| --- | --- | +| `--name` | Service name (auto-generated if omitted). | +| `--addons` | Addons to enable: `time-series`, `ai`. Set to `none` for vanilla {C.PG}. | +| `--region` | Region code. [Free services](/get-started/quickstart/create-service#what-is-a-tiger-cloud-service) (shared CPU/memory) must use `us-east-1`. | +| `--cpu` | CPU allocation in millicores. Set to `shared` for a free service. | +| `--memory` | Memory allocation in gigabytes. Set to `shared` for a free service. | +| `--replicas` | Number of high-availability replicas. | +| `--environment` | Environment tag: `DEV` or `PROD` (default: `DEV`). | +| `--no-wait` | Return without waiting for the operation to complete. | +| `--wait-timeout` | Wait timeout (for example, `30m`, `1h30m`, `90s`). | +| `--no-set-default` | Do not set this service as the default. | +| `--with-password` | Include the password in the output. | +| `--output, -o` | Output format: `json`, `yaml`, `env`, or `table`. | Allowed compute configurations: `shared`/`shared` (only in `us-east-1`), 0.5 CPU/2 GB, 1/4, 2/8, 4/16, 8/32, 16/64, 32/128. Specify `--cpu` and `--memory` together, or set one and the other is configured automatically. @@ -129,231 +284,554 @@ Allowed compute configurations: `shared`/`shared` (only in `us-east-1`), 0.5&nbs List the {C.SERVICE_SHORT}s in the current {C.PROJECT_SHORT}. +**Usage**: `tiger service list [flags]` + ```bash tiger service list ``` -- `--output, -o`: output format: `json`, `yaml`, or `table`. +You see something like: + +```txt +┌──────────────â”Ŧ───────────â”Ŧ────────â”Ŧ─────────────â”Ŧ───────────â”Ŧ──────────────────┐ +│ SERVICE ID │ NAME │ STATUS │ TYPE │ REGION │ CREATED │ +├──────────────â”ŧ───────────â”ŧ────────â”ŧ─────────────â”ŧ───────────â”ŧ──────────────────┤ +│ │ analytics │ READY │ TIMESCALEDB │ us-east-1 │ 2026-08-11 09:00 │ +└──────────────┴───────────┴────────┴─────────────┴───────────┴──────────────────┘ +``` + +| Flag | Description | +| --- | --- | +| `--output, -o` | Output format: `json`, `yaml`, or `table`. | ### `tiger service get` Show detailed information about a {C.SERVICE_SHORT}. Aliases: `describe`, `show`. +**Usage**: `tiger service get [flags]` + ```bash tiger service get ``` -- `--with-password`: include the password in the output. -- `--output, -o`: output format: `json`, `yaml`, `env`, or `table`. +You see something like: + +```txt +┌───────────────────â”Ŧ─────────────────────────────────────────────────────────────────────┐ +│ PROPERTY │ VALUE │ +├───────────────────â”ŧ─────────────────────────────────────────────────────────────────────┤ +│ Service ID │ │ +│ Name │ analytics │ +│ Status │ READY │ +│ Type │ TIMESCALEDB │ +│ Region │ us-east-1 │ +│ Environment │ DEV │ +│ CPU │ 0.5 cores (500m) │ +│ Memory │ 2 GB │ +│ Direct Endpoint │ ..tsdb.cloud.timescale.com: │ +│ Created │ 2026-08-11 09:00:00 UTC │ +│ Connection String │ postgresql://tsdbadmin@/tsdb?sslmode=require │ +│ Console URL │ https://console.cloud.tigerdata.com/dashboard/services/ │ +└───────────────────┴─────────────────────────────────────────────────────────────────────┘ +``` + +| Flag | Description | +| --- | --- | +| `--with-password` | Include the password in the output. Only returns a value if the password was captured at creation or saved since with [`db save-password`](#tiger-db-save-password); {C.CLI_LONG} can't retrieve a forgotten password from the server. | +| `--output, -o` | Output format: `json`, `yaml`, `env`, or `table`. | ### `tiger service fork` -Fork an existing {C.SERVICE_SHORT} into a new, independent copy. Choose exactly one timing option. +Fork an existing {C.SERVICE_SHORT} into a new, independent copy. Choose exactly one timing option. See [Test a change safely on a fork](/build/tiger-cli-mcp/cookbook#test-a-change-safely-on-a-fork) for a worked example. + +**Usage**: `tiger service fork [flags]` ```bash tiger service fork --now ``` -- `--now`: fork at the current database state. -- `--last-snapshot`: fork at the last snapshot (faster). -- `--to-timestamp`: fork at a point in time (RFC3339). -- `--cpu`, `--memory`: compute for the fork (inherits from the source if omitted). See [`service create`](#tiger-service-create) for allowed configurations. -- `--name`: fork name (default: `{source-service-name}-fork`). -- `--environment`: environment tag: `DEV` or `PROD` (default: `DEV`). -- `--no-wait`, `--wait-timeout`: wait behavior (default timeout: `30m`). -- `--no-set-default`, `--with-password`, `--output, -o`: default-service and output options. +You see something like: + +```txt +🍴 Forking service '' to create '(auto-generated)' at current state... +✅ Fork request accepted! +📋 New Service ID: +🔐 Password saved to system keyring for automatic authentication +đŸŽ¯ Set service '' as default service. +âŗ Waiting for fork to complete (timeout: 30m0s)... +🎉 Service fork completed successfully! +🔌 Run 'tiger db connect' to connect to your new service +``` + +Then the fork's details, in the same format as [`service get`](#tiger-service-get). + +| Flag | Description | +| --- | --- | +| `--now` | Fork at the current database state. | +| `--last-snapshot` | Fork at the last snapshot (faster). | +| `--to-timestamp` | Fork at a point in time (RFC3339). | +| `--cpu`, `--memory` | Compute for the fork (inherits from the source if omitted). See [`service create`](#tiger-service-create) for allowed configurations. | +| `--name` | Fork name (default: `{source-service-name}-fork`). | +| `--environment` | Environment tag: `DEV` or `PROD` (default: `DEV`). | +| `--no-wait`, `--wait-timeout` | Wait behavior (default timeout: `30m`). | +| `--no-set-default`, `--with-password`, `--output, -o` | Default-service and output options. | ### `tiger service resize` Change a {C.SERVICE_SHORT}'s CPU and memory. The service may be briefly unavailable during the resize. +**Usage**: `tiger service resize [flags]` + ```bash -tiger service resize --cpu 4 --memory 16 +tiger service resize --cpu 4000 --memory 16 ``` -- `--cpu`, `--memory`: new allocation. See [`service create`](#tiger-service-create) for allowed configurations. -- `--no-wait`, `--wait-timeout`: wait behavior (default timeout: `10m`). +You see something like: + +```txt +📐 Resizing service '' to 4 CPU/16 GB... +✅ Resize request accepted for service ''! +âŗ Waiting for resize to complete (timeout: 10m0s)... +🎉 Service '' has been successfully resized to 4 CPU/16 GB! +``` + +| Flag | Description | +| --- | --- | +| `--cpu`, `--memory` | New allocation. CPU is in millicores, memory in gigabytes, so 4 CPU / 16 GB is `--cpu 4000 --memory 16`. See [`service create`](#tiger-service-create) for allowed configurations. | +| `--no-wait`, `--wait-timeout` | Wait behavior (default timeout: `10m`). | ### `tiger service start` Start an inactive {C.SERVICE_SHORT}. +**Usage**: `tiger service start [flags]` + ```bash tiger service start ``` -- `--no-wait`, `--wait-timeout`: wait behavior (default timeout: `10m`). +You see something like: + +```txt +â–ļī¸ Start request accepted for service ''. +âŗ Waiting for service to start (wait timeout: 10m0s)... +✅ Service has been successfully started! +``` + +| Flag | Description | +| --- | --- | +| `--no-wait`, `--wait-timeout` | Wait behavior (default timeout: `10m`). | ### `tiger service stop` Stop an active {C.SERVICE_SHORT}. After stopping, the service no longer accepts connections. +**Usage**: `tiger service stop [flags]` + ```bash tiger service stop ``` -- `--no-wait`, `--wait-timeout`: wait behavior (default timeout: `10m`). +You see something like: + +```txt +âšī¸ Stop request accepted for service ''. +âŗ Waiting for service to stop (timeout: 10m0s)... +✅ Service has been successfully stopped! +``` + +| Flag | Description | +| --- | --- | +| `--no-wait`, `--wait-timeout` | Wait behavior (default timeout: `10m`). | ### `tiger service update-password` Update the master password for a {C.SERVICE_SHORT}. +**Usage**: `tiger service update-password [flags]` + ```bash -tiger service update-password +tiger service update-password --auto-generate ``` -- `--new-password`: new password for the `tsdbadmin` user. -- `--auto-generate`: auto-generate a secure password (mutually exclusive with `--new-password`). +You see something like: + +```txt +Successfully generated a new password. +Password saved to system keyring for automatic authentication +To view your new password, run: + tiger service get --with-password +✅ Master password for 'tsdbadmin' user updated successfully +``` + +| Flag | Description | +| --- | --- | +| `--new-password` | New password for the `tsdbadmin` user. | +| `--auto-generate` | Auto-generate a secure password (mutually exclusive with `--new-password`). | ### `tiger service delete` Delete a {C.SERVICE_SHORT}. This is irreversible and prompts for confirmation before proceeding. +**Usage**: `tiger service delete [flags]` + ```bash -tiger service delete +tiger service delete --confirm ``` -- `--confirm`: skip the confirmation prompt. AI agents must confirm with the user first. -- `--no-wait`, `--wait-timeout`: wait behavior (default timeout: `30m`). +You see something like: + +```txt +đŸ—‘ī¸ Delete request accepted for service ''. +âŗ Waiting for service '' to be deleted +✅ Service '' has been successfully deleted. +``` + +| Flag | Description | +| --- | --- | +| `--confirm` | Skip the confirmation prompt. AI agents must confirm with the user first. | +| `--no-wait`, `--wait-timeout` | Wait behavior (default timeout: `30m`). | + + +There is no {C.MCP_SHORT} tool for `service delete`; use this {C.CLI_SHORT} command instead. + ### `tiger service logs` View the logs for a {C.SERVICE_SHORT}. Alias: `log`. +**Usage**: `tiger service logs [flags]` + ```bash -tiger service logs +tiger service logs --tail 5 +``` + +You see something like: + +```txt +2026-08-13 07:07:50 UTC [158]: [6a79e2e5.9e-301] 0 @,app= [00000] LOG: checkpoint starting: time +2026-08-13 07:07:50 UTC [158]: [6a79e2e5.9e-302] 0 @,app= [00000] LOG: checkpoint complete: wrote 4 buffers (0.0%), wrote 0 SLRU buffers; 0 WAL file(s) added, 0 removed, 1 recycled; write=0.403 s, sync=0.003 s, total=0.412 s; sync files=3, longest=0.003 s, average=0.001 s; distance=16390 kB, estimate=29655 kB; lsn=0/CE001A80, redo lsn=0/CE001A28 +2026-08-13 07:07:51 - wal_archive_command_pgbackrest - archiving pg_wal/0000000100000000000000CE +2026-08-13 07:29:22 UTC [307395]: [6a7d7252.4b0c3-1] 0 [unknown]@[unknown],app=[unknown] [08P01] LOG: SSL error: unexpected eof while reading +2026-08-13 07:29:22 UTC [307395]: [6a7d7252.4b0c3-2] 0 [unknown]@[unknown],app=[unknown] [08006] LOG: could not receive data from client: Connection reset by peer ``` -- `--tail`: number of log lines to show (default: `100`). -- `--since`, `--until`: fetch logs within a time range (RFC3339, for example `2024-01-15T09:00:00Z`). -- `--node`: specific node to fetch logs from (for services with HA replicas; `0` is valid). -- `--output, -o`: output format: `text`, `json`, or `yaml`. +{C.CLI_LONG} converts {C.PG} log timestamps to your machine's time zone, so set `TZ` if you want a specific one (for example, `TZ=UTC tiger service logs `). The `wal_archive_command_pgbackrest` lines come from the backup agent rather than {C.PG}, and are always in UTC. + +| Flag | Description | +| --- | --- | +| `--tail` | Number of log entries to show (default: `100`). One entry can span several lines, for example a `FATAL` followed by its `DETAIL`, so the output can be longer than the number you ask for. | +| `--since`, `--until` | Fetch logs within a time range (RFC3339, for example `2024-01-15T09:00:00Z`). | +| `--node` | Specific node to fetch logs from (for services with HA replicas; `0` is valid). | +| `--output, -o` | Output format: `text`, `json`, or `yaml`. | ## Database +Connect to a {C.SERVICE_SHORT}'s database and manage roles from the terminal. See [Work with your data](/build/tiger-cli-mcp/common-tasks#work-with-your-data) for how these commands compare to asking {C.MCP_LONG}, and [best practices](/build/tiger-cli-mcp/agent-best-practices#restrict-agents-to-read-only) for connecting an agent as a read-only role. + +The `--pooled` flag on these commands, and the `pooled` parameter on {C.MCP_SHORT}'s database tools, need a connection pooler on the {C.SERVICE_SHORT}. Without one, the command fails with `connection pooler not available for this service`. + ### `tiger db connect` Connect to a {C.SERVICE_SHORT} with `psql`. Pass extra `psql` flags after `--`, for example `tiger db connect -- --single-transaction`. Alias: `psql`. +**Usage**: `tiger db connect [flags]` + ```bash tiger db connect ``` -- `--pooled`: use connection pooling (default: `false`). -- `--role`: database role (default: `tsdbadmin`). -- `--read-only`: open the session in {C.CLOUD_LONG}'s immutable read-only mode, so writes and DDL are rejected by the server. The [`read_only` config option](#configuration-parameters) or `TIGER_READ_ONLY=true` forces the same behavior. -- `--no-replica-prompt`: do not prompt to connect to a read replica. +You see something like: + +```txt +psql (17.7 (Homebrew), server 18.4 (Ubuntu 18.4-1.pgdg22.04+1)) +WARNING: psql major version 17, server major version 18. + Some psql features might not work. +SSL connection (protocol: TLSv1.3, cipher: TLS_AES_256_GCM_SHA384, compression: off, ALPN: postgresql) +Type "help" for help. + +tsdb=> +``` + +| Flag | Description | +| --- | --- | +| `--pooled` | Use connection pooling (default: `false`). | +| `--role` | Database role (default: `tsdbadmin`). | +| `--read-only` | Open the session in {C.CLOUD_LONG}'s immutable read-only mode, so writes and DDL are rejected by the server. The [`read_only` config option](#configuration-parameters) or `TIGER_READ_ONLY=true` forces the same behavior. | +| `--no-replica-prompt` | Do not prompt to connect to a read replica. | ### `tiger db connection-string` Print the connection string for a {C.SERVICE_SHORT}. +**Usage**: `tiger db connection-string [flags]` + ```bash tiger db connection-string ``` -- `--pooled`: use connection pooling (default: `false`). -- `--role`: database role (default: `tsdbadmin`). -- `--with-password`: include the password (default: `false`, less secure). -- `--read-only`: emit a read-only connection string. +You see something like: + +```txt +postgresql://tsdbadmin@/tsdb?sslmode=require +``` + +With `--read-only`, the connection string sets a session option that forces {C.CLOUD_LONG}'s immutable read-only mode: + +```txt +postgresql://tsdbadmin@/tsdb?sslmode=require&options=-c%20tsdb_admin.read_only_connection%3Dtrue +``` + +| Flag | Description | +| --- | --- | +| `--pooled` | Use connection pooling (default: `false`). | +| `--role` | Database role (default: `tsdbadmin`). | +| `--with-password` | Include the password (default: `false`, less secure). | +| `--read-only` | Emit a read-only connection string. | ### `tiger db create role` Create a database role. +**Usage**: `tiger db create role [flags]` + ```bash -tiger db create role --name app_role +tiger db create role --name app_role --read-only ``` -- `--name` (required): the role to create. -- `--read-only`: enforce permanent read-only for the role using `tsdb_admin.read_only_role`. -- `--from`: inherit grants from one or more roles, for example `--from app_role,readonly_role`. -- `--statement-timeout`: statement timeout for the role, for example `30s`, `5m`. -- `--password`: role password (falls back to `TIGER_NEW_PASSWORD`, otherwise auto-generated). -- `--output, -o`: output format: `json`, `yaml`, or `table`. +You see: + +```txt +✓ Role 'app_role' created successfully + Read-only enforcement: enabled (permanent, role-based) +``` + +| Flag | Description | +| --- | --- | +| `--name` (required) | The role to create. | +| `--read-only` | Enforce permanent read-only for the role using `tsdb_admin.read_only_role`. This enforces read-only, it doesn't grant read access: the new role can log in and has `USAGE` on `public`, but no table privileges, so `SELECT` fails until you [grant it](/deploy/tiger-cloud/tiger-cloud-aws/security/read-only-role#create-a-read-only-user). | +| `--from` | Inherit grants from one or more roles, for example `--from app_role,readonly_role`. | +| `--statement-timeout` | Statement timeout for the role, for example `30s`, `5m`. | +| `--password` | Role password (falls back to `TIGER_NEW_PASSWORD`, otherwise auto-generated). | +| `--output, -o` | Output format: `json`, `yaml`, or `table`. | ### `tiger db schema` Display the schema of a {C.SERVICE_SHORT} database as readable text. +**Usage**: `tiger db schema [flags]` + ```bash tiger db schema ``` -- `--schema`: restrict output to a single schema. -- `--definitions`: include full object definitions (view `SELECT`s, function and procedure bodies). -- `--comments`: include object comments (`COMMENT ON` text). -- `--internal`: include system schemas (`pg_*`, `information_schema`, {C.TIMESCALE_DB} internals) and extension-owned objects. -- `--pooled`: use connection pooling (default: `false`). -- `--role`: database role (default: `tsdbadmin`). +You see something like: + +```txt +DATABASE: () + +SCHEMA: public + +TABLE: sensor_data + -- HYPERTABLE (chunks=0, compression=enabled) + time TIMESTAMP WITH TIME ZONE NOT NULL + sensor_id TEXT + value DOUBLE PRECISION + + INDEX sensor_data_time_idx ("time" DESC) +``` + +| Flag | Description | +| --- | --- | +| `--schema` | Restrict output to a single schema. | +| `--definitions` | Include full object definitions (view `SELECT`s, function and procedure bodies). | +| `--comments` | Include object comments (`COMMENT ON` text). | +| `--internal` | Include system schemas (`pg_*`, `information_schema`, {C.TIMESCALE_DB} internals) and extension-owned objects. | +| `--pooled` | Use connection pooling (default: `false`). | +| `--role` | Database role (default: `tsdbadmin`). | ### `tiger db save-password` Save the password for a {C.SERVICE_SHORT} to the keychain. +**Usage**: `tiger db save-password [flags]` + ```bash -tiger db save-password +tiger db save-password --password= ``` -- `--role`: database role (default: `tsdbadmin`). -- `--password`: password value (or use `TIGER_NEW_PASSWORD`). +You see: + +```txt +Password saved successfully for service (role: tsdbadmin) +``` + +| Flag | Description | +| --- | --- | +| `--role` | Database role (default: `tsdbadmin`). | +| `--password` | Password value (or use `TIGER_NEW_PASSWORD`). | ### `tiger db test-connection` Test connectivity to a {C.SERVICE_SHORT}. +**Usage**: `tiger db test-connection [flags]` + ```bash tiger db test-connection ``` -- `--timeout, -t`: connection timeout (default: `3s`, `0` for none). -- `--pooled`: use connection pooling (default: `false`). -- `--role`: database role (default: `tsdbadmin`). +You see: + +```txt +Connection successful +``` + +If the connection fails, the reason is printed twice, once as a message and once as an error: + +```txt +Connection failed: failed to connect to `user=tsdbadmin database=tsdb`: :: failed SASL auth: FATAL: password authentication failed for user "tsdbadmin" (SQLSTATE 28P01) +Error: failed to connect to `user=tsdbadmin database=tsdb`: :: failed SASL auth: FATAL: password authentication failed for user "tsdbadmin" (SQLSTATE 28P01) +``` + +Use the exit code in scripts: + +| Exit code | Meaning | +| --- | --- | +| `0` | The connection succeeded. | +| `1` | {C.CLI_LONG} didn't run the check, because a flag or argument was invalid. | +| `2` | The connection was attempted and failed: the server was unreachable, the attempt timed out, or the credentials were rejected. | +| `3` | No attempt was made, because no {C.SERVICE_SHORT} with that ID exists or no ID was given. | + +| Flag | Description | +| --- | --- | +| `--timeout, -t` | Connection timeout (default: `3s`, `0` for none). | +| `--pooled` | Use connection pooling (default: `false`). | +| `--role` | Database role (default: `tsdbadmin`). | ## MCP +Install and manage {C.MCP_LONG}, the tool your AI agent uses to work with {C.CLOUD_LONG}. See [Integrate Tiger Cloud with your AI agent](/get-started/quickstart/mcp-cli) to set it up, and the [{C.MCP_LONG} reference](/reference/tiger-cloud/tiger-mcp) for every tool it exposes. + ### `tiger mcp install` Install and configure {C.MCP_LONG} for an AI agent. Supported clients: `claude-code`, `codex`, `cursor`, `gemini`, `vscode`, `windsurf`, `antigravity`, `kiro-cli`. If no client is given, you are prompted to choose. +**Usage**: `tiger mcp install [client] [flags]` + ```bash tiger mcp install claude-code ``` -- `--no-backup`: do not back up the client's existing config before writing. -- `--config-path`: path to the client config file to update. +For sample output, see [Install and configure Tiger MCP](/get-started/quickstart/mcp-cli#install-and-configure-tiger-mcp). + +| Flag | Description | +| --- | --- | +| `--no-backup` | Do not back up the client's existing config before writing. | +| `--config-path` | Path to the client config file to update. | ### `tiger mcp list` List the available {C.MCP_SHORT} tools, prompts, and resources. +**Usage**: `tiger mcp list [flags]` + ```bash tiger mcp list ``` -- `--output, -o`: output format: `json`, `yaml`, or `table`. +You see something like: + +```txt +┌────────â”Ŧ────────────────────────────────────────┐ +│ TYPE │ NAME │ +├────────â”ŧ────────────────────────────────────────┤ +│ prompt │ design-postgis-tables │ +│ prompt │ design-postgres-tables │ +│ prompt │ find-hypertable-candidates │ +│ prompt │ ghost-database │ +│ prompt │ migrate-postgres-tables-to-hypertables │ +│ prompt │ pgvector-semantic-search │ +│ prompt │ postgres │ +│ prompt │ postgres-database-migration │ +│ prompt │ postgres-hybrid-text-search │ +│ prompt │ setup-timescaledb-hypertables │ +│ tool │ db_execute_query │ +│ tool │ db_schema │ +│ tool │ search_docs │ +│ tool │ service_create │ +│ tool │ service_fork │ +│ tool │ service_get │ +│ tool │ service_list │ +│ tool │ service_logs │ +│ tool │ service_resize │ +│ tool │ service_start │ +│ tool │ service_stop │ +│ tool │ service_update_password │ +│ tool │ view_skill │ +└────────┴────────────────────────────────────────┘ +``` + +| Flag | Description | +| --- | --- | +| `--output, -o` | Output format: `json`, `yaml`, or `table`. | ### `tiger mcp get` Show detailed information about a {C.MCP_SHORT} tool, prompt, or resource, including skills. Aliases: `describe`, `show`. +**Usage**: `tiger mcp get [flags]` + ```bash tiger mcp get service_create tiger mcp get setup-timescaledb-hypertables ``` -- `--output, -o`: output format: `json`, `yaml`, or `table`. +For `service_create`, you see something like: + +```txt +Create Database Service [open-world] + +Tool name: service_create + +Description: +Create a new database service in Tiger Cloud with specified type, compute resources, region, and HA options. + +The default type of service created depends on the user's plan: +- Free plan: Creates a service with shared CPU/memory and the 'time-series' and 'ai' add-ons +- Paid plans: Creates a service with 0.5 CPU / 2 GB memory and the 'time-series' add-on + +WARNING: Creates billable resources. + +Parameters: + ... + +Output: + ... +``` + +Full parameter and output details follow, matching the [{C.MCP_LONG} reference](/reference/tiger-cloud/tiger-mcp). + +| Flag | Description | +| --- | --- | +| `--output, -o` | Output format: `json`, `yaml`, or `table`. | ### `tiger mcp start` Start {C.MCP_LONG}. `tiger mcp start` is the same as `tiger mcp start stdio`. +**Usage**: `tiger mcp start [transport] [flags]` + ```bash tiger mcp start ``` -- `stdio`: stdio transport (default). -- `http`: HTTP transport, with `--port` (default: `8080`) and `--host` (default: `localhost`). +Produces no console output; it starts listening for JSON-RPC requests on stdio (or HTTP, with the `http` transport). + +| Transport | Description | +| --- | --- | +| `stdio` | stdio transport (default). | +| `http` | HTTP transport, with `--port` (default: `8080`) and `--host` (default: `localhost`). | ## Configuration parameters diff --git a/src/partials/_devops-mcp-commands.mdx b/src/partials/_devops-mcp-commands.mdx index 9cf13692..824de744 100644 --- a/src/partials/_devops-mcp-commands.mdx +++ b/src/partials/_devops-mcp-commands.mdx @@ -4,7 +4,7 @@ import { Callout } from "@stainless-api/docs/components"; {C.MCP_LONG} exposes the following tools to your AI agent. You do not call these directly; you describe what you want and the agent selects the tool. -Parameter names and required or optional fields can change with new {C.MCP_SHORT} versions. Run `tiger mcp get ` for the current definition of any tool. +Parameter names, types, and required or optional fields can change with new {C.MCP_SHORT} versions. Run `tiger mcp get ` for the current definition of any tool. ## Service tools @@ -17,18 +17,35 @@ The following tools are disabled when using read-only mode: `service_create`, `s List the {C.SERVICE_SHORT}s in the current {C.PROJECT_SHORT}. No parameters. +**Returns**: an array of {C.SERVICE_SHORT}s, each with its status, type, region, and resource allocation. + ### `service_get` Show detailed information about one {C.SERVICE_SHORT}. -- `service_id` (required): the target {C.SERVICE_SHORT}. -- `with_password`: include the password. Only set this if you explicitly ask for the password. +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `service_id` | string | Yes | The target {C.SERVICE_SHORT}. | +| `with_password` | boolean | No | Include the password. Only set this if you explicitly ask for the password. Default: `false`. | + +**Returns**: connection endpoints, replica configuration, resource allocation, creation time, and status. ### `service_create` Create a new {C.SERVICE_SHORT}. Addons: `time-series` ({C.TIMESCALE_DB}) and `ai` (AI/vector). -- `name`, `addons`, `region`, `cpu_memory`, `replicas`, `wait`, `set_default`, `with_password`. +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `name` | string | No | Service name (auto-generated if omitted). | +| `addons` | array of strings (`time-series`, `ai`) | No | Addons to enable. Omit or use an empty array for {C.PG}-only. | +| `region` | string | No | Cloud region, for example `us-east-1`. | +| `cpu_memory` | string (enum) | No | CPU/memory allocation, for example `"4 CPU/16 GB"`. See [allowed configurations](/reference/tiger-cloud/tiger-cli#tiger-service-create). | +| `replicas` | integer (0-5) | No | Number of high-availability replicas. Default: `0`. | +| `wait` | boolean | No | Wait for the {C.SERVICE_SHORT} to be ready before returning. Default: `false`. | +| `set_default` | boolean | No | Set the new {C.SERVICE_SHORT} as the default. Default: `true`. | +| `with_password` | boolean | No | Include the password in the response. Default: `false`. | + +**Returns**: the new {C.SERVICE_SHORT}'s details, including its ID, connection endpoint, and status. `service_create` provisions billable infrastructure. @@ -38,10 +55,18 @@ Create a new {C.SERVICE_SHORT}. Addons: `time-series` ({C.TIMESCALE_DB}) and `ai Fork a {C.SERVICE_SHORT} into an independent copy. -- `service_id` (required): the source {C.SERVICE_SHORT}. -- `fork_strategy` (required): `NOW`, `LAST_SNAPSHOT`, or `PITR`. -- `target_time`: point in time, for `PITR`. -- `name`, `cpu_memory`, `wait`, `set_default`, `with_password`. +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `service_id` | string | Yes | The source {C.SERVICE_SHORT}. | +| `fork_strategy` | string (enum: `NOW`, `LAST_SNAPSHOT`, `PITR`) | Yes | When to fork from. | +| `target_time` | string (RFC3339) | Only with `PITR` | Point in time to fork from. | +| `name` | string | No | Fork name (auto-generated if omitted). | +| `cpu_memory` | string (enum) | No | CPU/memory allocation for the fork. Inherits from the source if omitted. | +| `wait` | boolean | No | Wait for the fork to be ready before returning. Default: `false`. | +| `set_default` | boolean | No | Set the fork as the default {C.SERVICE_SHORT}. Default: `true`. | +| `with_password` | boolean | No | Include the password in the response. Default: `false`. | + +**Returns**: the new fork's details, including its ID, connection endpoint, and status. `service_fork` provisions billable infrastructure. @@ -51,7 +76,13 @@ Fork a {C.SERVICE_SHORT} into an independent copy. Change a {C.SERVICE_SHORT}'s CPU and memory. -- `service_id` (required), `cpu_memory` (required), `wait`. +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `service_id` | string | Yes | The {C.SERVICE_SHORT} to resize. | +| `cpu_memory` | string (enum) | Yes | New CPU/memory allocation, for example `"4 CPU/16 GB"`. | +| `wait` | boolean | No | Wait for the resize to finish before returning. Default: `false`. | + +**Returns**: the {C.SERVICE_SHORT}'s updated resource allocation and status. `service_resize` affects billing, and the {C.SERVICE_SHORT} may be briefly unavailable. @@ -61,25 +92,47 @@ Change a {C.SERVICE_SHORT}'s CPU and memory. Start a stopped {C.SERVICE_SHORT}. -- `service_id` (required), `wait`. +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `service_id` | string | Yes | The {C.SERVICE_SHORT} to start. | +| `wait` | boolean | No | Wait for the {C.SERVICE_SHORT} to be fully started before returning. Default: `false`. | + +**Returns**: the {C.SERVICE_SHORT}'s updated status. ### `service_stop` Stop a running {C.SERVICE_SHORT}. -- `service_id` (required), `wait`. +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `service_id` | string | Yes | The {C.SERVICE_SHORT} to stop. | +| `wait` | boolean | No | Wait for the {C.SERVICE_SHORT} to be fully stopped before returning. Default: `false`. | + +**Returns**: the {C.SERVICE_SHORT}'s updated status. ### `service_update_password` Update the `tsdbadmin` password. May disconnect existing sessions. -- `service_id` (required), `password` (required). +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `service_id` | string | Yes | The {C.SERVICE_SHORT} to update. | +| `password` | string | Yes | The new password for the `tsdbadmin` user. | + +**Returns**: confirmation that the password was updated. ### `service_logs` Fetch {C.SERVICE_SHORT} logs. -- `service_id` (required), `tail`, `since`, `until`, `node`. +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `service_id` | string | Yes | The {C.SERVICE_SHORT} to fetch logs for. | +| `tail` | integer | No | Number of log lines to return. Default: `100`. | +| `since`, `until` | string (RFC3339) | No | Restrict logs to a time range. | +| `node` | integer | No | Specific node to fetch logs from (for {C.SERVICE_SHORT}s with HA replicas; `0` is valid). Defaults to the primary node. | + +**Returns**: the matching log lines. ## Database tools @@ -87,7 +140,16 @@ Fetch {C.SERVICE_SHORT} logs. Run a single SQL statement against a {C.SERVICE_SHORT}. -- `service_id` (required), `query` (required), `parameters`, `timeout_seconds`, `role`, `pooled`. +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `service_id` | string | Yes | The target {C.SERVICE_SHORT} (or a read replica set ID, to query the replica instead of the primary). | +| `query` | string | Yes | The SQL statement to run. | +| `parameters` | array of strings | No | Values substituted for `$1`, `$2`, and so on. Not supported with multi-statement queries. | +| `timeout_seconds` | integer | No | Query timeout. Default: `30`. | +| `role` | string | No | Database role to connect as. Default: `tsdbadmin`. | +| `pooled` | boolean | No | Use connection pooling. Default: `false`. | + +**Returns**: column information, row data, and execution metadata for each statement. `db_execute_query` can run `INSERT`, `UPDATE`, `DELETE`, and DDL. Multi-statement queries (semicolon-separated) are supported when no `parameters` are provided. In read-only mode, writes and DDL are rejected by the server. @@ -97,7 +159,17 @@ Run a single SQL statement against a {C.SERVICE_SHORT}. Return the schema of a {C.SERVICE_SHORT} database as readable text (tables, views, materialized views, and more). -- `service_id` (required), `schema`, `definitions`, `comments`, `internal`, `role`, `pooled`. +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `service_id` | string | Yes | The target {C.SERVICE_SHORT} (or a read replica set ID). | +| `schema` | string | No | Restrict output to a single schema. | +| `definitions` | boolean | No | Include full object definitions. Default: `false`. | +| `comments` | boolean | No | Include object comments (`COMMENT ON` text). Default: `false`. | +| `internal` | boolean | No | Include system schemas and extension-owned objects. Default: `false`. | +| `role` | string | No | Database role to connect as. Default: `tsdbadmin`. | +| `pooled` | boolean | No | Use connection pooling. Default: `false`. | + +**Returns**: readable text describing tables, views, materialized views, enum types, functions, procedures, indexes, triggers, and {C.TIMESCALE_DB} {C.HYPERTABLE} and {C.CAGG} metadata. The connection is opened in immutable read-only mode, so this tool never writes. ## Documentation and skills tools @@ -105,10 +177,22 @@ Return the schema of a {C.SERVICE_SHORT} database as readable text (tables, view Search {C.COMPANY} documentation with hybrid semantic (vector) and keyword search. -- `source` (required), `query` (required), `limit` (required), `semanticWeight` (required): `0` for keyword-only, `1` for semantic-only, or a value in between to blend the two. +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `source` | string (enum) | Yes | The documentation source, for example `tiger`, `postgres_17`, or `postgis_3.5`. | +| `query` | string | Yes | The search query. | +| `limit` | integer | Yes | Maximum matches to return. Default: `20`. | +| `semanticWeight` | number (0-1) | Yes | `0` for keyword-only, `1` for semantic-only, or a value in between to blend the two. Default: `0.7`. | + +**Returns**: ranked matches from the requested documentation source. ### `view_skill` Retrieve a built-in skill for {C.TIMESCALE_DB} operations and best practices (for example, schema design, {C.HYPERTABLE} setup, and migration planning). -- `skill_name` (required), `path` (required). \ No newline at end of file +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `skill_name` | string | Yes | The skill to retrieve, or `.` to list all available skills. | +| `path` | string | Yes | A relative path to a file or directory within the skill. Use `.` to list the skill's root directory, or leave empty for the skill's `SKILL.md`. | + +**Returns**: the requested skill content, or a directory listing. \ No newline at end of file diff --git a/src/partials/_security-client-credentials.mdx b/src/partials/_security-client-credentials.mdx index 34d23c21..7717c305 100644 --- a/src/partials/_security-client-credentials.mdx +++ b/src/partials/_security-client-credentials.mdx @@ -51,6 +51,17 @@ resources inside the respective {C.PROJECT_SHORT}. +## Use client credentials to log in + +Client credentials are also how you authenticate {C.CLI_LONG} and {C.MCP_LONG} non-interactively, for example in CI or from an AI agent that can't complete a browser login. Set them as environment variables, then log in: + +```shell +TIGER_PUBLIC_KEY= TIGER_SECRET_KEY= \ +tiger auth login +``` + +The {C.PROJECT_SHORT} is auto-detected from your credentials. See [Authentication parameters](/reference/tiger-cloud/tiger-cli#authentication-parameters) for the equivalent `--public-key`/`--secret-key` flags. + ## Delete client credentials diff --git a/src/partials/_service-management-cli.mdx b/src/partials/_service-management-cli.mdx index 31e70440..aa144245 100644 --- a/src/partials/_service-management-cli.mdx +++ b/src/partials/_service-management-cli.mdx @@ -1,7 +1,7 @@ import * as C from "@constants"; import { Callout } from "@stainless-api/docs/components"; -Use `tiger service list` to find the ID of the {C.SERVICE_SHORT} you want to manage, then run the relevant command. All commands require you to be [logged in](/get-started/quickstart/tiger-cli). +Use [`tiger service list`](/reference/tiger-cloud/tiger-cli#tiger-service-list) to find the ID of the {C.SERVICE_SHORT} you want to manage, then run the relevant command. All commands require you to be [logged in](/get-started/quickstart/tiger-cli). ## Reset your {C.SERVICE_SHORT} password @@ -15,6 +15,16 @@ tiger service update-password tiger service update-password --auto-generate ``` +With `--auto-generate`, you see something like: + +```txt +Successfully generated a new password. +Password saved to system keyring for automatic authentication +To view your new password, run: + tiger service get --with-password +✅ Master password for 'tsdbadmin' user updated successfully +``` + This updates the password for the `tsdbadmin` database user, not your {C.CONSOLE_SHORT} account. To switch the authentication type between SCRAM and MD5, see the [{C.CONSOLE} tab](#tab=tiger-console). @@ -39,16 +49,46 @@ To stop a {C.SERVICE_SHORT} temporarily without deleting it: tiger service stop ``` +You see something like: + +```txt +âšī¸ Stop request accepted for service ''. +âŗ Waiting for service to stop (timeout: 10m0s)... +✅ Service has been successfully stopped! +``` + You are no longer billed for compute, but storage billing continues. To start the {C.SERVICE_SHORT} again: ```bash tiger service start ``` +You see something like: + +```txt +â–ļī¸ Start request accepted for service ''. +âŗ Waiting for service to start (wait timeout: 10m0s)... +✅ Service has been successfully started! +``` + ## Delete a {C.SERVICE_SHORT} Deleting a {C.SERVICE_SHORT} is irreversible and permanently removes it and all its data. {C.CLI_SHORT} prompts you to type the service ID to confirm: ```bash tiger service delete -``` \ No newline at end of file +``` + +You see something like: + +```txt +đŸ—‘ī¸ Delete request accepted for service ''. +âŗ Waiting for service '' to be deleted +✅ Service '' has been successfully deleted. +``` + + + +{C.CLI_SHORT} doesn't enforce the delete protection {C.CONSOLE} applies to production {C.SERVICE_SHORT}s. `tiger service delete` deletes a production {C.SERVICE_SHORT} the same way it deletes a development one, with no extra check. + + \ No newline at end of file