
Clickhousectl Local Dev
Spin up a verified local ClickHouse stack with clickhousectl so you can prototype analytics queries before wiring production.
Overview
clickhousectl-local-dev is an agent skill for the Build phase that guides solo builders from zero to a working local ClickHouse setup using clickhousectl.
Install
npx skills add https://github.com/clickhouse/agent-skills --skill clickhousectl-local-devWhat is this skill?
- Ordered flow from zero: install clickhousectl, install ClickHouse, init project, start server
- Schema creation and data seeding with verification steps
- Uses official clickhousectl CLI workflow (v0.2.0, ClickHouse Inc)
- References ClickHouse docs and clickhousectl GitHub for follow-up
- Covers prototyping and app integration that needs ClickHouse locally
- Step-by-step workflow version 0.2.0 from ClickHouse Inc (March 2026 abstract)
Adoption & trust: 867 installs on skills.sh; 458 GitHub stars; 2/3 security scanners passed (skills.sh audits).
What problem does it solve?
You want ClickHouse in your stack but do not have a repeatable local install, project init, and verification path on your machine.
Who is it for?
Solo builders prototyping analytics features, event pipelines, or OLAP queries with ClickHouse before choosing hosted infra.
Skip if: Teams that only need managed ClickHouse Cloud provisioning with no local dev, or projects using a different analytical database entirely.
When should I use this skill?
User wants to build with ClickHouse, set up local ClickHouse dev, install ClickHouse, create a local server, create tables, or start developing with ClickHouse.
What do I get? / Deliverables
You end with a running local ClickHouse server, schemas, seeded data, and checks that confirm the dev environment is ready for application wiring.
- Running local ClickHouse server
- Initialized clickhousectl project
- Schemas and seeded data with verification checks
Recommended Skills
Journey fit
Local database setup is canonical Build work—backend data layer before ship or operate. ClickHouse is an analytical backend; install, schema, and seed steps belong on the backend shelf.
How it compares
Use this procedural skill for local clickhousectl setup instead of improvising Docker snippets or unrelated database install skills.
Common Questions / FAQ
Who is clickhousectl-local-dev for?
Indie and solo developers building apps that need ClickHouse locally—analytics dashboards, high-volume logs, or BI prototypes—who want the official clickhousectl path rather than ad-hoc installs.
When should I use clickhousectl-local-dev?
Use it during Build when you need to install ClickHouse, start a local server, create tables, seed data, or prototype queries; also when the user explicitly names clickhousectl or a local ClickHouse dev environment.
Is clickhousectl-local-dev safe to install?
It documents shell-driven installs and local services; review the Security Audits panel on this Prism page and inspect SKILL.md permissions before letting an agent run commands on your machine.
SKILL.md
READMESKILL.md - Clickhousectl Local Dev
{ "version": "0.2.0", "organization": "ClickHouse Inc", "date": "March 2026", "abstract": "Step-by-step workflow for setting up a local ClickHouse development environment using clickhousectl. Covers installing the CLI, installing ClickHouse, initializing a project, starting a server, creating schemas, seeding data, and verifying the setup.", "references": [ "https://clickhouse.com/docs", "https://github.com/ClickHouse/clickhousectl" ] } --- name: clickhousectl-local-dev description: 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. license: Apache-2.0 metadata: author: ClickHouse Inc version: "0.2.0" --- # Local ClickHouse Development Setup This skill walks through setting up a complete local ClickHouse development environment using `clickhousectl`. Follow these steps in order. ## When to Apply Use this skill when the user wants to: - Build an application that needs an analytical database or ClickHouse specifically - Set up a local ClickHouse instance for development - Install ClickHouse on their machine - Create tables and start querying ClickHouse locally - Prototype or experiment with ClickHouse --- ## Step 1: Install clickhousectl Check if `clickhousectl` is already available: ```bash which clickhousectl ``` If not found, install it: ```bash curl -fsSL https://clickhouse.com/cli | sh ``` This installs `clickhousectl` to `~/.local/bin/clickhousectl` and creates a `chctl` alias. **If the command is still not found after install:** The user may need to add `~/.local/bin` to their PATH or open a new terminal session. Suggest: ```bash export PATH="$HOME/.local/bin:$PATH" ``` Once installed, `clickhousectl skills` can be used to install the latest ClickHouse Agent Skills. --- ## Step 2: Install ClickHouse and set the default Install the latest ClickHouse version and set it as the system default: ```bash clickhousectl local use latest ``` This installs ClickHouse, sets it as the default version used by `clickhousectl local` commands, and symlinks `~/.local/bin/clickhouse` to the binary, putting `clickhouse` on your PATH (meaning you can invoke `clickhouse` directly, e.g. `clickhouse client` if needed). You can use other version specifiers like `stable`, `26.4`, `26.4.2.10` when needed. --- ## Step 3: Initialize the project From the user's project root directory: ```bash clickhousectl local init ``` This creates a standard folder structure: ``` clickhouse/ tables/ # CREATE TABLE statements materialized_views/ # Materialized view definitions queries/ # Saved queries seed/ # Seed data / INSERT statements ``` **Note:** This step is optional. If the user already has their own folder structure for SQL files, skip this and adapt the later steps to use their paths. --- ## Step 4: Start a local server ```bash clickhousectl local server start --name <name> ``` This starts a ClickHouse server in the background. **To check running servers and see their exposed ports:** ```bash clickhousectl local server list ``` --- ## Step 5: Create the schema Based on the user's application requirements, write CREATE TABLE SQL files. **Write each table definition to its own file** in `clickhouse/tables/`: ```bash # Example: clickhouse/tables/events.sql ``` ```sql CREATE TABLE IF NOT EXISTS events ( timestamp DateTime, user_id UInt32, event_type LowCardinality(String), properties String ) ENGINE = MergeTree() ORDER BY (event_type, timestamp) ``` When designing schemas, if the `clickhouse-best-practices` skill is available, consult it for guidance on ORDER BY column selection, data types, and partitioning. **Apply the schema to the running server:** ```bash clickhousectl local client --name <n