Linux command
harlequin 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Connect to DuckDB database
harlequin [database.db]
Connect to SQLite database
harlequin -a sqlite [database.sqlite]
Connect to PostgreSQL
harlequin -a postgres -h [localhost] -p [5432] -U [user] -d [database]
Connect to MySQL
harlequin -a mysql -h [localhost] -p [3306] -U [user] --database [database]
Open in-memory DuckDB
harlequin
Query Parquet files
harlequin [data.parquet]
Connect with connection string
harlequin "postgresql://[user]:[pass]@[host]/[db]"
Set read-only mode
harlequin --read-only [database.db]
说明
harlequin is a terminal-based SQL IDE supporting multiple database backends. It provides a rich interface for writing queries, exploring schemas, and viewing results. The interface shows a schema browser, query editor with syntax highlighting, and results pane. Multiple query tabs enable working on several queries simultaneously. DuckDB is the default adapter, enabling direct querying of Parquet, CSV, and JSON files. Other adapters connect to traditional databases like PostgreSQL, MySQL, and SQLite. Query results display in a scrollable table with export options. History and autocomplete assist query writing. The schema browser shows tables, columns, and types. Configuration via config file or environment variables sets defaults for themes, limits, and connection preferences.
参数
- -a, --adapter _name_
- Database adapter: duckdb (default), sqlite, postgres, mysql, bigquery.
- -h, --host _host_
- Database host.
- -p, --port _port_
- Database port.
- -U, --user _user_
- Database username.
- -d, --database _name_
- Database name.
- --password _password_
- Database password.
- --read-only
- Open connection in read-only mode.
- -t, --theme _theme_
- Color theme name (any Textual theme).
- --limit _rows_
- Default result row limit.
- -f, --profile _name_
- Load a named profile from config file.
- --no-download-tzdata
- Skip downloading timezone data for DuckDB.
- --help
- Display help information.
- --version
- Display version information.
FAQ
What is the harlequin command used for?
harlequin is a terminal-based SQL IDE supporting multiple database backends. It provides a rich interface for writing queries, exploring schemas, and viewing results. The interface shows a schema browser, query editor with syntax highlighting, and results pane. Multiple query tabs enable working on several queries simultaneously. DuckDB is the default adapter, enabling direct querying of Parquet, CSV, and JSON files. Other adapters connect to traditional databases like PostgreSQL, MySQL, and SQLite. Query results display in a scrollable table with export options. History and autocomplete assist query writing. The schema browser shows tables, columns, and types. Configuration via config file or environment variables sets defaults for themes, limits, and connection preferences.
How do I run a basic harlequin example?
Run `harlequin [database.db]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -a, --adapter _name_ do in harlequin?
Database adapter: duckdb (default), sqlite, postgres, mysql, bigquery.