← 返回命令列表

Linux command

litecli 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Connect to database

litecli [database.db]

Create new database

litecli [new.db]

Execute query

litecli [database.db] -e "[SELECT * FROM table]"

Use specific output format

litecli [database.db] --table

Connect to in-memory database

litecli :memory:

Run SQL file

litecli [database.db] < [script.sql]

说明

litecli is a SQLite CLI with auto-completion. It provides syntax highlighting and intelligent suggestions. The tool offers a better interactive experience than sqlite3 with multiline editing and history.

参数

-e, --execute _QUERY_
Execute query and exit.
--table
Output as table format.
--csv
Output as CSV.
--auto-vertical-output
Automatically switch to vertical output for wide rows.
-l, --list-dsn
List configured DSNs.
--llm-api-key _KEY_
API key for AI-assisted SQL features.
--help
Display help information.

FAQ

What is the litecli command used for?

litecli is a SQLite CLI with auto-completion. It provides syntax highlighting and intelligent suggestions. The tool offers a better interactive experience than sqlite3 with multiline editing and history.

How do I run a basic litecli example?

Run `litecli [database.db]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -e, --execute _QUERY_ do in litecli?

Execute query and exit.