Skip to main content

CLI command: c4-cli library

Edits library references

Usage:

  c4-cli library [OPTIONS] <COMMAND>
Example 24. Examples
    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 restore


Options

Description

-h, --help

Prints the help for the command

Command

Description

set-managed <namespace> <library>

Adds a new managed library reference to the Libraries.json file or replaces an existing reference

set-relative <namespace> <path>

Adds a new reference to a relative path to the Libraries.json file or replaces an existing reference

set-placeholder <namespace> <placeholder>

Adds a new placeholder reference to the Libraries.json file or replaces an existing reference

install

Resolves all libraries of the application and restores missing libraries into the library cache

install-placeholder <namespace> <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

install-managed <namespace> <library>

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

install-relative <namespace> <path>

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

restore

Restores all missing libraries of an application into the library cache

clean-install

Verifies the Libraries.lock.json files, removes the library cache, and installs all libraries referenced by the Libraries.lock.json files

library uninstall <namespace> [target-path]

Uninstalls the library associated with a specified namespace. Removes the library itself and all dependencies exclusively referenced by that library

resolve

Resolves the library references for a specified application and writes them to the Libraries.lock.json file

remove <namespace> [target-path]

Removes the library reference identified by the namespace from the Libraries.json file

prune

Removes unused indirect references to libraries from the Libraries.lock.json file

outdated

Checks the repositories to determine if any installed libraries (generally or specifically) are currently outdated

list

Lists all references of a specified application

explain <library>

Prints the chain of dependencies causing a specified library to be referenced

pack

Creates a source library archive from the specified CODESYS 4 library project folder. It must be a valid library.

save-compiled <library-path> <destination-path>

Saves a specified library as a compiled 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

check

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]
Example 25. Examples
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>

Namespace of the library that to edit

<library>

Library ID or pattern of the library to add

[target-path]

Path to a Libraries.json file, an application directory, or a library directory where the reference will be created or replaced. If this is omitted, then the command will default to the current directory.

Options

Description

-h, --help

Prints the help for the command

-v, --verbose

Enables logging on the console at the information level; Short form for --log-level=information

--log-level

Sets the log level for logging to the console, for example trace, debug, information, warning, or error. By default, nothing is logged to the console (none).

-u, --allow-unqualified-access

If this is set to true, then the library can be accessed without namespace qualification. The recommended value for new code is false. This corresponds to the negation of the qualifiedOnly value in CODESYS 3, which defaults to false for historical reasons.

-c, --publish-symbols-in-container

If this is set to true, then the referenced library will publish its symbols in the referencing container library. Use this setting to define the published symbols when creating a container library.

-o, --optional

If this is set to true, then no compiler errors will occur simply because the library is unavailable. (However, compiler errors may occur due to missing symbols from this library.)

--no-hash

Applies to relative path references which point to files (.zip or .compiled-library). Suppresses the generation of SHA384 hash values in the Libraries.lock.json file. This is useful in build pipelines and test CI pipelines when the referenced file is generated earlier in the pipeline and a changing hash is expected.

-p, --include-prerelease

If this is set to true, then version patterns will always match prerelease versions within the allowed range. Otherwise, the default behavior applies: "If a version has a prerelease tag – for example 1.2.3-alpha.3 – then it will only be allowed to satisfy comparator sets if at least one comparator with the same [major, minor, patch] tuple also has a prerelease tag."

--link-all-content

For special use cases only. If this is set to true, then the entire library will be integrated, not just the referenced parts.

--default-resolution

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.

-d, --dry-run

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]
Example 26. Examples
    c4-cli library set-relative ToolsNamespace C:/path/to/library.fbslib/ C:/path/to/Libraries.json


Arguments

Description

<namespace>

Namespace of the library that to edit

<path>

Path to the (packed) library project or compiled library to add

[target-path]

Path to a Libraries.json file, an application directory, or a library directory where the reference will be created or replaced. If this is omitted, then the command will default to the current directory.

Options

Description

-h, --help

Prints the help for the command

-v, --verbose

Enables logging on the console at the information level; Short form for --log-level=information

--log-level

Sets the log level for logging to the console, for example trace, debug, information, warning, or error. By default, nothing is logged to the console (none).

-u, --allow-unqualified-access

If this is set to true, then the library can be accessed without namespace qualification. The recommended value for new code is false. This corresponds to the negation of the qualifiedOnly value in CODESYS 3, which defaults to false for historical reasons.

-c, --publish-symbols-in-container

If this is set to true, then the referenced library will publish its symbols in the referencing container library. Use this setting to define the published symbols when creating a container library.

-o, --optional

If this is set to true, then no compiler errors will occur simply because the library is unavailable. (However, compiler errors may occur due to missing symbols from this library.)

--no-hash

Applies to relative path references which point to files (.zip or .compiled-library). Suppresses the generation of SHA384 hash values in the Libraries.lock.json file. This is useful in build pipelines and test CI pipelines when the referenced file is generated earlier in the pipeline and a changing hash is expected.

-p, --include-prerelease

If this is set to true, then version patterns will always match prerelease versions within the allowed range. Otherwise, the default behavior applies: "If a version has a prerelease tag – for example 1.2.3-alpha.3 – then it will only be allowed to satisfy comparator sets if at least one comparator with the same [major, minor, patch] tuple also has a prerelease tag."

--link-all-content

For special use cases only. If this is set to true, then the entire library will be integrated, not just the referenced parts.

--default-resolution

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.

-d, --dry-run

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]
Example 27. Examples
    c4-cli library set-placeholder ToolsNamespace some_placeholder C:/path/to/Libraries.json


Arguments

Description

<namespace>

Namespace of the library that to edit

<placeholder>

Placeholder for the library to add

[target-path]

Path to a Libraries.json file, an application directory, or a library directory where the reference will be created or replaced. If this is omitted, then the command will default to the current directory.

Options

Description

-h, --help

Prints the help for the command

-v, --verbose

Enables logging on the console at the information level; Short form for --log-level=information

--log-level

Sets the log level for logging to the console, for example trace, debug, information, warning, or error. By default, nothing is logged to the console (none).

-u, --allow-unqualified-access

If this is set to true, then the library can be accessed without namespace qualification. The recommended value for new code is false. This corresponds to the negation of the qualifiedOnly value in CODESYS 3, which defaults to false for historical reasons.

-c, --publish-symbols-in-container

If this is set to true, then the referenced library will publish its symbols in the referencing container library. Use this setting to define the published symbols when creating a container library.

-o, --optional

If this is set to true, then no compiler errors will occur simply because the library is unavailable. (However, compiler errors may occur due to missing symbols from this library.)

--no-hash

Applies to relative path references which point to files (.zip or .compiled-library). Suppresses the generation of SHA384 hash values in the Libraries.lock.json file. This is useful in build pipelines and test CI pipelines when the referenced file is generated earlier in the pipeline and a changing hash is expected.

-p, --include-prerelease

If this is set to true, then version patterns will always match prerelease versions within the allowed range. Otherwise, the default behavior applies: "If a version has a prerelease tag – for example 1.2.3-alpha.3 – then it will only be allowed to satisfy comparator sets if at least one comparator with the same [major, minor, patch] tuple also has a prerelease tag."

--link-all-content

For special use cases only. If this is set to true, then the entire library will be integrated, not just the referenced parts.

--default-resolution

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.

-d, --dry-run

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]
Example 28. Examples
    c4-cli library i    
    c4-cli library install
    c4-cli library install C:/path/to/application.iecapp


Arguments

Description

[target-path]

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 Libraries.json file, or a Libraries.lock.json file.

Options

Description

-h, --help

Prints the help for the command

-v, --verbose

Enables logging on the console at the information level; Short form for --log-level=information

--log-level

Sets the log level for logging to the console, for example trace, debug, information, warning, or error. By default, nothing is logged to the console (none).

-d, --dry-run

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]
Example 29. Examples
    c4-cli library install-placeholder SomeOtherNamespace some_placeholder C:/path/to/application.iecapp


Arguments

Description

<namespace>

Namespace of a single specific library to install. If this argument is provided, then you also need to provide an argument for library.

<placeholder>

Placeholder for the library to add

[target-path]

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 Libraries.json file, or a Libraries.lock.json file.

Options

Description

-h, --help

Prints the help for the command

-v, --verbose

Enables logging on the console at the information level; Short form for --log-level=information

--log-level

Sets the log level for logging to the console, for example trace, debug, information, warning, or error. By default, nothing is logged to the console (none).

-d, --dry-run

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]
Example 30. Examples
    c4-cli library install-managed ToolsNamespace "AcmeTools, 1.2.3.4 (Acme Inc)" C:/path/to/application.iecapp


Arguments

Description

<namespace>

Namespace of a single specific library to install. The flag must be specified when installing a single, specific library.

<library>

Library ID or pattern of the library to add

[target-path]

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 Libraries.json file, or a Libraries.lock.json file.

Options

Description

-h, --help

Prints the help for the command

-v, --verbose

Enables logging on the console at the information level; Short form for --log-level=information

--log-level

Sets the log level for logging to the console, for example trace, debug, information, warning, or error. By default, nothing is logged to the console (none).

-d, --dry-run

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]
Example 31. Examples
    c4-cli library install-relative ToolsNamespace ../some/relative/library.fbslib C:/path/to/application.iecapp


Arguments

Description

<namespace>

Namespace of a single specific library to install. If this argument is provided, then you also need to provide an argument for library.

<path>

Path to the (packed) library project or compiled library to add

[target-path]

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 Libraries.json file, or a Libraries.lock.json file.

Options

Description

-h, --help

Prints the help for the command

-v, --verbose

Enables logging on the console at the information level; Short form for --log-level=information

--log-level

Sets the log level for logging to the console, for example trace, debug, information, warning, or error. By default, nothing is logged to the console (none).

-d, --dry-run

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]
Example 32. Examples
    c4-cli library restore
    c4-cli library restore "AcmeTools, 1.2.3.4 (Acme Inc)"


Arguments

Description

[target-path]

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 Libraries.json file, or a Libraries.lock.json file.

[library-id]

If supplied, then only the specified library will be restored (as long as it does not already exist in the cache).

Options

Description

-h, --help

Prints the help for the command

-v, --verbose

Enables logging on the console at the information level; Short form for --log-level=information

--log-level

Sets the log level for logging to the console, for example trace, debug, information, warning, or error. By default, nothing is logged to the console (none).

-d, --dry-run

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]
Example 33. Examples
    c4-cli library clean-install
    c4-cli library ci C:/path/to/application.iecapp/
    c4-cli library ci C:/path/to/device.fbsdev/ --dry-run


Arguments

Description

[target-path]

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 Libraries.json file, or a Libraries.lock.json file.

Options

Description

-h, --help

Prints the help for the command

-v, --verbose

Enables logging on the console at the information level; Short form for --log-level=information

--log-level

Sets the log level for logging to the console, for example trace, debug, information, warning, or error. By default, nothing is logged to the console (none).

-d, --dry-run

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]
Example 34. Examples:
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>

Namespace of the library to uninstall

[target-path]

Path to a Libraries.json file or a Libraries.lock.json file, or to an application directory where the uninstall command should be run. If this is omitted, then the command will default to the current directory.

Options

Description

-h, --help

Prints the help for the command

-v, --verbose

Enables logging on the console at the information level; Short form for --log-level=information

--log-level

Sets the log level for logging to the console, for example trace, debug, information, warning, or error. By default, nothing is logged to the console (none).

-d, --dry-run

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]
Example 35. Examples:
    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/ --all


Arguments

Description

[target-path]

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 Libraries.json file, or a Libraries.lock.json file.

[namespace]

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

-h, --help

Prints the help for the command

-v, --verbose

Enables logging on the console at the information level; Short form for --log-level=information

--log-level

Sets to any valid log level. When the flag is not specified, logging will be disabled.

-d, --dry-run

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.

-a, --all

When the flag is set, the current Libraries.lock.json file will be discarded and a completely new one will be written.

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]
Example 36. Examples:
c4-cli library remove ToolsNamespace C:/path/to/Libraries.json 


Arguments

Description

<namespace>

Namespace of the library that to remove

[target-path]

Path to a Libraries.json file, an application directory, or a library directory from where the reference will be removed. If this is omitted, then the command will default to the current directory.

Options

Description

-h, --help

Prints the help for the command

-v, --verbose

Enables logging on the console at the information level; Short form for --log-level=information

--log-level

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]
Example 37. Examples:
c4-cli library prune C:/path/to/Libraries.lock.json


Arguments

Description

[target-path]

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 Libraries.json file, or a Libraries.lock.json file.

Options

Description

-h, --help

Prints the help for the command

-v, --verbose

Enables logging on the console at the information level; Short form for --log-level=information

--log-level

Sets to any valid log level. When the flag is not specified, logging will be disabled.

-d, --dry-run

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]
Example 38. Examples:
    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-prerelease


Arguments

Description

[target-path]

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 Libraries.json file, or a Libraries.lock.json file.

[library-id]

ID of the library for which the check for newer versions should be run

Options

Description

-h, --help

Prints the help for the command

-v, --verbose

Enables logging on the console at the information level; Short form for --log-level=information

--log-level

Sets to any valid log level. When the flag is not specified, logging will be disabled.

-a, --all

When the flag is set, outdated indirect references will also be reported.

-p, --include-prerelease

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]
Example 39. Examples:
    c4-cli library list
    c4-cli library list C:/path/to/application.iecapp/
    c4-cli library list --all


Arguments

Description

[target-path]

Path to the Libraries.lock.json file, for which the references should be listed, or the application directory which contains Libraries.lock.json file. If this is omitted, then the command will default to the current directory.

Options

Description

-h, --help

Prints the help for the command

-v, --verbose

Enables logging on the console at the information level; Short form for --log-level=information

--log-level

Sets the log level for logging to the console, for example trace, debug, information, warning, or error. By default, nothing is logged to the console (none).

-a, --all

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]
Example 40. Examples:
    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-paths


Arguments

Description

<library>

Library for which the chain of dependencies should be printed. This can be specified as library ID or namespace.

[target-path]

Path to the Libraries.lock.json file where the respective library is referenced, or to a Libraries.json file next to the Libraries.lock.json file, or the application directory which includes a Libraries.lock.json file. If this is omitted, then the command will default to the current directory.

Options

Description

-h, --help

Prints the help for the command

-v, --verbose

Enables logging on the console at the information level; Short form for --log-level=information

--log-level

Sets the log level for logging to the console, for example trace, debug, information, warning, or error. By default, nothing is logged to the console (none).

-p, --show-paths

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]
Example 41. Examples:
    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

[target-path]

Optional

Path to the library project folder to pack. If this is omitted, then the command will default to the current directory. If only [zip-path] is set, then use . here as a placeholder for the current directory.

[zip-path]

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

-h, --help

Prints the help for the command

-v, --verbose

Enables logging on the console at the information level; Short form for --log-level=information

--log-level

Sets the log level for logging to the console, for example trace, debug, information, warning, or error. By default, nothing is logged to the console (none).

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]
Example 42. Examples:
    c4-cli library save-compiled C:/path/to/library.fbslib/ C:/path/to/library.compiled-library-v3


Arguments

Description

<library-path>

Path to the library to compile. Valid targets are the library project directory, a Libraries.json file, or a Libraries.lock.json file. Use . for the current directory.

<destination-path>

Path where the compiled library will be stored. If this is a directory, then the compiled library will be saved to a file named {LibraryName}.compiled-library-v3 inside the directory.

Options

Description

-h, --help

Prints the help for the command

-v, --verbose

Enables logging on the console at the information level; Short form for --log-level=information

--log-level

Sets the log level for logging to the console, for example trace, debug, information, warning, or error. By default, nothing is logged to the console (none).

-d, --dry-run

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.

--overwrite

Overwrites the destination file if it already exists

--compiler-version

Uses a predefined compiler version

--set-version

Overrides the library version. If this flag is set, then use this value instead of the semver version in the ProjectInfo.json file of the library.

--assert-version

Checks the version in the ProjectInfo.json file and aborts the process if it does not match to the specified version

--compression-level

Compression level for the ZIP archive

--set-released-flag

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 --set-prerelease-labels option is set with a non-empty string, or the SemVer version field in the ProjectInfo.json file specifies prerelease labels which have not explicitly been overwritten with an empty string via the --set-prerelease-labels option.

--set-prerelease-labels

Overrides the prerelease labels. If this flag is set, then this value will be used instead of the semver prerelease labels in the ProjectInfo.json file of the library. If the value is set to --, then a library will be created without a prerelease label, even if a label is specified in the ProjectInfo.json file.

A non-empty prerelease label conflicts with --set-released-flag; therefore, --set-prerelease-labels cannot be used with a non-empty label when the --set-released-flag flag is set to true, or the released flag is set in the project info. This value excludes the leading - which separates the version label and prerelease label in semver notation.

--set-buildinfo-labels

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 ProjectInfo.json file of the library. If the value is set to --, then a library without a build info label will be created, even if a label is specified in the ProjectInfo.json file. This value excludes the leading + which separates the version label or prerelease label from the build info part in semver notation.

--assert-prerelease-labels

Checks the prerelease labels of the semver version field in the ProjectInfo.json file of the library, and aborts the process if it does not match the specified labels. Can be used for sanity checks in the pipeline. When the value is set to --, this will make sure that the ProjectInfo.json file does not specify any prerelease labels.

--assert-buildinfo-labels

Checks the build info labels of the semver version field in the ProjectInfo.json file of the library, and aborts the process if it does not match the specified labels. Can be used for sanity checks in the pipeline. When the value is set to --, this will make sure that the ProjectInfo.json file does not specify any build info labels. This value excludes the leading + which separates the version label or prerelease label from the build info part in semver notation.

--include-libdoc

Path to the main compiled documentation archive created by the libdoc toolchain, usually named either doc.lmd or __lmd__.aux[iliary]. Compile files in the same folder which conform to the naming convention __lmd__*.aux[iliary] will also be included, where * corresponds to the ISO language/country code.

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]
Example 43. Examples:
    c4-cli library verify C:/path/to/application.iecapp/


Arguments

Description

[target-path]

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 Libraries.json file, or a Libraries.lock.json file.

Options

Description

-h, --help

Prints the help for the command

-v, --verbose

Enables logging on the console at the information level; Short form for --log-level=information

--log-level

Sets the log level for logging to the console, for example trace, debug, information, warning, or error. By default, nothing is logged to the console (none).

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

[library-path]

Path to the library project that should be checked. If this is omitted, then the command will default to the current directory.

Options

Description

-h, --help

Prints the help for the command

-v, --verbose

Enables logging on the console at the information level; Short form for --log-level=information

--log-level

Sets the log level for logging to the console, for example trace, debug, information, warning, or error. By default, nothing is logged to the console (none).

-d, --dry-run

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.

--pointer-size

Assumed pointer size (in bits); can be 32 or 64 (default value 32)

--compiler-defines

Comma-separated list of compiler defines to set