CLI command: c4-cli library
Edits library references
Usage:
c4-cli library [OPTIONS] <COMMAND>
c4-cli library set-managed ToolsNamespace "AcmeTools, 1.2.3.4 (Acme Inc)" C:/path/to/Libraries.json --optional true
c4-cli library set-managed ToolsNamespace "AcmeTools, 1.2.3.4 (Acme Inc)" C:/path/to/Application.iecapp/ --optional true
c4-cli library set-relative ToolsNamespace C:/path/to/library.fbslib/ C:/path/to/Libraries.json
c4-cli library set-placeholder ToolsNamespace some_placeholder C:/path/to/Libraries.json
c4-cli library restoreOptions | Description |
|---|---|
| Prints the help for the command |
Command | Description |
|---|---|
| Adds a new managed library reference to the |
| Adds a new reference to a relative path to the |
| Adds a new placeholder reference to the |
| Resolves all libraries of the application and restores missing libraries into the library cache |
| Adds a new reference to a placeholder in the |
| Adds a new managed library reference to the |
| Adds a new reference to a relative path to the |
| Restores all missing libraries of an application into the library cache |
| Verifies the |
| Uninstalls the library associated with a specified namespace. Removes the library itself and all dependencies exclusively referenced by that library |
| Resolves the library references for a specified application and writes them to the |
| Removes the library reference identified by the namespace from the |
| Removes unused indirect references to libraries from the |
| Checks the repositories to determine if any installed libraries (generally or specifically) are currently outdated |
| Lists all references of a specified application |
| Prints the chain of dependencies causing a specified library to be referenced |
| Creates a source library archive from the specified CODESYS 4 library project folder. It must be a valid library. |
| Saves a specified library as a compiled library |
| Verifies whether the library resolutions in |
| Checks the library project and reports any detected errors and warnings |
CLI command: c4-cli library set-managed
Adds a new managed library reference to the Libraries.json file or replaces an existing reference.
Usage:
c4-cli library set-managed <namespace> <library> [target-path] [OPTIONS]
c4-cli library set-managed ToolsNamespace "AcmeTools, 1.2.3.4 (Acme Inc)" C:/path/to/Libraries.json --optional true c4-cli library set-managed ToolsNamespace "AcmeTools, 1.2.3.4 (Acme Inc)" C:/path/to/Application.iecapp/ --optional true
Arguments | Description |
|---|---|
| Namespace of the library that to edit |
| Library ID or pattern of the library to add |
| Path to a |
Options | Description |
|---|---|
| Prints the help for the command |
| Enables logging on the console at the |
| Sets the log level for logging to the console, for example |
| If this is set to |
| If this is set to |
| If this is set to |
| Applies to relative path references which point to files ( |
| If this is set to |
| For special use cases only. If this is set to |
| Optional (allowed for placeholders). When the flag is set, it must be a library ID or pattern which will be used during the library check. |
| Optional. When the flag is set, no changes will be made to the files. Instead, the entry that would be written will be printed to the console. |
CLI command: c4-cli library set-relative
Adds a new reference to a relative path to the Libraries.json file or replaces an existing reference
Usage:
c4-cli library set-relative <namespace> <path> [target-path] [OPTIONS]
c4-cli library set-relative ToolsNamespace C:/path/to/library.fbslib/ C:/path/to/Libraries.json
Arguments | Description |
|---|---|
| Namespace of the library that to edit |
| Path to the (packed) library project or compiled library to add |
| Path to a |
Options | Description |
|---|---|
| Prints the help for the command |
| Enables logging on the console at the |
| Sets the log level for logging to the console, for example |
| If this is set to |
| If this is set to |
| If this is set to |
| Applies to relative path references which point to files ( |
| If this is set to |
| For special use cases only. If this is set to |
| Optional (allowed for placeholders). When the flag is set, it must be a library ID or pattern which will be used during the library check. |
| Optional. When the flag is set, no changes will be made to the files. Instead, the entry that would be written will be printed to the console. |
CLI command: c4-cli library set-placeholder
Adds a new placeholder reference to the Libraries.json file or replaces an existing reference
Usage:
c4-cli library set-placeholder <namespace> <placeholder> [target-path] [OPTIONS]
c4-cli library set-placeholder ToolsNamespace some_placeholder C:/path/to/Libraries.json
Arguments | Description |
|---|---|
| Namespace of the library that to edit |
| Placeholder for the library to add |
| Path to a |
Options | Description |
|---|---|
| Prints the help for the command |
| Enables logging on the console at the |
| Sets the log level for logging to the console, for example |
| If this is set to |
| If this is set to |
| If this is set to |
| Applies to relative path references which point to files ( |
| If this is set to |
| For special use cases only. If this is set to |
| Optional (allowed for placeholders). When the flag is set, it must be a library ID or pattern which will be used during the library check. |
| Optional. When the flag is set, no changes will be made to the files. Instead, the entry that would be written will be printed to the console. |
CLI command: c4-cli library install
Resolves all libraries of the application and restores missing libraries into the library cache
Usage:
c4-cli library install [target-path] [OPTIONS]
c4-cli library i
c4-cli library install
c4-cli library install C:/path/to/application.iecappArguments | Description |
|---|---|
| Path to the directory of a specific application, in whose context the command should be run. If the flag is not set, then the command will default to the current directory. Valid targets are an application directory, a |
Options | Description |
|---|---|
| Prints the help for the command |
| Enables logging on the console at the |
| Sets the log level for logging to the console, for example |
| Optional. When the flag is set, the command will report in the usual way which changes would have been made during the execution. However, the file system will not be modified. |
CLI command: c4-cli library install-placeholder
Adds a new reference to a placeholder in the Libraries.json file or replaces an existing reference. Then resolves all libraries of the application and restores missing libraries into the library cache
Usage:
c4-cli library install-placeholder <namespace> <placeholder> [target-path] [OPTIONS]
c4-cli library install-placeholder SomeOtherNamespace some_placeholder C:/path/to/application.iecapp
Arguments | Description |
|---|---|
| Namespace of a single specific library to install. If this argument is provided, then you also need to provide an argument for |
| Placeholder for the library to add |
| Path to the directory of a specific application, in whose context the command should be run. If the flag is not set, then the command will default to the current directory. Valid targets are an application directory, a |
Options | Description |
|---|---|
| Prints the help for the command |
| Enables logging on the console at the |
| Sets the log level for logging to the console, for example |
| Optional. When the flag is set, the command will report in the usual way which changes would have been made during the execution. However, the file system will not be modified. |
CLI command: c4-cli library install-managed
Adds a new managed library reference to the Libraries.json file or replaces an existing reference. Then resolves all libraries of the application and restores missing libraries into the library cache.
Usage:
c4-cli library install-managed <namespace> <library> [target-path] [OPTIONS]
c4-cli library install-managed ToolsNamespace "AcmeTools, 1.2.3.4 (Acme Inc)" C:/path/to/application.iecapp
Arguments | Description |
|---|---|
| Namespace of a single specific library to install. The flag must be specified when installing a single, specific library. |
| Library ID or pattern of the library to add |
| Path to the directory of a specific application, in whose context the command should be run. If the flag is not set, then the command will default to the current directory. Valid targets are an application directory, a |
Options | Description |
|---|---|
| Prints the help for the command |
| Enables logging on the console at the |
| Sets the log level for logging to the console, for example |
| Optional. When the flag is set, the command will report in the usual way which changes would have been made during the execution. However, the file system will not be modified. |
CLI command: c4-cli library install-relative
Adds a new reference to a relative path to the Libraries.json file or replaces an existing reference. Then resolves all libraries of the application and restores missing libraries into the library cache
Usage:
c4-cli library install-relative <namespace> <path> [target-path] [OPTIONS]
c4-cli library install-relative ToolsNamespace ../some/relative/library.fbslib C:/path/to/application.iecapp
Arguments | Description |
|---|---|
| Namespace of a single specific library to install. If this argument is provided, then you also need to provide an argument for |
| Path to the (packed) library project or compiled library to add |
| Path to the directory of a specific application, in whose context the command should be run. If the flag is not set, then the command will default to the current directory. Valid targets are an application directory, a |
Options | Description |
|---|---|
| Prints the help for the command |
| Enables logging on the console at the |
| Sets the log level for logging to the console, for example |
| Optional. When the flag is set, the command will report in the usual way which changes would have been made during the execution. However, the file system will not be modified. |
CLI command: c4-cli library restore
Restores all missing libraries of an application into the library cache
Usage:
c4-cli library restore [target-path] [library-id] [OPTIONS]
c4-cli library restore
c4-cli library restore "AcmeTools, 1.2.3.4 (Acme Inc)"Arguments | Description |
|---|---|
| Path to the directory of a specific application, in whose context the command should be run. If the flag is not set, then the command will default to the current directory. Valid targets are an application directory, a |
| If supplied, then only the specified library will be restored (as long as it does not already exist in the cache). |
Options | Description |
|---|---|
| Prints the help for the command |
| Enables logging on the console at the |
| Sets the log level for logging to the console, for example |
| Optional. When the flag is set, the command will report in the usual way which changes would have been made during the execution. However, the file system will not be modified. |
CLI command: c4-cli library clean-install
Verifies the Libraries.lock.json files, removes the library cache, and installs all libraries referenced by the Libraries.lock.json files
Usage:
c4-cli library clean-install [target-path] [OPTIONS]
c4-cli library clean-install
c4-cli library ci C:/path/to/application.iecapp/
c4-cli library ci C:/path/to/device.fbsdev/ --dry-runArguments | Description |
|---|---|
| Path to the directory of a specific device project, in whose context the command is to be run. If no value is specified, then the command will default to the current directory. Valid targets are a device project directory, an application directory, a |
Options | Description |
|---|---|
| Prints the help for the command |
| Enables logging on the console at the |
| Sets the log level for logging to the console, for example |
| Optional. When the flag is set, the command will report in the usual way which changes would have been made during the execution. However, the file system will not be modified. |
CLI command: c4-cli library uninstall
Uninstalls the library associated with a specified namespace, removing the library itself and all dependencies referenced exclusively by that library
Usage:
c4-cli library uninstall <namespace> [target-path] [OPTIONS]
c4-cli library uninstall LibraryNamespace c4-cli library uninstall LibraryNamespace C:/path/to/Libraries.json c4-cli library uninstall LibraryNamespace C:/path/to/Libraries.lock.json c4-cli library uninstall LibraryNamespace C:/path/to/Application.iecapp
Arguments | Description |
|---|---|
| Namespace of the library to uninstall |
| Path to a |
Options | Description |
|---|---|
| Prints the help for the command |
| Enables logging on the console at the |
| Sets the log level for logging to the console, for example |
| Optional. No changes are made to files. Only the progress logs of the command are printed to the console. |
CLI command: c4-cli library resolve
Resolves the library references for a specified application and writes them to the Libraries.lock.json file
Usage:
c4-cli library resolve [target-path] [namespace] [OPTIONS]
c4-cli library resolve C:/path/to/Project.fbsdev/Application.iecapp/
c4-cli library resolve C:/path/to/Project.fbsdev/Application.iecapp/ LibraryNamespace
c4-cli library resolve C:/path/to/Project.fbsdev/Application.iecapp/ --allArguments | Description |
|---|---|
| Path to the directory of a specific application, in whose context the command is to be run. If no value is specified, then the command will default to the current directory. Valid targets are an application directory, a library project directory, a |
| If this argument is provided, then only the specified namespace will be resolved and only the resolved library will be updated in the lockfile. |
Options | Description |
|---|---|
| Prints the help for the command |
| Enables logging on the console at the |
| Sets to any valid log level. When the flag is not specified, logging will be disabled. |
| Optional. When the flag is set, the command will report in the usual way which changes would have been made during the execution. However, the file system will not be modified. |
| When the flag is set, the current |
CLI command: c4-cli library remove
Removes the library reference identified by the namespace from the Libraries.json file
Usage:
c4-cli library remove <namespace> [target-path] [OPTIONS]
c4-cli library remove ToolsNamespace C:/path/to/Libraries.json
Arguments | Description |
|---|---|
| Namespace of the library that to remove |
| Path to a |
Options | Description |
|---|---|
| Prints the help for the command |
| Enables logging on the console at the |
| Sets to any valid log level. When the flag is not specified, logging will be disabled. |
CLI command: c4-cli library prune
Removes unused indirect references to libraries from the Libraries.lock.json file
Usage:
c4-cli library prune [target-path] [OPTIONS]
c4-cli library prune C:/path/to/Libraries.lock.json
Arguments | Description |
|---|---|
| Path to the target of the command. If this is omitted, then the command will default to the current directory. Valid targets are an application directory, a |
Options | Description |
|---|---|
| Prints the help for the command |
| Enables logging on the console at the |
| Sets to any valid log level. When the flag is not specified, logging will be disabled. |
| Optional. When the flag is set, the command will report in the usual way which changes would have been made during the execution. However, the file system will not be modified. |
CLI command: c4-cli library outdated
Checks the repositories to determine if any installed libraries (generally or specifically) are outdated
Usage:
c4-cli library outdated [target-path] [library-id] [OPTIONS]
c4-cli library outdated
c4-cli library outdated C:/path/to/application.iecapp/
c4-cli library outdated . "AcmeTools, 1.2.3.4 (Acme Inc)" --all --include-prereleaseArguments | Description |
|---|---|
| Path to the target of the command. If this is omitted, then the command will default to the current directory. Valid targets are an application directory, a |
| ID of the library for which the check for newer versions should be run |
Options | Description |
|---|---|
| Prints the help for the command |
| Enables logging on the console at the |
| Sets to any valid log level. When the flag is not specified, logging will be disabled. |
| When the flag is set, outdated indirect references will also be reported. |
| When the flag is set, prerelease libraries will also be considered. |
CLI command: c4-cli library list
Lists all references of a defined application
Usage:
c4-cli library list [target-path] [OPTIONS]
c4-cli library list
c4-cli library list C:/path/to/application.iecapp/
c4-cli library list --allArguments | Description |
|---|---|
| Path to the |
Options | Description |
|---|---|
| Prints the help for the command |
| Enables logging on the console at the |
| Sets the log level for logging to the console, for example |
| When the flag is set, all indirect references will also be listed. |
CLI command: c4-cli library explain
Prints the chain of dependencies causing a specified library to be referenced
Usage:
c4-cli library explain <library> [target-path] [OPTIONS]
c4-cli library explain "AcmeTools, 1.2.3.4 (Acme Inc)"
c4-cli library explain "AcmeTools, 1.2.3.4 (Acme Inc)" C:/path/to/Libraries.lock.json
c4-cli library explain "AcmeTools, 1.2.3.4 (Acme Inc)" C:/path/to/Libraries.lock.json --show-pathsArguments | Description |
|---|---|
| Library for which the chain of dependencies should be printed. This can be specified as library ID or namespace. |
| Path to the |
Options | Description |
|---|---|
| Prints the help for the command |
| Enables logging on the console at the |
| Sets the log level for logging to the console, for example |
| When the flag is set, the paths of the shown references will also be displayed. |
CLI command: c4-cli library pack
Creates a source library archive from the specified CODESYS 4 library project folder. It must be a valid library.
Usage:
c4-cli library pack [target-path] [zip-path] [OPTIONS]
c4-cli library pack
c4-cli library pack C:/path/to/library.fbslib C:/path/to/DestinationDirectory/
c4-cli library pack C:/path/to/library.fbslib
c4-cli library pack . C:/path/to/DestinationDirectory/Arguments | Description |
|---|---|
| Optional Path to the library project folder to pack. If this is omitted, then the command will default to the current directory. If only |
| Directory where the packed library archive will be saved. If this is omitted, then the archive will be created in the same directory as the library. |
Options | Description |
|---|---|
| Prints the help for the command |
| Enables logging on the console at the |
| Sets the log level for logging to the console, for example |
CLI command: c4-cli library save-compiled
Saves a specific library as a compiled library
Usage:
c4-cli library save-compiled <library-path> <destination-path> [OPTIONS]
c4-cli library save-compiled C:/path/to/library.fbslib/ C:/path/to/library.compiled-library-v3
Arguments | Description |
|---|---|
| Path to the library to compile. Valid targets are the library project directory, a |
| Path where the compiled library will be stored. If this is a directory, then the compiled library will be saved to a file named |
Options | Description |
|---|---|
| Prints the help for the command |
| Enables logging on the console at the |
| Sets the log level for logging to the console, for example |
| Optional. When the flag is set, the command will report in the usual way which changes would have been made during the execution. However, the file system will not be modified. |
| Overwrites the destination file if it already exists |
| Uses a predefined compiler version |
| Overrides the library version. If this flag is set, then use this value instead of the semver version in the |
| Checks the version in the |
| Compression level for the ZIP archive |
| If this flag is set, then the 'Released' flag will be overridden to the specified value in the compiled library. If this flag is set, then this will also enforce an empty prerelease labels field. In this case, library generation will fail if either the |
| Overrides the prerelease labels. If this flag is set, then this value will be used instead of the semver prerelease labels in the A non-empty prerelease label conflicts with |
| Overrides the build info labels. If this flag is set, then this value will be used instead of the semver version build info label in the |
| Checks the prerelease labels of the |
| Checks the build info labels of the semver version field in the |
| Path to the main compiled documentation archive created by the libdoc toolchain, usually named either |
CLI command: c4-cli library verify
Verifies whether the library resolutions in Libraries.lock.json are still valid and still match the Libraries.json. Checks that all libraries are accessible in the library cache and that no duplicate references, updated packages, or orphans exist
Usage:
c4-cli library verify [target-path] [OPTIONS]
c4-cli library verify C:/path/to/application.iecapp/
Arguments | Description |
|---|---|
| Path to the target of the command. If this is omitted, then the command will default to the current directory. Valid targets are an application directory, a |
Options | Description |
|---|---|
| Prints the help for the command |
| Enables logging on the console at the |
| Sets the log level for logging to the console, for example |
CLI command: c4-cli library check
Checks the library project and reports any detected errors and warnings
Usage:
c4-cli library check [library-path] [OPTIONS]
Arguments | Description |
|---|---|
| Path to the library project that should be checked. If this is omitted, then the command will default to the current directory. |
Options | Description |
|---|---|
| Prints the help for the command |
| Enables logging on the console at the |
| Sets the log level for logging to the console, for example |
| Optional. When the flag is set, the command will report in the usual way which changes would have been made during the execution. However, the file system will not be modified. |
| Assumed pointer size (in bits); can be |
| Comma-separated list of compiler defines to set |