Install the complete package with local command reference and every published mode.
install postgresqlpostgresqlUse
postgresql [options] · postgresql : <sql>postgresqlshow the current
postgresql -c <host> <user> [database] [-p <port>] [-n] [-m [name]]connect; password is requested separately unless -n is used
-use <database>select another database by reconnecting
-llist databases
-tlist public tables and views
-s <table>show columns and data types
-n <table> [rows]preview table rows
-f <table> <text> [rows]find text across table columns
-o <table> [-j|-csv] [file] [-f]export table rows
-a <table> : <json>insert one row from a JSON object
-w <table> <field> <value> : <json>update matching rows from a JSON object
-d <table> <field> <value>delete matching rows
-m [name]save the current connection in .lil.key; default name is the database
-M <name>remove a saved connection
-k [name]list saved connections or inspect one without showing its password
-K <name>connect using a saved connection
-edisconnect and clear connection data
postgresql : <sql>execute native SQL
postgresql load <file.sql|file.json>execute SQL or restore a lil logical JSON dump
postgresql dump [file.json] [-f]create a logical JSON dump of public tables
-l lists databases, -t lists public tables/views, -s shows column definitions, -n previews rows and -f searches text across one table. -o exports table rows as JSON or CSV.
-a inserts one JSON object, -w updates rows selected by one field/value pair and -d deletes matching rows. Use native SQL for joins, transactions and advanced
Because lil does not invoke system pg_dump, dump creates a logical JSON snapshot of public table rows. load restores that lil JSON format or executes a supplied SQL file. Use the server's native backup tooling when a complete
-c requests the password outside command history. -use reconnects to another database with the same session credentials.
Commands run with the privileges of the connected
The lil JSON dump is data-only: schema objects and indexes are not recreated. JSON restore is transactional, and export or dump refuses a table above 100000 rows instead of writing partial data.
Without -m, connection data remains scoped to the current PHP session. -m [name] explicitly stores the current profile in the protected .lil.key file (0600), -K <name> reconnects from it, -k lists or inspects profiles without exposing a stored password, and -M <name> removes one. kill removes .lil.key together with the other core state. Treat the file as sensitive because an opted-in profile can contain database credentials.
Run the prepared examples directly on the page. Their results are prebuilt and shown in the browser; no terminal command is executed on the server.
Install the current compatible version. Choose Base for the complete feature set or Minimum for the reduced package; use upgrade to update a module that is already installed.
Base and Minimum are two packages of the same current module release, not separate command versions.
Install the complete package with local command reference and every published mode.
install postgresqlInstall the reduced package. Local reference is omitted;
install postgresql -mInstall exactly this published version.
install postgresql -v 1.1.3Ask upgrade to check compatibility and replace the installed block only when needed.
upgrade postgresqlRemove the extension block while leaving the core and unrelated modules intact.
install postgresql -uExamples are copyable command lines, not actions executed by this website. Review paths, permissions and destructive flags before running them on a real project.
postgresql -use shop | postgresql -t | postgresql -n products 5Database shop
products
orders
id sku name category price active
1 SHOE-1 City shoe shoes 79.90 t
2 SHOE-2 Trail shoe shoes 109.00 tpostgresql -c localhost app shopStatus connected
Server PostgreSQL 17
Host localhost:5432
User app
Database shoppostgresql -lpostgres
shop
template1postgresql -s productsColumn Type Nullable
id bigint no
sku text no
name text no
category text no
price numeric(10,2) no
active boolean nopostgresql -f products "shoe" 20id sku name category price
1 SHOE-1 City shoe shoes 79.90
2 SHOE-2 Trail shoe shoes 109.00postgresql -o products -j products.jsonSaved products.jsonpostgresql -a products : {"sku":"BAG-1","name":"Travel bag","price":49.90}Inserted 1postgresql -w products sku BAG-1 : {"price":44.90}Updated 1postgresql -d products sku BAG-1Deleted 1postgresql : SELECT COUNT(*) AS products FROM productsproducts
4postgresql dump shop.jsonSaved shop.jsonpostgresql load \sandbox\db\postgresql.sqlAffected 2
Time 2 mspostgresql -e+postgresql -s missing_tableTable not found: missing_tablesandbox/db/postgresql.sqlThe example uses a file or directory from the protected /sandbox/ documentation workspace.
CREATE TABLE products (id BIGSERIAL PRIMARY KEY, sku text UNIQUE NOT NULL, name text NOT NULL, category text NOT NULL, price numeric(10,2) NOT NULL, active boolean NOT NULL DEFAULT true);
INSERT INTO products(sku,name,category,price,active) VALUES ('SHOE-1','City shoe','shoes',79.90,true),('BAG-1','Canvas bag','bags',44.50,true);
Adds explicit -m/-M/-k/-K profiles in .lil.key; listings never reveal a stored password.