{"_id":"@c0pilot/openclaw-clickhouse","_rev":"4-fd1ab9a8b3dea6583c4e618ed7da886f","name":"@c0pilot/openclaw-clickhouse","dist-tags":{"latest":"1.0.3"},"versions":{"1.0.0":{"name":"@c0pilot/openclaw-clickhouse","version":"1.0.0","keywords":["openclaw","clickhouse","database","plugin","ai","agent"],"author":{"name":"unsanction"},"license":"MIT","_id":"@c0pilot/openclaw-clickhouse@1.0.0","maintainers":[{"name":"c0pilot","email":"5349983@gmail.com"}],"homepage":"https://github.com/unsanction/openclaw-clickhouse#readme","bugs":{"url":"https://github.com/unsanction/openclaw-clickhouse/issues"},"dist":{"shasum":"96e5884b733f3c0e111d6beab821134e0d84efb9","tarball":"https://registry.npmjs.org/@c0pilot/openclaw-clickhouse/-/openclaw-clickhouse-1.0.0.tgz","fileCount":39,"integrity":"sha512-uYnufNPnvQqKwlVGkAXveOcdFC/f/SqTETKHCDgPHuh9MsHuhNga1eV1WqLpClUG1gWfofkO32nSprz61u4evA==","signatures":[{"sig":"MEUCIAjh5Y8eHZ0J4N7IAZ8U22/AkV+haZWHbkpaIshzZY0RAiEAo+oDtv8yPSDYOppUI5juT1MBOZLhI3XSPEErFDU6pbM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":58461},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"b991dab489a108ceabd2ea07a2466f09d4f4dab5","scripts":{"build":"tsc","prepublishOnly":"npm run build"},"_npmUser":{"name":"c0pilot","email":"5349983@gmail.com"},"openclaw":{"extensions":["dist/index.js"]},"repository":{"url":"git+https://github.com/unsanction/openclaw-clickhouse.git","type":"git"},"_npmVersion":"11.7.0","description":"OpenClaw plugin for ClickHouse database integration","directories":{},"_nodeVersion":"24.5.0","dependencies":{"@clickhouse/client":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.3.0"},"_npmOperationalInternal":{"tmp":"tmp/openclaw-clickhouse_1.0.0_1770040474439_0.2869159484814867","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@c0pilot/openclaw-clickhouse","version":"1.0.1","keywords":["openclaw","clickhouse","database","plugin","ai","agent"],"author":{"name":"unsanction"},"license":"MIT","_id":"@c0pilot/openclaw-clickhouse@1.0.1","maintainers":[{"name":"c0pilot","email":"5349983@gmail.com"}],"homepage":"https://github.com/unsanction/openclaw-clickhouse#readme","bugs":{"url":"https://github.com/unsanction/openclaw-clickhouse/issues"},"dist":{"shasum":"0cb388a6380ff9e2fe9d7e9039f430a269ed1f69","tarball":"https://registry.npmjs.org/@c0pilot/openclaw-clickhouse/-/openclaw-clickhouse-1.0.1.tgz","fileCount":39,"integrity":"sha512-WoRgHEHRcz1i1pA0m2zSselNdge3zmvhLcDFV0bQY4Tjep4GPBLXHLfl4oRrEToDG72zmPBfkXe4UqUin7k0+g==","signatures":[{"sig":"MEUCIQCUyEl+ZOl9vE0npva6zo50S6N4+ItfebL77n82DCcJLgIgKPO3XmEqC7I3/Ki8uKzEItM1nvH/VGkhCEmsUFNnJ+c=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":58486},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"845b5861c7f64567d1a65b650bb9dbe16c9281d6","scripts":{"build":"tsc","prepublishOnly":"npm run build"},"_npmUser":{"name":"c0pilot","email":"5349983@gmail.com"},"openclaw":{"extensions":["dist/index.js"]},"repository":{"url":"git+https://github.com/unsanction/openclaw-clickhouse.git","type":"git"},"_npmVersion":"11.7.0","description":"OpenClaw plugin for ClickHouse database integration","directories":{},"_nodeVersion":"24.5.0","dependencies":{"@clickhouse/client":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.3.0"},"_npmOperationalInternal":{"tmp":"tmp/openclaw-clickhouse_1.0.1_1770042439965_0.09785252028593105","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@c0pilot/openclaw-clickhouse","version":"1.0.2","keywords":["openclaw","clickhouse","database","plugin","ai","agent"],"author":{"name":"unsanction"},"license":"MIT","_id":"@c0pilot/openclaw-clickhouse@1.0.2","maintainers":[{"name":"c0pilot","email":"5349983@gmail.com"}],"homepage":"https://github.com/unsanction/openclaw-clickhouse#readme","bugs":{"url":"https://github.com/unsanction/openclaw-clickhouse/issues"},"dist":{"shasum":"690eef622da8a3d1927e4c96fa8ff2af1e0f9531","tarball":"https://registry.npmjs.org/@c0pilot/openclaw-clickhouse/-/openclaw-clickhouse-1.0.2.tgz","fileCount":39,"integrity":"sha512-eNrjNrF+EGOGInOjnxOSxG7eu1NcguW7oERJP5Ny8Rsq5QDazUv9tJDsWzyHXo2LxrohD4u8Xl4wApdhfnAl8g==","signatures":[{"sig":"MEQCIHNMjQOkOkTBwhxKiItLVVIjhBDLH3U3nFbpgMNzq2ARAiBJq5WYyBSiN7ScMLqUg4CwoiZn7bWo4i290fMCvfu5Uw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":59135},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"f977047b32c3f97fd41e27eb2c119cf8de4e0d34","scripts":{"build":"tsc","prepublishOnly":"npm run build"},"_npmUser":{"name":"c0pilot","email":"5349983@gmail.com"},"openclaw":{"extensions":["dist/index.js"]},"repository":{"url":"git+https://github.com/unsanction/openclaw-clickhouse.git","type":"git"},"_npmVersion":"11.7.0","description":"OpenClaw plugin for ClickHouse database integration","directories":{},"_nodeVersion":"24.5.0","dependencies":{"@clickhouse/client":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.3.0"},"_npmOperationalInternal":{"tmp":"tmp/openclaw-clickhouse_1.0.2_1770043284416_0.5227071426136867","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@c0pilot/openclaw-clickhouse","version":"1.0.3","description":"OpenClaw plugin for ClickHouse database integration","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"tsc","prepublishOnly":"npm run build"},"keywords":["openclaw","clickhouse","database","plugin","ai","agent"],"author":{"name":"unsanction"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/unsanction/openclaw-clickhouse.git"},"bugs":{"url":"https://github.com/unsanction/openclaw-clickhouse/issues"},"homepage":"https://github.com/unsanction/openclaw-clickhouse#readme","dependencies":{"@clickhouse/client":"^1.0.0"},"devDependencies":{"typescript":"^5.3.0"},"engines":{"node":">=18.0.0"},"openclaw":{"extensions":["dist/index.js"]},"gitHead":"9e4751079478da1e862b9a7f76f008247faccf7f","_id":"@c0pilot/openclaw-clickhouse@1.0.3","_nodeVersion":"24.5.0","_npmVersion":"11.7.0","dist":{"integrity":"sha512-cii5M4DedOyEza/ryat6b1wVJ67jsRuCyjhH0RKgmj/axNiv+8Suezp+bEidlxH/uXSFQbGz8HuksN1xKDCZDA==","shasum":"e0e330ccfc3fd92b43831d8a2ce637cf44e6f169","tarball":"https://registry.npmjs.org/@c0pilot/openclaw-clickhouse/-/openclaw-clickhouse-1.0.3.tgz","fileCount":39,"unpackedSize":62319,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDJNAQ7ffghxeAAjUO0Cf90nYsgrqxVGLGEhJTHYqVORwIgBvupolTDbbhK/P7FlI59Lb7r3T+xppQJ7Xgl9lmEXMA="}]},"_npmUser":{"name":"c0pilot","email":"5349983@gmail.com"},"directories":{},"maintainers":[{"name":"c0pilot","email":"5349983@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/openclaw-clickhouse_1.0.3_1770052435551_0.44872452582275146"},"_hasShrinkwrap":false}},"time":{"created":"2026-02-02T13:54:34.314Z","modified":"2026-02-02T17:13:55.826Z","1.0.0":"2026-02-02T13:54:34.584Z","1.0.1":"2026-02-02T14:27:20.124Z","1.0.2":"2026-02-02T14:41:24.555Z","1.0.3":"2026-02-02T17:13:55.719Z"},"bugs":{"url":"https://github.com/unsanction/openclaw-clickhouse/issues"},"author":{"name":"unsanction"},"license":"MIT","homepage":"https://github.com/unsanction/openclaw-clickhouse#readme","keywords":["openclaw","clickhouse","database","plugin","ai","agent"],"repository":{"type":"git","url":"git+https://github.com/unsanction/openclaw-clickhouse.git"},"description":"OpenClaw plugin for ClickHouse database integration","maintainers":[{"name":"c0pilot","email":"5349983@gmail.com"}],"readme":"# OpenClaw ClickHouse Plugin\n\nConnect your AI agent to ClickHouse databases. List databases, explore tables, run queries, and insert data.\n\n## Installation\n\n### Option 1: From npm (Recommended)\n\n```bash\nopenclaw plugins install @unsanction/openclaw-clickhouse\n```\n\n### Option 2: From GitHub\n\n```bash\nopenclaw plugins install github:unsanction/openclaw-clickhouse\n```\n\n### Option 3: Local Development\n\n```bash\ngit clone https://github.com/unsanction/openclaw-clickhouse.git\ncd openclaw-clickhouse\nnpm install\nnpm run build\nopenclaw plugins install -l ./openclaw-clickhouse\n```\n\n## Configuration\n\nAdd to your `~/.openclaw/openclaw.json`:\n\n```json\n{\n  \"plugins\": {\n    \"entries\": {\n      \"clickhouse\": {\n        \"enabled\": true,\n        \"config\": {\n          \"host\": \"localhost\",\n          \"port\": 8123,\n          \"username\": \"default\",\n          \"password\": \"\",\n          \"database\": \"default\",\n          \"secure\": false,\n          \"readonly\": true\n        }\n      }\n    }\n  }\n}\n```\n\n### Configuration Options\n\n| Parameter | Type | Default | Description |\n|-----------|------|---------|-------------|\n| `host` | string | **required** | ClickHouse server host |\n| `port` | number | `8123` | Server port (8123 HTTP, 8443 HTTPS) |\n| `username` | string | `\"default\"` | Database username |\n| `password` | string | `\"\"` | Database password |\n| `database` | string | `\"default\"` | Default database |\n| `secure` | boolean | `false` | Use HTTPS connection |\n| `readonly` | boolean | `true` | Enable read-only mode |\n| `allowedOperations` | string[] | all | Restrict to specific operations |\n| `queryTimeout` | number | `30000` | Query timeout in milliseconds |\n\n### Allowed Operations\n\nYou can restrict which operations are available:\n\n- `\"select\"` - Execute SELECT queries\n- `\"insert\"` - Insert data (requires `readonly: false`)\n- `\"listDatabases\"` - List all databases\n- `\"listTables\"` - List tables in a database\n- `\"describeTable\"` - Get table schema\n\nExample restricting to read-only exploration:\n\n```json\n{\n  \"config\": {\n    \"host\": \"localhost\",\n    \"readonly\": true,\n    \"allowedOperations\": [\"listDatabases\", \"listTables\", \"describeTable\"]\n  }\n}\n```\n\n## Available Tools\n\n### `clickhouse_list_databases`\n\nList all available databases on the server.\n\n**Input:** None required\n\n**Output:**\n```json\n{\n  \"databases\": [\"default\", \"system\", \"mydb\"],\n  \"count\": 3\n}\n```\n\n### `clickhouse_list_tables`\n\nList tables in a database with metadata.\n\n**Input:**\n- `database` (optional): Database name, defaults to configured database\n- `like` (optional): LIKE pattern to filter tables (e.g., `%logs%`)\n\n**Output:**\n```json\n{\n  \"database\": \"default\",\n  \"tables\": [\n    {\n      \"name\": \"events\",\n      \"engine\": \"MergeTree\",\n      \"total_rows\": \"1000000\",\n      \"total_bytes\": \"52428800\"\n    }\n  ],\n  \"count\": 1\n}\n```\n\n### `clickhouse_describe_table`\n\nGet the schema of a table.\n\n**Input:**\n- `table` (required): Table name\n- `database` (optional): Database name\n\n**Output:**\n```json\n{\n  \"database\": \"default\",\n  \"table\": \"events\",\n  \"columns\": [\n    {\n      \"name\": \"id\",\n      \"type\": \"UInt64\",\n      \"is_primary_key\": true,\n      \"is_sorting_key\": true\n    },\n    {\n      \"name\": \"event_time\",\n      \"type\": \"DateTime\",\n      \"is_partition_key\": true\n    }\n  ],\n  \"column_count\": 2\n}\n```\n\n### `clickhouse_run_query`\n\nExecute a SQL query. Only SELECT queries are allowed in readonly mode.\n\n**Input:**\n- `query` (required): SQL query to execute\n- `database` (optional): Database context\n\n**Output:**\n```json\n{\n  \"data\": [\n    {\"version()\": \"24.1.1.1\"}\n  ],\n  \"rows\": 1,\n  \"statistics\": {\n    \"elapsed\": 0.001,\n    \"rows_read\": 1,\n    \"bytes_read\": 8\n  }\n}\n```\n\n### `clickhouse_insert`\n\nInsert data into a table. Only available when `readonly: false`.\n\n**Input:**\n- `table` (required): Target table name\n- `data` (required): Array of objects to insert\n- `database` (optional): Database name\n\n**Output:**\n```json\n{\n  \"success\": true,\n  \"table\": \"events\",\n  \"database\": \"default\",\n  \"rows_inserted\": 10\n}\n```\n\n## Examples\n\n### Basic Read-Only Setup\n\n```json\n{\n  \"plugins\": {\n    \"entries\": {\n      \"clickhouse\": {\n        \"enabled\": true,\n        \"config\": {\n          \"host\": \"localhost\",\n          \"readonly\": true\n        }\n      }\n    }\n  }\n}\n```\n\nPrompt your agent:\n- \"List all databases in ClickHouse\"\n- \"What tables are in the system database?\"\n- \"Describe the query_log table\"\n- \"Show me the last 10 queries from system.query_log\"\n\n### Production with HTTPS\n\n```json\n{\n  \"config\": {\n    \"host\": \"clickhouse.example.com\",\n    \"port\": 8443,\n    \"username\": \"analyst\",\n    \"password\": \"secret\",\n    \"database\": \"analytics\",\n    \"secure\": true,\n    \"readonly\": true,\n    \"queryTimeout\": 60000\n  }\n}\n```\n\n### Write-Enabled for ETL\n\n```json\n{\n  \"config\": {\n    \"host\": \"localhost\",\n    \"readonly\": false,\n    \"allowedOperations\": [\"select\", \"insert\", \"listTables\", \"describeTable\"]\n  }\n}\n```\n\n## Local Development\n\n```bash\n# Clone the repository\ngit clone https://github.com/unsanction/openclaw-clickhouse.git\ncd openclaw-clickhouse\n\n# Install dependencies\nnpm install\n\n# Build\nnpm run build\n\n# Start ClickHouse for testing\ndocker run -d -p 8123:8123 -p 9000:9000 clickhouse/clickhouse-server\n\n# Install locally\nopenclaw plugins install -l .\n\n# Verify\nopenclaw plugins list\n```\n\n## Security Considerations\n\n1. **Use readonly mode** in production to prevent accidental data modification\n2. **Restrict allowedOperations** to only what the agent needs\n3. **Use a dedicated read-only user** in ClickHouse for additional safety\n4. **Set appropriate queryTimeout** to prevent long-running queries\n5. **Use HTTPS** (`secure: true`) when connecting over networks\n\n## License\n\nMIT\n","readmeFilename":"README.md"}