-
Notifications
You must be signed in to change notification settings - Fork 457
clickhousectl docs #5843
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
Draft
sdairs
wants to merge
8
commits into
main
Choose a base branch
from
clickhousectl-docs
base: main
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.
Draft
clickhousectl docs #5843
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
dfde5f5
update quickstart to use clickhousectl
sdairs cf3a58b
Update quick install to have tabs for clickhousectl and curl
sdairs 4527ac4
add clickhousectl to feature table
sdairs 1c1b09a
add clickhousectl to install options
sdairs 374545a
add clickhousectl to deployment modes
sdairs 559e6e9
add cloud features page for clickhousectl
sdairs ed89bd7
lint: add custom anchor tags
Blargian b0e660e
Merge branch 'main' into clickhousectl-docs
Blargian 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
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,113 @@ | ||
| --- | ||
| sidebar_label: 'ClickHouse CLI' | ||
| slug: /cloud/features/cli | ||
| title: 'ClickHouse CLI' | ||
| description: 'Use the ClickHouse CLI to manage ClickHouse Cloud services and local ClickHouse instances' | ||
| keywords: ['clickhousectl', 'CLI', 'cloud management', 'local development'] | ||
| doc_type: 'reference' | ||
| --- | ||
|
|
||
| # ClickHouse CLI {#clickhouse-cli} | ||
|
|
||
| The ClickHouse CLI (`clickhousectl`) is a unified command-line tool for managing ClickHouse Cloud resources, and local development with ClickHouse. | ||
|
|
||
| ## Installation {#installation} | ||
|
|
||
| ```bash | ||
| curl https://clickhouse.com/cli | sh | ||
| ``` | ||
|
|
||
| A `chctl` alias is also created automatically for convenience. | ||
|
|
||
| ## Cloud management {#cloud-management} | ||
|
|
||
| Authenticate with ClickHouse Cloud and manage your services directly from the command line. | ||
|
|
||
| ### Authentication {#authentication} | ||
|
|
||
| ```bash | ||
| clickhousectl cloud auth | ||
| ``` | ||
|
|
||
| This prompts for your API key and secret, and saves them to `.clickhouse/credentials.json` (project-local, git-ignored). | ||
|
|
||
| You can also use environment variables: | ||
|
|
||
| ```bash | ||
| export CLICKHOUSE_CLOUD_API_KEY=your-key | ||
| export CLICKHOUSE_CLOUD_API_SECRET=your-secret | ||
| ``` | ||
|
|
||
| ### Services {#services} | ||
|
|
||
| ```bash | ||
| # List services | ||
| clickhousectl cloud service list | ||
|
|
||
| # Create a service | ||
| clickhousectl cloud service create --name my-service \ | ||
| --provider aws \ | ||
| --region us-east-1 | ||
|
|
||
| # Get service details | ||
| clickhousectl cloud service get <service-id> | ||
|
|
||
| # Scale a service | ||
| clickhousectl cloud service scale <service-id> \ | ||
| --min-replica-memory-gb 24 \ | ||
| --max-replica-memory-gb 48 \ | ||
| --num-replicas 3 | ||
|
|
||
| # Start/stop a service | ||
| clickhousectl cloud service start <service-id> | ||
| clickhousectl cloud service stop <service-id> | ||
|
|
||
| # Delete a service | ||
| clickhousectl cloud service delete <service-id> | ||
| ``` | ||
|
|
||
| ### Organizations {#organizations} | ||
|
|
||
| ```bash | ||
| clickhousectl cloud org list | ||
| clickhousectl cloud org get <org-id> | ||
| ``` | ||
|
|
||
| ### API keys {#api-keys} | ||
|
|
||
| ```bash | ||
| clickhousectl cloud key list | ||
| clickhousectl cloud key create --name ci-key --role-id <role-id> | ||
| clickhousectl cloud key delete <key-id> | ||
| ``` | ||
|
|
||
| ### Members and invitations {#members-and-invitations} | ||
|
|
||
| ```bash | ||
| clickhousectl cloud member list | ||
| clickhousectl cloud invitation create --email dev@example.com --role-id <role-id> | ||
| ``` | ||
|
|
||
| ### Backups {#backups} | ||
|
|
||
| ```bash | ||
| clickhousectl cloud backup list <service-id> | ||
| clickhousectl cloud backup get <service-id> <backup-id> | ||
| ``` | ||
|
|
||
| ### JSON output {#json-output} | ||
|
|
||
| Use the `--json` flag to get JSON-formatted responses from any cloud command: | ||
|
|
||
| ```bash | ||
| clickhousectl cloud --json service list | ||
| ``` | ||
|
|
||
| ## Local development {#local-development} | ||
|
|
||
| The CLI also manages local ClickHouse installations and servers. See the [quick install](/install/quick-install) page for getting started with local development. | ||
|
|
||
| ## Requirements {#requirements} | ||
|
|
||
| - macOS (aarch64, x86_64) or Linux (aarch64, x86_64) | ||
| - Cloud commands require a [ClickHouse Cloud API key](/cloud/manage/openapi) | ||
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
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
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,66 @@ | ||
| # Install ClickHouse using the ClickHouse CLI | ||
|
|
||
| The ClickHouse CLI (`clickhousectl`) helps you install and manage local ClickHouse | ||
| versions, launch servers, and run queries. | ||
|
|
||
| <VerticalStepper> | ||
|
|
||
| ## Install the ClickHouse CLI {#install-the-cli} | ||
|
|
||
| ```bash | ||
| curl https://clickhouse.com/cli | sh | ||
| ``` | ||
|
|
||
| A `chctl` alias is also created automatically for convenience. | ||
|
|
||
| ## Install ClickHouse {#cli-install-clickhouse} | ||
|
|
||
| Install the latest stable version of ClickHouse: | ||
|
|
||
| ```bash | ||
| clickhousectl local install stable | ||
| ``` | ||
|
|
||
| You can also install a specific version: | ||
|
|
||
| ```bash | ||
| clickhousectl local install lts # Latest LTS release | ||
| clickhousectl local install 25.6 # Latest 25.6.x.x | ||
| clickhousectl local install 25.6.1.1 # Exact version | ||
| ``` | ||
|
|
||
| ## Start clickhouse-server {#cli-start-clickhouse-server} | ||
|
|
||
| ```bash | ||
| clickhousectl local server start | ||
| ``` | ||
|
|
||
| The server runs in the background. To verify it's running: | ||
|
|
||
| ```bash | ||
| clickhousectl local server list | ||
| ``` | ||
|
|
||
| ## Start clickhouse-client {#cli-start-clickhouse-client} | ||
|
|
||
| ```bash | ||
| clickhousectl local client | ||
| ``` | ||
|
|
||
| You will see something like this: | ||
|
|
||
| ```response | ||
| ClickHouse client version 24.5.1.117 (official build). | ||
| Connecting to localhost:9000 as user default. | ||
| Connected to ClickHouse server version 24.5.1. | ||
|
|
||
| local-host :) | ||
| ``` | ||
|
|
||
| You're now ready to start sending SQL commands to ClickHouse! | ||
|
|
||
| :::tip | ||
| The [Quick Start](/get-started/quick-start) walks you through the steps for creating tables and inserting data. | ||
| ::: | ||
|
|
||
| </VerticalStepper> |
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
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
This file was deleted.
Oops, something went wrong.
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,84 @@ | ||
| --- | ||
| description: 'Quickly install ClickHouse using the CLI or curl' | ||
| keywords: ['ClickHouse', 'install', 'quick', 'curl', 'clickhousectl', 'CLI'] | ||
| sidebar_label: 'Quick install' | ||
| slug: /install/quick-install | ||
| title: 'Quick install' | ||
| hide_title: true | ||
| doc_type: 'guide' | ||
| --- | ||
|
|
||
| import Tabs from '@theme/Tabs'; | ||
| import TabItem from '@theme/TabItem'; | ||
| import QuickInstall from './_snippets/_quick_install.md' | ||
|
|
||
| # Quick install | ||
|
|
||
| If you don't need to install ClickHouse for production, the quickest way to get | ||
| set up is using the ClickHouse CLI or running an install script using curl. | ||
|
|
||
| <Tabs> | ||
| <TabItem value="cli" label="ClickHouse CLI" default> | ||
|
|
||
| The ClickHouse CLI (`clickhousectl`) helps you install and manage local ClickHouse | ||
| versions, launch servers, and run queries. | ||
|
|
||
| <VerticalStepper> | ||
|
|
||
| ## Install the ClickHouse CLI {#install-the-cli} | ||
|
|
||
| ```bash | ||
| curl https://clickhouse.com/cli | sh | ||
| ``` | ||
|
|
||
| A `chctl` alias is also created automatically for convenience. | ||
|
|
||
| ## Install ClickHouse {#install-clickhouse} | ||
|
|
||
| ```bash | ||
| clickhousectl local install stable | ||
| ``` | ||
|
|
||
| ## Start clickhouse-server {#start-clickhouse-server} | ||
|
|
||
| ```bash | ||
| clickhousectl local server start | ||
| ``` | ||
|
|
||
| The server runs in the background. To verify it's running: | ||
|
|
||
| ```bash | ||
| clickhousectl local server list | ||
| ``` | ||
|
|
||
| ## Start clickhouse-client {#start-clickhouse-client} | ||
|
|
||
| ```bash | ||
| clickhousectl local client | ||
| ``` | ||
|
|
||
| You will see something like this: | ||
|
|
||
| ```response | ||
| ClickHouse client version 24.5.1.117 (official build). | ||
| Connecting to localhost:9000 as user default. | ||
| Connected to ClickHouse server version 24.5.1. | ||
|
|
||
| local-host :) | ||
| ``` | ||
|
|
||
| You're now ready to start sending SQL commands to ClickHouse! | ||
|
|
||
| :::tip | ||
| The [Quick Start](/get-started/quick-start) walks you through the steps for creating tables and inserting data. | ||
| ::: | ||
|
|
||
| </VerticalStepper> | ||
|
|
||
| </TabItem> | ||
| <TabItem value="curl" label="Curl script"> | ||
|
|
||
| <QuickInstall/> | ||
|
|
||
| </TabItem> | ||
| </Tabs> |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.