Awesome ClickHouseCLI

amacneil/dbmate

⭐ 7377 Go repository created 2015-11-25

Dbmate is a lightweight, framework-agnostic database migration tool designed to keep database schemas synchronized across multiple developers and production servers. It is a standalone command-line utility that supports various programming languages and frameworks, making it ideal for projects involving multiple services written in different languages. Dbmate supports several popular databases including MySQL, PostgreSQL, SQLite, and ClickHouse, allowing developers to write schema migrations in plain SQL. The tool uses timestamp-versioned migrations to prevent version conflicts among developers and runs migrations atomically within transactions to ensure database integrity. Key features include the ability to create and drop databases, saving schema files for easy version control, and flexible database connection configuration through environment variables or command-line options. Dbmate also supports reading environment variables from .env files, simplifying configuration management in development environments. It is distributed as a single self-contained binary, making it easy to install and use across different operating systems including macOS, Linux, and Windows, with additional support for Docker. Dbmate offers a comprehensive set of commands such as creating new migration files, running pending migrations, rolling back migrations, dumping and loading schema files, and waiting for database availability. It supports customization of migration directories, migration tables, and schema file paths. The tool is designed to integrate seamlessly into development workflows, supporting twelve-factor app principles by encouraging environment-based configuration. Overall, Dbmate is a practical and efficient solution for managing database schema migrations in diverse development environments, providing consistency, reliability, and ease of use without vendor lock-in or reliance on SaaS services. Its support for ClickHouse makes it particularly relevant for projects using this database technology.

https://github.com/amacneil/dbmate

.env-fileatomic-transactionsclickhousecommand-line-toolcppcross-language-supportdatabasedatabase-migrationdatabase-migrationsdatabase-schemadockerenvironment-variablesgogolangmigrationmigration-filesmigrationsmysqlnodejspostgrespostgresqlpythonrustschema-synchronizationschema.sqlsql-migrationssqlitestandalone-binarytimestamp-versioned-migrations

Also in CLI

sqitchers/sqitch

Sqitch is a versatile and framework-agnostic database change management tool supporting multiple database engines including ClickHouse, emphasizing native scripting, dependency resolution, and deployment integrity.

quarylabs/sqruff

sqruff is a fast and customizable SQL formatter and linter supporting multiple SQL dialects including Clickhouse, designed to ensure SQL code quality and consistency across development workflows.

runreveal/pql

pql is a Go library and CLI tool that compiles a pipelined query language inspired by Kusto Query Language into SQL, with specific compatibility for the Clickhouse SQL dialect but designed to be database agnostic.

azat/chdig

Chdig is a terminal user interface tool designed to provide interactive introspection, monitoring, and debugging capabilities for ClickHouse database systems.

hatarist/clickhouse-cli

An unofficial command-line client for the ClickHouse DBMS server offering enhanced features like autocompletion, syntax highlighting, multiquery support, and user-defined functions over HTTP.

Slach/clickhouse-flamegraph

clickhouse-flamegraph is a command-line utility for visualizing ClickHouse system.trace_log data as flamegraphs to analyze query performance and resource usage.