Package Manager
The CFS Package Manager allows you to retrieve, install, and manage SDKs, plugins, and toolchains directly from a remote server, enabling access to new features and updates independently of full IDE releases. For additional information see Install CFS components using the Package Manager.
Package remotes can be either managed or custom.
- Managed remotes are configured automatically by CodeFusion Studio.
- Custom remotes are user-defined remotes that you add manually.
Managed remotes cannot be deleted or edited, but you can enable or disable them. Additional managed remotes may be available when logged in with a myAnalog account or using an API key.
Add remote
cfsutil pkg add-remote <remote-name> <url>
Registers a new custom package server to retrieve packages from.
| Argument | Description |
|---|---|
<remote-name> |
The name used to identify the remote, such as myserver. This name is required to use other commands such as auth-remote, disable-remote, and delete-remote. |
<url> |
The URL of the package server. |
Example
cfsutil pkg add-remote myserver https://my.server.url
Note
CodeFusion Studio configures managed remotes automatically. If you log in with a myAnalog account, cfsutil can configure additional remotes for restricted content. To check the configured remotes, run cfsutil pkg list-remotes.
Authenticate remote
cfsutil pkg auth-remote <remote-name>
Configures authentication for a remote package server.
This command defines how cfsutil authenticates when accessing the specified remote, using either credentials you specify, or no authentication.
This command can only be used with custom remotes. Managed remotes authenticate automatically and cannot be configured with auth-remote.
| Argument | Description |
|---|---|
<remote-name> |
The name of the remote to authenticate. This must match a remote added using add-remote. |
| Flag | Description |
|---|---|
--user <username> |
Authenticate using a username. Prompts for a password if not provided. |
--password <password> |
Password, API key, or token for authentication. |
--none |
Disable authentication for the remote. |
Example
cfsutil pkg auth-remote myserver --user USERNAME --password PASSWORD
cfsutil pkg auth-remote myserver --none
Note
Some managed remotes obtain credentials automatically when you are logged in to myAnalog or have set the CFS_API_KEY environment variable with a valid API key. Run cfsutil myanalog status to check your session and cfsutil myanalog login to sign in, then run cfsutil pkg list-remotes to check which remotes are using managed credentials.
Delete
cfsutil pkg delete <pattern>
Deletes packages from the local cache.
Warning
Deleting a package permanently removes it from the local cache. To use a deleted package again, reinstall it using the cfsutil pkg install command.
| Argument | Description |
|---|---|
<pattern> |
A package pattern in the form <pkg_name>/<version>. Wildcards (*) allowed. |
Delete all unused packages
cfsutil pkg delete "*"
Note
Wrap the pattern in quotes to avoid issues with wildcard expansion.
Delete remote
cfsutil pkg delete-remote <remote-name>
Unregisters a custom package server so it is no longer considered for package retrieval.
| Argument | Description |
|---|---|
<remote-name> |
The name of the remote to delete. The <remote-name> should match the name provided using the add-remote command. |
Example
cfsutil pkg delete-remote myserver
Note
Managed remotes cannot be deleted. Use cfsutil pkg disable-remote <remote-name> if you want to prevent a managed remote from being used.
Enable remote
cfsutil pkg enable-remote <remote-name>
Enables a previously disabled remote package server.
| Argument | Description |
|---|---|
<remote-name> |
The name of the remote to enable. |
Example
cfsutil pkg enable-remote myserver
Disable remote
cfsutil pkg disable-remote <remote-name>
Disables a remote package server.
| Argument | Description |
|---|---|
<remote-name> |
The name of the remote to disable. |
Example
cfsutil pkg disable-remote myserver
View dependencies
cfsutil pkg dependencies <package-reference>
Retrieves a list of all the dependencies of a given package, including transitive dependencies. The package does not need to be installed.
| Argument | Description |
|---|---|
<package-reference> |
Package reference in the format pkg_name/version. |
Example
cfsutil pkg dependencies zephyr/4.3.0
Package information
cfsutil pkg info <package-reference>
Retrieves metadata for a given package. The package does not need to be installed.
| Argument | Description |
|---|---|
<package-reference> |
Package reference in the format pkg_name/version. |
| Flag | Description |
|---|---|
-f, --format |
Output format (JSON only) |
Example
cfsutil pkg info zephyr/4.3.0 -f=json
Install
cfsutil pkg install <reference> [-l|--local] [--acceptLicense]
Install a CFS package, including all its dependencies.
| Argument | Description |
|---|---|
<reference> |
Package reference (pkg_name/version) or path to a manifest file (for example, C:\Users\<username>\cfs\2.3.0\my-sample-workspace\.cfs\.cfsdependencies). |
| Flag | Description |
|---|---|
-l, --local |
Install packages from local cache only |
--acceptLicense |
Accept package license(s). Required for packages that include a license agreement. If not provided, you will be prompted interactively. |
Example
cfsutil pkg install zephyr/4.3.0
Install packages from a workspace manifest file
cfsutil pkg install /path/to/workspace/.cfs/.cfsdependencies
Version range syntax
The cfsutil pkg install command supports semantic versioning (SemVer) range expressions. Version ranges allow you to specify acceptable versions rather than a single fixed version.
CFS packages use the semantic version format: MAJOR.MINOR.PATCH.
Version range syntax limitations
The <packageName>/<version> format supports a single version token only. This can be:
- An exact version (for example,
2.1.0) - A caret range (
^2.0.0) - A tilde range (
~2.0.0) - A single comparison operator (
>=2.0.0)
Compound constraints (for example, >=2.0.0 <3.0.0), logical OR (||), and wildcard patterns (2.1.*) are only supported when installing packages from a manifest file.
Caret ranges (^)
Allows updates that do not change the major version (minor and patch updates are permitted). Package Manager installs the newest available version that satisfies the range.
Install plugins with ^2.0.0 - allows 2.0.1 through 2.x.x
cfsutil pkg install "cfs_base_plugins/^2.0.0"
Result: Installs cfs_base_plugins/2.3.0 (highest available version within major version 2).
Tilde ranges (~)
Allows only patch-level updates within the specified minor version.
Install latest patch version only
cfsutil pkg install "cfs_base_data_models/~2.0.0"
Result: Installs cfs_base_data_models/2.0.1 (highest 2.0.x version, does not include 2.1.0 or 2.3.0)
Comparison operators (>=, <=, >, <, =)
Allows explicit version constraints using comparison operators.
Greater than or equal to (>=)
cfsutil pkg install "cfs_base_plugins/>=2.0.0"
Result: Installs cfs_base_plugins/2.3.0 (highest available version greater than or equal to 2.0.0).
Less than (<)
cfsutil pkg install "cfs_base_plugins/<2.1.0"
Result: Installs cfs_base_plugins/2.0.1 (highest available version lower than 2.1.0).
Greater than (>)
cfsutil pkg install "cfs_base_data_models/>2.0.1"
Result: Installs cfs_base_data_models/2.3.0 (highest available version greater than 2.0.1).
Note
Version ranges must be enclosed in quotes to prevent shell interpretation of special characters.
Default behavior
Package versions follow semantic versioning in the form MAJOR.MINOR.PATCH with optional pre-release identifiers (for example, -b.1). When a version range is specified (for example, using caret ^, tilde ~, or comparison operators), Package Manager installs the newest available stable version that satisfies the constraint. For example, cfsutil pkg install "cfs_base_data_models/~2.0.0" installs the newest available 2.0.x version.
Pre-release versions
Pre-release versions follow the semantic versioning pre-release syntax and are not selected by default when resolving version ranges. They must be specified explicitly, so packageName/1.0.0-b.1 installs exactly that pre-release version.
Manifest files
In addition to installing individual packages, you can install multiple packages using a manifest file. Manifest files also support more advanced version expressions, such as compound constraints, which are not supported in the <packageName>/<version> format.
In CodeFusion Studio, you can find an example manifest file (called .cfsdependencies) in the workspace .cfs directory. For example: C:\Users\<username>\cfs\2.3.0\my-sample-workspace\.cfs\.cfsdependencies. The .cfsdependencies file is the standard workspace manifest used by CodeFusion Studio. You can also install packages from any manifest file that follows the same JSON format by providing its path to cfsutil pkg install.
This file specifies the packages and versions required by the workspace.
Example manifest file:
{
"version": 1,
"packages": [
{
"name": "msdk",
"version": "2.3.0"
},
{
"name": "cfs_base_data_models",
"version": "2.3.0"
},
{
"name": "cfs_base_plugins",
"version": "2.3.0"
}
]
}
The version field in a manifest file supports semantic version range syntax, including compound constraints.
Example:
{
"version": 1,
"packages": [
{
"name": "cfs_base_plugins",
"version": ">=2.0.0 <3.0.0"
}
]
}
Install the manifest file
cfsutil pkg install /path/to/workspace/.cfs/.cfsdependencies
Result: Installs the newest available version that satisfies the version constraint specified in the manifest file (for example, cfs_base_plugins/2.3.0).
Install from local cache
Use the -l or --local flag to install packages only from the local cache, without accessing remote repositories.
Scenario: You have previously installed the following plugin versions, which are now available in the local cache:
cfs_base_plugins/2.0.0cfs_base_plugins/2.1.0
You want to install a version from the local cache without checking for newer versions remotely.
Install a specific cached version
cfsutil pkg install cfs_base_plugins/2.0.0 --local
This installs exactly version 2.0.0 from the local cache.
Install the newest compatible cached version using a range
cfsutil pkg install "cfs_base_plugins/^2.0.0" --local
This installs the newest cached version that satisfies the range (for example, 2.1.0), without accessing remote repositories.
Install workspace dependencies from a manifest file using local cache only
cfsutil pkg install /path/to/workspace/.cfs/.cfsdependencies --local
This installs all required workspace packages from the local cache.
Note
The --local flag restricts installation to packages available in the local cache only. If no cached version satisfies the specified version or range, the installation fails.
List
cfsutil pkg list [<pattern>]
List installed packages.
| Argument | Description |
|---|---|
<pattern> |
Optional pattern to match package names and versions. Supports wildcards *. |
| Flag | Description |
|---|---|
-f, --filter=KEY=VALUE |
Optional filter on package metadata. If used multiple times, all conditions must be satisfied. |
Example
# List all installed packages
cfsutil pkg list
# Search for a package that supports MAX32690
cfsutil pkg list -f soc=MAX32690
# Search for a package that supports CodeFusion Studio version 2.0.0 and SDK
cfsutil pkg list -f cfsVersion=^2.0 -f type=sdk
Tip
The --filter option accepts metadata keys shown by the pkg info command.
List cache
cfsutil pkg list-cache [<pattern>] [--format text|json]
Lists all packages stored in the local cache, including those that are not currently installed.
| Argument | Description |
|---|---|
<pattern> |
Optional pattern to match package names and versions. Supports wildcards *. |
| Flag | Description |
|---|---|
--format=<format> |
Output format: text (default) or json |
Example
# List all cached packages
cfsutil pkg list-cache
# Search cached packages matching a pattern
cfsutil pkg list-cache "cfs_base*"
# List specific package versions in cache
cfsutil pkg list-cache "zephyr/4.*"
# Output as JSON
cfsutil pkg list-cache --format json
List remotes
cfsutil pkg list-remotes
Lists all remote servers that have been registered for package retrieval.
Example
┌────────────────┬───────────────────────────────────────────────────────┬──────────────────┬────────┬────────────────────┐
│ Name │ URL │ Auth │ Custom │ Status │
├────────────────┼───────────────────────────────────────────────────────┼──────────────────┼────────┼────────────────────┤
│ cfs-public │ https://conan.cloudsmith.io/adi/codefusion-public │ None │ No │ OK │
├────────────────┼───────────────────────────────────────────────────────┼──────────────────┼────────┼────────────────────┤
│ my-remote │ https://packages.example.com/ │ username: user1 │ Yes │ OK │
├────────────────┼───────────────────────────────────────────────────────┼──────────────────┼────────┼────────────────────┤
│ old-remote │ https://old-server.example.com/ │ N/A │ Yes │ Disabled │
└────────────────┴───────────────────────────────────────────────────────┴──────────────────┴────────┴────────────────────┘
Output fields
| Column | Description |
|---|---|
| Name | The name of the remote. |
| URL | The URL of the package server. |
| Auth | Shows the configured authentication method for the remote. This may be None, myAnalog session, username: <username>, or N/A for disabled custom remotes. |
| Custom | Indicates whether the remote is user-defined (Yes) or managed by CodeFusion Studio (No). |
| Status | The remote status. This may be OK, Disabled, or an error status if remote configuration fails. |
Local consumers
cfsutil pkg local-consumers <name>
Retrieves a list of all installed packages that depend on a given package, including transitive consumers.
This command is useful when attempting to uninstall a package, as it helps identify which other packages depend on it.
| Argument | Description |
|---|---|
<name> |
Name of the installed package. |
Example
cfsutil pkg local-consumers zephyr
Sample output
zephyr is not required by any other package
Search
cfsutil pkg search <pattern>
Retrieve packages available for install.
| Argument | Description |
|---|---|
<pattern> |
Search pattern in the format pkg_name/version. Use * as a wildcard. |
Example
cfsutil pkg search "zephyr*"
Note
Wrap the pattern in quotes to avoid issues with wildcard expansion.
Uninstall
cfsutil pkg uninstall <name>
Uninstalls a package. It remains in the local cache for reuse without re-downloading.
Warning
A package cannot be uninstalled if it is required by another installed package.
Use the local-consumers command to identify dependent packages that must be removed first.
| Argument | Description |
|---|---|
<name> |
Name of the installed package. |
Example
cfsutil pkg uninstall zephyr