On this page
LIB LIST
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
| Argument | Required | Values | Default |
|---|---|---|---|
<text> | No | Text the Script path contains, ignoring case | No filter on the path |
ALL | No | Every Script, whatever its Database Group and Environment | The Scripts of the current connection |
ARCHIVES | No | The archived Scripts (cannot be grouped) | None |
BY <dimension> | No | Groups the listed Scripts by TAG, GROUP, ENVIRONMENT, DIALECT, STATUS, ACCESS or FOLDER | One 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)
...
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.ALLlists every Script, whatever its Database Group and Environment.ARCHIVESlists the archived Scripts instead (seeLIB DEL,LIB UNDOandLIB 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)orNONE. Root Scripts come first inBY FOLDER, as(root). - Groups are sorted alphabetically, ignoring case;
BY STATUSshowsstable,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.
Related
- LIB FIND, search inside the Scripts
- LIB SHOW
- LIB RUN
- Scripts Library
Used in these how-tos
Last modified in release 5.5.0.
Found something wrong or unclear on this page? Tell us, with the page address.