LinuxCommandLibrary

litecli

Connect and query SQLite databases

SYNOPSIS

litecli [OPTIONS] [DATABASE]

PARAMETERS

DATABASE
    Path: Path to the SQLite database file. If not specified, litecli will start without connecting to any database, prompting for a connection later.

-h, --help
    Show this help message and exit.

-v, --version
    Show program's version number and exit.

-l LOGFILE, --log LOGFILE
    Log all queries and results to the specified file.

-d DATABASE, --database DATABASE
    Connect to the specified database at startup.

-u USER, --user USER
    Username to connect to the database (ignored for SQLite). Defaults to your system username.

-w, --password
    Prompt for a password.

-D, --dsn
    DSN string to connect to the database.

-H HOST, --host HOST
    Host address to connect to the database (ignored for SQLite).

-p PORT, --port PORT
    Port number to connect to the database (ignored for SQLite).

--list-connections
    List all available connections.

--config CONFIG_FILE
    Path to the config file.

--list-config-files
    List all possible config files locations.

-i SQLITE_INIT_FILE, --init SQLITE_INIT_FILE
    Run SQL from this file at startup.

DESCRIPTION

litecli is a command-line interface (CLI) tool for SQLite databases with autocompletion and syntax highlighting. It enhances the standard SQLite command-line experience by providing features such as auto-completion of SQL keywords, table names, column names, and database functions, as well as syntax highlighting for improved readability. It aims to make working with SQLite databases more efficient and user-friendly. litecli also supports features like pager integration, favorites, and multiline queries. It persists history between sessions.
It is a modern CLI for SQLite databases written in Python. It supports auto-completion and syntax highlighting.

CONFIGURATION

litecli can be configured through a configuration file. This file allows users to customize various aspects of litecli's behavior, such as connection settings, display preferences, and keybindings.
The configuration file is typically located in ~/.config/litecli/config.

KEY BINDINGS

litecli supports customizable key bindings for common tasks, providing a more efficient workflow. You can configure these bindings in the configuration file.

HISTORY

litecli was developed to provide a modern, feature-rich CLI experience for SQLite database management. It builds upon the functionality of the standard sqlite3 command-line tool by adding features such as auto-completion, syntax highlighting, and persistent history. The goal was to make interacting with SQLite databases more efficient and user-friendly, especially for developers and database administrators who frequently work with SQLite.

SEE ALSO

sqlite3(1)

Copied to clipboard