🛍️ 更多精选好物 ›
📊 公开数据一览
| 📦 榜单安装量 | 45 |
| ⭐ GitHub Stars | 326(fork 71) |
| 🗓️ 最近推送 | 2026-08-04 |
| 🌱 项目创建 | 2022-07-25 |
| 💻 语言 / License | TypeScript · Apache-2.0 |
| 🐛 开放Issue | 65 |
📝 工具简介
ClickHouse数据库官方JS客户端。
📖 怎么用
先装包,Node.js 环境跑 `npm i @clickhouse/client`,浏览器环境用 `npm i @clickhouse/client-web`。然后初始化客户端,`import { createClient } from "@clickhouse/client"`,配置 `url` 和 `username`,默认连 `http://localhost:8123`。接着就能执行查询和插入操作了,支持流式读写。如果是通过 skills 方式安装,项目级用 `npx skills add ClickHouse/clickhouse-js`,全局加 `-g` 参数。
📋 迷你测评
ClickHouse数据库的官方JS客户端。亮点是官方出品,与数据库本身同步更新。客观数据点:无。
📄 README 要点
这是ClickHouse官方出品的JavaScript客户端,用TypeScript纯手写,零外部依赖,性能优化到极致,并且经过真实ClickHouse版本的严格测试。仓库里包含四个包:一个专为Node.js设计的客户端,基于HTTP和Stream API,支持查询和插入的流式处理;一个面向浏览器的Web客户端,基于Fetch和Web Streams API,支持流式查询,兼容Chrome/Firefox和Cloudflare Workers;还有共享类型和基础框架的公共包,以及一个读写RowBinary格式的库。安装很简单,Node.js和Web客户端都有对应的npm安装命令。适合需要在Node.js后端或浏览器前端直接操作ClickHouse数据库的开发者。
查看英文原文
ClickHouse JS client About Official JS client for ClickHouse, written purely in TypeScript, thoroughly tested with actual ClickHouse versions. The client has zero external dependencies and is optimized for maximum performance. The repository consists of four packages: @clickhouse/client a version of the client designed for Node.js platform only. It is built on top of HTTP and Stream APIs; supports streaming for both selects and inserts. @clickhouse/client web a version of the client built on top of Fetch and Web Streams APIs; supports streaming for selects. Compatible with Chrome/Firefox browsers and Cloudflare workers. @clickhouse/client common shared common types and the base framework for building a custom client implementation. @clickhouse/rowbinary a library for reading (and soon writing) ClickHouse RowBinary format. Installation Node.js client: [安装/使用命令见下方] Web client (browsers, Cloudflare workers): [安装/使用命令见下方] Environment requirements Node.js Node.js must be available in the environment to run the Node.js client. The client is compatible with all the maintained Node.js releases. Node.js version Supported? 26.x ✔ 24.x ✔ 22.x ✔ 20.x ✔ TypeScript If using TypeScript, version 4.5 or above is required to enable inline import and export syntax. Compatibility with ClickHouse Client version ClickHouse 1.12.0+ 24.8+ The client may work with older versions too; however, this is best effort support and is not guaranteed. Quick start [安装/使用命令见下方] See more examples in the examples directory. Documentation See the ClickHouse website for the full documentation. Changelog Each package keeps its own changelog: @clickhouse/client — packages/client node/CHANGELOG.md @clickhouse/client web — packages/client web/CHANGELOG.md @clickhouse/client common (deprecated) — packages/client common/CHANGELOG.md @clickhouse/datatype parser — packages/datatype parser/CHANGELOG.md @clickhouse/rowbinary — skills/clickhouse js node rowbinary/CHANGELOG.md History through @clickhouse/client 1.23.
💬 评论(0)
交流使用体验、避坑建议;违规内容将被删除