| name | clickhouse-install-auth |
| description | Install @clickhouse/client and configure authentication to ClickHouse Cloud or self-hosted.
Use when setting up a new ClickHouse project, configuring connection strings,
or initializing the official Node.js client.
Trigger: "install clickhouse", "setup clickhouse client", "clickhouse auth",
"connect to clickhouse", "clickhouse credentials".
|
| allowed-tools | Read, Write, Edit, Bash(npm:*), Bash(pnpm:*), Bash(pip:*), Grep |
| version | 1.0.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","database","analytics","clickhouse","olap"] |
| compatible-with | claude-code |
ClickHouse Install & Auth
Overview
Set up the official ClickHouse client for Node.js or Python and configure authentication
to ClickHouse Cloud or a self-hosted instance.
Prerequisites
- Node.js 18+ or Python 3.8+
- A running ClickHouse instance (Cloud or self-hosted)
- Connection credentials (host, port, user, password)
Instructions
Step 1: Install the Official Client
npm install @clickhouse/client
pip install clickhouse-connect
Step 2: Configure Environment Variables
CLICKHOUSE_HOST=https://abc123.us-east-1.aws.clickhouse.cloud:8443
CLICKHOUSE_USER=default
CLICKHOUSE_PASSWORD=your-password-here
Step 3: Create the Client (Node.js)
import { createClient } from '@clickhouse/client';
const client = createClient({
url: process.env.CLICKHOUSE_HOST,
username: process.env.CLICKHOUSE_USER,
password: process.env.CLICKHOUSE_PASSWORD,
});
const localClient = createClient({
url: 'http://localhost:8123',
username: 'default',
: ,
});