원클릭으로
clickhousectl-cloud-deploy
// Use when a user wants to deploy ClickHouse to the cloud, go to production, use ClickHouse Cloud, host a managed ClickHouse service, or migrate from a local ClickHouse setup to ClickHouse Cloud.
// Use when a user wants to deploy ClickHouse to the cloud, go to production, use ClickHouse Cloud, host a managed ClickHouse service, or migrate from a local ClickHouse setup to ClickHouse Cloud.
MUST USE when reviewing ClickHouse schemas, queries, or configurations. Contains 31 rules that MUST be checked before providing recommendations. Always read relevant rule files and cite specific rules in responses.
MUST USE when designing ClickHouse architectures, selecting between ingestion or modeling patterns, or translating best practices into workload-specific system designs. Complements clickhouse-best-practices with decision frameworks and explicit provenance labels.
Use when a user wants to build an application with ClickHouse, set up a local ClickHouse development environment, install ClickHouse, create a local server, create tables, or start developing with ClickHouse. Covers the full flow from zero to a working local ClickHouse setup.
Troubleshoot and resolve common issues with the ClickHouse Node.js client (@clickhouse/client). Use this skill whenever a user reports errors, unexpected behavior, or configuration questions involving the Node.js client specifically — including socket hang-up errors, Keep-Alive problems, stream handling issues, data type mismatches, read-only user restrictions, proxy/TLS setup problems, or long-running query timeouts. Trigger even when the user hasn't precisely named the issue; vague symptoms like "my inserts keep failing" or "connection drops randomly" in a Node.js context are strong signals to use this skill. Do NOT use for browser/Web client issues.
Drop-in pandas replacement with ClickHouse performance. Use `import chdb.datastore as pd` (or `from datastore import DataStore`) and write standard pandas code — same API, 10-100x faster on large datasets. Supports 16+ data sources (MySQL, PostgreSQL, S3, MongoDB, ClickHouse, Iceberg, Delta Lake, etc.) and 10+ file formats (Parquet, CSV, JSON, Arrow, ORC, etc.) with cross-source joins. Use this skill when the user wants to analyze data with pandas-style syntax, speed up slow pandas code, query remote databases or cloud storage as DataFrames, or join data across different sources — even if they don't explicitly mention chdb or DataStore. Do NOT use for raw SQL queries, ClickHouse server administration, or non-Python languages.
In-process ClickHouse SQL engine for Python — run ClickHouse SQL queries directly on local files, remote databases, and cloud storage without a server. Use when the user wants to write SQL queries against Parquet/CSV/ JSON files, use ClickHouse table functions (mysql(), s3(), postgresql(), iceberg(), deltaLake() etc.), build stateful analytical pipelines with Session, use parametrized queries, window functions, or other advanced ClickHouse SQL features. Also use when the user explicitly mentions chdb.query(), ClickHouse SQL syntax, or wants cross-source SQL joins. Do NOT use for pandas-style DataFrame operations — use chdb-datastore instead.
| name | clickhousectl-cloud-deploy |
| description | Use when a user wants to deploy ClickHouse to the cloud, go to production, use ClickHouse Cloud, host a managed ClickHouse service, or migrate from a local ClickHouse setup to ClickHouse Cloud. |
| license | Apache-2.0 |
| metadata | {"author":"ClickHouse Inc","version":"0.2.0"} |
This skill walks through deploying to ClickHouse Cloud using clickhousectl. It covers account setup, CLI authentication, service creation, schema migration, and connecting your application. Follow these steps in order.
Use this skill when the user wants to:
Before using any cloud commands, the user needs a ClickHouse Cloud account.
Ask the user: "Do you already have a ClickHouse Cloud account?"
If they do not have an account, explain:
ClickHouse Cloud is a fully managed service that runs ClickHouse for you — no infrastructure to maintain, automatic scaling, backups, and upgrades included. There's a free trial so you can get started without a credit card.
To create an account, go to: https://clickhouse.cloud
Sign up with your email, Google, or GitHub account. Once you're in the console, let me know and we'll continue with the next step.
Wait for the user to confirm they have signed up or already have an account before proceeding.
First, ensure clickhousectl is installed. Check with:
which clickhousectl
If not found, install it:
curl -fsSL https://clickhouse.com/cli | sh
Authenticate clickhousectl with a ClickHouse Cloud API key.
Guide the user through creating one in the ClickHouse Cloud console:
- Click the gear icon (Settings) in the left sidebar
- Go to API Keys
- Click Create API Key
- Give it a name (e.g., "clickhousectl")
- Select the Admin role for the key. Admin is needed because
cloud service queryauto-provisions a per-service query endpoint API key on first use, which requires permission to create keys. Developer-scoped keys can manage services but may not be able to complete the auto-provisioning step.- Click Generate API Key
- Copy both the Key ID and the Key Secret — the secret is only shown once
Ask the user to open a new terminal tab in the same working directory and run the login command there with their Key ID and Secret — this keeps the secret out of the chat session. Tell them to come back and let you know once it's done.
clickhousectl cloud login --api-key <key> --api-secret <secret>
Both --api-key and --api-secret are required — if the user only has one, tell them both are needed.
To verify authentication works:
clickhousectl cloud org list
This should return the user's organization.
Create a new ClickHouse Cloud service:
clickhousectl cloud service create --name <service-name>
From the output, add the HTTPS host and port to .env as CLICKHOUSE_HOST and CLICKHOUSE_PORT. Make sure .env is gitignored.
Then poll until the service state is running:
clickhousectl cloud service get <service-id>
If the user has local table definitions (e.g., from using the clickhousectl-local-dev skill), migrate them to the cloud service.
Use cloud service query to run SQL against the cloud service over HTTP. Just pass the service name (or --id).
Read the local schema files from clickhouse/tables/ and apply each one to the cloud service:
clickhousectl cloud service query --name <service-name> \
--queries-file clickhouse/tables/<table>.sql
Apply them in dependency order — tables referenced by materialized views should be created first.
Also apply materialized views if they exist:
clickhousectl cloud service query --name <service-name> \
--queries-file clickhouse/materialized_views/<view>.sql
To target a specific database, pass --database <name>.
Connect to the cloud service and confirm tables exist:
clickhousectl cloud service query --name <service-name> --query "SHOW TABLES"
Run a test query to confirm the schema is correct:
clickhousectl cloud service query --name <service-name> --query "DESCRIBE TABLE <table-name>"
The default user has full admin rights and should not be used by the application. Create a dedicated user scoped to the schema deployed in Step 4.
Generate a strong random password and append the credentials to .env before creating the user, so the password is persisted even if a subsequent step fails:
PASSWORD=$(openssl rand -base64 32)
echo "CLICKHOUSE_USER=app_user" >> .env
echo "CLICKHOUSE_PASSWORD=$PASSWORD" >> .env
Then create the user and grant the minimum permissions the app needs. Replace <database> with the database the schema lives in (often default):
clickhousectl cloud service query --name <service-name> --query \
"CREATE USER app_user IDENTIFIED BY '$PASSWORD'"
clickhousectl cloud service query --name <service-name> --query \
"GRANT SELECT, INSERT ON <database>.* TO app_user"
Adjust the grants to fit the app:
INSERTCREATE TABLE, DROP TABLE on the database (but prefer running migrations as the admin user instead)GRANT per database, or scope per table with ON <database>.<table>Verify the user exists and has the expected grants:
clickhousectl cloud service query --name <service-name> --query "SHOW GRANTS FOR app_user"
ClickHouse cannot reveal the password later, so if .env is lost, the user must reset the password via ALTER USER app_user IDENTIFIED BY '<new>'.
The application can now use the credentials in .env to connect to ClickHouse Cloud.