Skip to main content

library

Usage: chr library [OPTIONS] COMMAND [ARGS]...

Manage organizations and libraries in the Chromia library ecosystem

╭─ Options ───────────────────────────────────────────────────────────────────╮
│ -h, --help Show this message and exit │
╰─────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ──────────────────────────────────────────────────────────────────╮
│ install Install library dependencies │
│ list List all available libraries │
│ view View detailed information about a library │
│ versions List all versions of a library │
╰─────────────────────────────────────────────────────────────────────────────╯

You can use the library command (chr library) to manage organizations and libraries in the Chromia library ecosystem.

library install

Usage: chr library install [<options>] [<library-id>]

Install library dependencies

Configuration Properties:
-cfg, --config=<config> Alternate path for client configuration file
-s, --settings=<settings> Alternate path for project settings file

Custom Library chain options:

Specify a custom library chain (overrides the default mainnet target)

--url=<text> Url where library-chain is deployed. Ex: testnet,
localhost, https://custom-network.chromia.dev:7740
-b, --brid=<value> Brid (hex string) of library-chain

Options:
-lib, --library=<text> Name of library(ies) to install from chromia.yml file
-f, --force Force installation even if RID verification fails.
This bypasses integrity checks and should only be
used if you trust the source. Use with caution as it
may install corrupted or tampered libraries.
-h, --help Show this message and exit

Arguments:
<library-id> ID of the library to install with optional version, e.g.
'chromia-lib@1.0.0'. if no version is specified the latest
version will be installed

The install command (chr library install) installs library dependencies for your project.

library list

Usage: chr library list [<options>]

List all available libraries

Configuration Properties:
-cfg, --config=<config> Alternate path for client configuration file
-s, --settings=<settings> Alternate path for project settings file

Custom Library chain options:

Specify a custom library chain (overrides the default mainnet target)

--url=<text> Url where library-chain is deployed. Ex: testnet,
localhost, https://custom-network.chromia.dev:7740
-b, --brid=<value> Brid (hex string) of library-chain

Options:
-l, --limit=<int> Maximum number of libraries to display
-o, --offset=<int> Number of libraries to skip
--sort-by=(asc|desc) Sort order for libraries
-h, --help Show this message and exit

The list command (chr library list) shows a list of available libraries.

library view

Usage: chr library view [<options>] <library_id>

View detailed information about a library

Configuration Properties:
-cfg, --config=<config> Alternate path for client configuration file
-s, --settings=<settings> Alternate path for project settings file

Custom Library chain options:

Specify a custom library chain (overrides the default mainnet target)

--url=<text> Url where library-chain is deployed. Ex: testnet,
localhost, https://custom-network.chromia.dev:7740
-b, --brid=<value> Brid (hex string) of library-chain

Options:
-h, --help Show this message and exit

Arguments:
<library_id> ID of the library to view

The view command (chr library view) displays detailed information about a specific library.

library versions

Usage: chr library versions [<options>] <libraryid>

List all versions of a library

Configuration Properties:
-cfg, --config=<config> Alternate path for client configuration file
-s, --settings=<settings> Alternate path for project settings file

Custom Library chain options:

Specify a custom library chain (overrides the default mainnet target)

--url=<text> Url where library-chain is deployed. Ex: testnet,
localhost, https://custom-network.chromia.dev:7740
-b, --brid=<value> Brid (hex string) of library-chain

Options:
-l, --limit=<int> Maximum number of versions to display
-o, --offset=<int> Number of versions to skip
-h, --help Show this message and exit

Arguments:
<libraryid> ID of the library to list versions for

The versions command (chr library versions) shows available versions for a library.