Skip to content

Reference

CLI

Terminal window
shql <database-file> [table] [flags]
shql databases

Invocation modes

InvocationBehaviour
shql my.dbOpen in interactive mode (schema browser)
shql my.db <table>Open directly to the named table
shql my.db --queryOpen directly in REPL/query mode
shql my.db -q "<SQL>"Run SQL, print output, and exit
cat query.sql | shql my.dbRead SQL from stdin, run it, and exit
shql databasesDiscovery mode — list known/recent databases

Flags

FlagDescription
-q "<SQL>", --query "<SQL>"Execute a SQL query and exit immediately
--query (no argument)Open in REPL/query mode

Environment variables

VariableDescription
SHQL_THEMESet the UI theme. Values: basic (default), uranium

Themes

ThemeHeader styleBorder styleValue colour
basicReverse-videoSingle-lineDefault
uraniumNeon greenRoundedCyan
Terminal window
SHQL_THEME=uranium shql my.db

Architecture

shellql is a shellframe application. Its source is organized as:

shql CLI entry point
└── src/
├── cli.sh Argument parsing and mode dispatch
├── connections.sh Connection registry and sigil aggregation
├── db.sh sqlite3 adapter
├── screens/
│ ├── welcome.sh
│ ├── schema.sh
│ ├── table.sh
│ ├── query.sh
│ └── record.sh
└── state.sh Application globals

Each file in src/screens/ defines a shellframe_app screen with enter, render, and input hooks. The CLI dispatches to the appropriate screen based on the arguments passed to shql.