A ClickHouse migrations CLI with templated SQL and environment-aware configuration. Current stable version is 0.3.1, released as an npm package with a VS Code extension companion. Key differentiators from alternatives like Atlas or clickhouse-migrations include support for Handlebars templates in migration files, multi-statement migration files (no need to split SQL), declarative environment blocks in HCL config, built-in replication-aware tracking table configuration, and TLS/mTLS support for secure connections. It also supports environment variable interpolation, custom variables, and checksum validation.
npm install clismaNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows full setup: install, config file with environment, migration creation, and run/status commands.
Rename your config to clisma.hcl or use --config <path>.
Rename migration files to match the pattern, e.g., 20240101123045_create_table.sql.
Replace 'cluster' with 'cluster_name' in the migrations.table block.
Replace ${VAR} with env("VAR") in config HCL files.Avoid using semicolons inside literal strings in SQL; consider single-statement files if issues arise.
Ensure clisma.hcl exists or use --config <path>.
Check config file for env block name; use --env with correct name.
Rename file to include timestamp, e.g., 20240101123045_foo.sql.
Verify config structure: at minimum an env block with url and migrations.dir.
Check that ClickHouse is running on port 8123 and URL is correct in config.