On this page

LIB LIST

Core command LI LI LILI

Lists the Scripts of the Scripts Library that apply to the current connection, or all of them, or the archived ones.

Syntax

LIB LIST [<text> | ALL | ARCHIVES] [BY TAG | GROUP | ENVIRONMENT | DIALECT | STATUS | ACCESS | FOLDER]

Arguments

ArgumentRequiredValuesDefault
<text>NoText the Script path contains, ignoring caseNo filter on the path
ALLNoEvery Script, whatever its Database Group and EnvironmentThe Scripts of the current connection
ARCHIVESNoThe archived Scripts (cannot be grouped)None
BY <dimension>NoGroups the listed Scripts by TAG, GROUP, ENVIRONMENT, DIALECT, STATUS, ACCESS or FOLDEROne list, sorted by path

Examples

LIB LIST COUNTRY;
LIB LIST ALL;
LIB LIST ARCHIVES;
LIB LIST BY TAG;
LIB LIST ALL BY FOLDER;

Example session

LIB LIST ALL BY TAG;
Scripts Library (every Database Group/environment), grouped by tag:
geo (3)
|----------------------|-----|-----------|------|----------------|
|File                  |Group|Environment|Status|Modified        |
|----------------------|-----|-----------|------|----------------|
|cities/capitals.sql   |NONE |NONE       |draft |2026-10-15 17:00|
|countries/by-codes.sql|NONE |NONE       |      |2026-10-15 17:00|
|countries/largest.sql |NONE |NONE       |      |2026-10-15 17:00|
|----------------------|-----|-----------|------|----------------|

reference (1)
...
(no tag) (3)
...
Scripts grouped by tag

Details

Which Scripts

Every Script of the library is considered, subfolders included (the former ListSubfolders setting no longer exists). By default, only the Scripts that apply to the current connection are listed: those whose @instance and @environment metadata match its Database Group and Environment, are tagged ALL, or have no such tag (an untagged Script is never hidden).

  • <text> keeps the Scripts whose path contains the text, ignoring case.
  • ALL lists every Script, whatever its Database Group and Environment.
  • ARCHIVES lists the archived Scripts instead (see LIB DEL, LIB UNDO and LIB RESTORE).

Output

One row per Script: path, description, Database Group, Environment, tags, status and last change. The title says how many Scripts are shown out of how many match.

Grouping

BY <dimension> at the end shows the same Scripts in groups, each under a heading with its count: by tag (@tags), Database Group (@instance), Environment (@environment), dialect (@dialect), status (@status), access (@access) or top-level folder.

  • A Script with several values (two tags) appears in each of their groups; the title counts each Script once.
  • Scripts without a value come last, under (no tag), (no dialect), (no status), (no access declared) or NONE. Root Scripts come first in BY FOLDER, as (root).
  • Groups are sorted alphabetically, ignoring case; BY STATUS shows stable, draft, deprecated, in that order. Values differing only in case form one group.
  • Grouping never hides a Script: the same Scripts are listed as without BY.

LIB LIST BY alone still lists the Scripts whose path contains BY.

Used in these how-tos

Last modified in release 5.5.0.

Found something wrong or unclear on this page? , with the page address.