{"slug": "what-s-new-in-clickhousectl-v0-4-0", "title": "What's new in clickhousectl v0.4.0", "summary": "ClickHouse released clickhousectl v0.4.0, adding horizontal autoscaling for Cloud services, ClickPipe schema discovery, finer control over ClickPipe ingestion, partial updates for Postgres configs, and opt-out anonymous usage telemetry. The update introduces new CLI flags such as --min-replicas, --max-replicas, --autoscaling-mode horizontal, --skip-initial-load, --start-after, and --server-id, and moves OAuth tokens to a global location at ~/.clickhouse/tokens.json.", "body_md": "[ clickhousectl](https://github.com/ClickHouse/clickhousectl) is the CLI for ClickHouse, local and cloud, built to help both humans and AI agents develop with ClickHouse.\n\n[v0.3.0](https://clickhouse.com/blog/clickhousectl-v0-3-0) brought agent-aware defaults, OAuth querying for Cloud, and custom local server configs. v0.4.0 adds horizontal autoscaling for Cloud services, ClickPipe schema discovery, finer control over ClickPipe ingestion, and opt-out anonymous usage telemetry.\n\nIf you already have it installed, update in place:\n\n```\n1clickhousectl update\n```\n\nIf not, install it using your favorite method below:\n\n```\n1curl https://clickhouse.com/cli | sh\n2pip install clickhousectl\n3uv tool install clickhousectl\n4npm i -g clickhousectl\n5cargo install clickhousectl\n```\n\n## Horizontal autoscaling for Cloud services\n\nClickHouse Cloud services have two autoscaling modes: vertical (a fixed replica count with variable memory per replica) and horizontal (fixed memory per replica with a variable replica count). v0.4.0 exposes horizontal autoscaling on `service create`\n\nand `service scale`\n\n:\n\n```\n1clickhousectl cloud service create --name my-service \\\n2  --min-replicas 2 --max-replicas 8 --autoscaling-mode horizontal\n3\n4clickhousectl cloud service scale <service-id> \\\n5  --min-replicas 2 --max-replicas 8 --autoscaling-mode horizontal\n```\n\nThe horizontal flags are mutually exclusive with the vertical ones (`--num-replicas`\n\n, `--min-replica-memory-gb`\n\n/`--max-replica-memory-gb`\n\nas a variable range), and the CLI rejects `--min-replicas`\n\nwithout `--max-replicas`\n\nbefore making any network call. Horizontal autoscaling requires the org-level feature to be enabled.\n\n## ClickPipe schema discovery (beta)\n\n`clickpipe schema-discover`\n\nprobes a Kafka or Kinesis source and returns the inferred fields and types without creating a pipe. Use it to preview the `--column`\n\ndefinitions before you create the pipe for real. It takes the same source connection flags as the corresponding `create`\n\nsubcommand, minus the destination options:\n\n```\n1clickhousectl cloud clickpipe schema-discover <service-id> kafka \\\n2  --brokers 'broker:9092' --topics events \\\n3  --format JSONEachRow \\\n4  --auth SCRAM-SHA-256 --username user --password pass\n```\n\nNote that `schema-discover`\n\nrequires an API key and does not support a read-only OAuth login.\n\n## Finer control over ClickPipe ingestion\n\nObject storage pipes with continuous ingestion get two new controls: `--skip-initial-load`\n\nskips the initial snapshot and only ingests new objects, and `--start-after`\n\nresumes ingestion after a specific object key:\n\n```\n1clickhousectl cloud clickpipe create object-storage <service-id> \\\n2  --name my-s3-continuous-pipe \\\n3  --source-url 'https://bucket.s3.us-east-1.amazonaws.com/data/**' \\\n4  --format JSONEachRow \\\n5  --continuous \\\n6  --queue-url 'https://sqs.us-east-1.amazonaws.com/123/my-queue' \\\n7  --start-after obj-key-001 \\\n8  --database default --table events \\\n9  --column \"event_id:Int64\" --column \"name:String\"\n```\n\n`--skip-initial-load`\n\nonly applies when `--queue-url`\n\nis set, and it's mutually exclusive with `--start-after`\n\n.\n\nMySQL CDC pipes can now set the replication server ID with `--server-id`\n\n, useful when multiple pipes read from the same MySQL instance or to avoid colliding with existing replicas:\n\n```\n1clickhousectl cloud clickpipe create mysql <service-id> \\\n2  --name my-mysql-pipe \\\n3  --host mysql.example.com \\\n4  --username root --password pass \\\n5  --table-mapping \"mydb.users:mydb_users\" \\\n6  --server-id 4242\n```\n\n## Partial updates for Postgres configs\n\n`cloud postgres config patch`\n\nnow applies true partial updates. Pass only the settings you want to change and everything else in the config keeps its current value:\n\n```\n1clickhousectl cloud postgres config patch <pg-id> --set max_connections=500\n```\n\n## Global OAuth tokens\n\nOAuth tokens from `cloud auth login`\n\nnow live globally at `~/.clickhouse/tokens.json`\n\n, alongside your versions and configs. Existing project-local token files are migrated automatically on first use. OAuth remains **read-only**.\n\nAPI key credentials (`credentials.json`\n\n) stay project-local. Use API keys for destructive permissions on a per-org / per-project level.\n\n## Safer local server lifecycle\n\n`local server stop <name>`\n\nis now idempotent, matching `docker stop`\n\nand `systemctl stop`\n\n. Stopping a server that exists but isn't running succeeds with exit code 0 instead of erroring. Unknown names still fail, so typos surface. `--json`\n\noutput gains an `already_stopped`\n\nfield so scripts can tell a real stop from a no-op.\n\n`local remove <version>`\n\nnow refuses to delete a version that a running server is using. Previously it deleted the binary out from under the server and reported success. It fails with the server names listed, and `--force`\n\nstops them first:\n\n```\n1clickhousectl local remove 26.5\n2# Error: Version 26.5 is in use by running server(s): default.\n3# Stop them first, or pass --force.\n4\n5clickhousectl local remove 26.5 --force\n6# Stopped server 'default'\n7# Removed 26.5\n```\n\n`--config`\n\nis now the primary flag for `local server start`\n\n(`--config-file`\n\nstill works as a hidden alias), and `stop-all`\n\nflushes its progress output immediately, so it no longer looks frozen during the graceful-kill wait.\n\n## Anonymous usage telemetry\n\nv0.4.0 adds anonymous usage telemetry to help us understand which commands matter. Each event contains: the command path, the *names* of flags passed (never values, never positional arguments), the exit code, the CLI version, OS and architecture, whether it ran in CI, and whether it ran under a detected coding agent. There is **no install ID and no fingerprinting**.\n\nThe first run of `clickhousectl`\n\nprints a one-time telemetry notice and sends no telemetry, giving you the opportunity to opt-out before anything is sent. Opting out works any of these ways:\n\n```\n1# Persistently, per machine\n2clickhousectl telemetry disable\n3\n4# Check the current state\n5clickhousectl telemetry status\n6\n7# Per environment/shell (https://consoledonottrack.com)\n8export DO_NOT_TRACK=1\n```\n\nTo see exactly what would be sent without sending it, set `CHCTL_TELEMETRY_DEBUG=1`\n\n. You can compile telemetry out entirely with `cargo build --no-default-features`\n\n. Full details are in the [telemetry docs](https://clickhouse.com/docs/interfaces/cli#telemetry).\n\n## Running server in one command\n\nOn a fresh install you can now start a server without setting a default or specifying a version and it will automatically install the latest master build of ClickHouse.\n\n```\n1clickhousectl local server start\n```\n\n`clickhousectl`\n\nalso now records the etag of an installed master build. If the build hasn't moved, the installed binary is reused on successive installs:\n\n```\n1clickhousectl local install latest\n2# first run: downloads master\n3clickhousectl local install latest\n4# latest is up to date (master build unchanged); using 26.7.1.1\n```\n\n## Better update visibility\n\n`clickhousectl`\n\nlooks for an available update when you run a command, caches the result, and does not look again for 24 hours. The \"update available\" message is now more present on successive commands to encourage more frequent updating. Running `clickhousectl update`\n\nupdates the binary, and clears the cache.", "url": "https://wpnews.pro/news/what-s-new-in-clickhousectl-v0-4-0", "canonical_source": "https://clickhouse.com/blog/clickhousectl-v0-4-0", "published_at": "2026-07-31 00:00:00+00:00", "updated_at": "2026-07-31 12:05:11.528940+00:00", "lang": "en", "topics": ["developer-tools", "ai-infrastructure"], "entities": ["ClickHouse", "clickhousectl", "ClickHouse Cloud", "ClickPipe", "Kafka", "Kinesis", "MySQL", "Postgres"], "alternates": {"html": "https://wpnews.pro/news/what-s-new-in-clickhousectl-v0-4-0", "markdown": "https://wpnews.pro/news/what-s-new-in-clickhousectl-v0-4-0.md", "text": "https://wpnews.pro/news/what-s-new-in-clickhousectl-v0-4-0.txt", "jsonld": "https://wpnews.pro/news/what-s-new-in-clickhousectl-v0-4-0.jsonld"}}