Provides guidance on using the CFSUtil command-line tool for CodeFusion Studio. USE FOR cfsutil commands, generating code from .cfsconfig files, generating workspace configuration files and creating CFS workspaces, regenerating projects in a workspace, listing, querying, or exporting SoC data models, installing and managing packages and SDKs, analyzing and querying ELF files, building, profiling, and checking compatibility of AI models, generating workspaces from AI models, updating or restoring the SoC catalog, device tree parsing, pulling Docker images, myAnalog authentication including API keys (creating, listing, and revoking a myAnalog apikey) for headless CI/CD and non-interactive login, serial port info, listing and running workspace tasks, and listing available CFS plugins (with IDs and configuration options).
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Um comando direto ignora o prompt de revisão. Verifique a origem antes de executá-lo.
Instruções da origem · Visualização somente leitura
name
cfs-cli
description
Provides guidance on using the CFSUtil command-line tool for CodeFusion Studio. USE FOR cfsutil commands, generating code from .cfsconfig files, generating workspace configuration files and creating CFS workspaces, regenerating projects in a workspace, listing, querying, or exporting SoC data models, installing and managing packages and SDKs, analyzing and querying ELF files, building, profiling, and checking compatibility of AI models, generating workspaces from AI models, updating or restoring the SoC catalog, device tree parsing, pulling Docker images, myAnalog authentication including API keys (creating, listing, and revoking a myAnalog apikey) for headless CI/CD and non-interactive login, serial port info, listing and running workspace tasks, and listing available CFS plugins (with IDs and configuration options).
CFSUtil CLI Reference
CFSUtil (cfsutil) is the CodeFusion Studio command-line utility. It provides access to CFS functionality from a terminal.
Alias:cfs works as an alias for all cfsutil commands.
Access: Run from the CFS Terminal in VS Code (recommended) or from the system path:
List available AI backends and supported hardware. Use -n/--name <backend> to show details for a single backend.
cfsutil ai build
Compile a model into C/C++ source using a .cfsconfig file or CLI flags.
cfsutil ai clean-cache
Clear the cache of remotely downloaded files.
cfsutil ai compat
Check model compatibility with a target SoC and core.
cfsutil ai model
Add, list, update, and remove AI models within a workspace.
cfsutil ai profile
Profile model resource usage before deployment.
cfsutil ai workspace create
Generate a workspace from an AI model file.
Common flags: --search-path / -x (additional data model directory, repeatable) — accepted by build, compat, and profile. ai workspace create uses -s instead. Not all flags apply to every subcommand.
cfsutil ai backends list # List all backends and supported hardware
cfsutil ai backends list --name tflm # Details for a single backend
cfsutil ai build --soc MAX32690 --core CM4 --model model.tflite
cfsutil ai compat --soc MAX32690 --core CM4 --model model.tflite
cfsutil ai profile --soc MAX32690 --core CM4 --model model.tflite
Catalog commands (cfsutil catalog)
Update or restore the local SoC metadata catalog.
cfsutil catalog update # Update to latest online version (requires myAnalog login)
cfsutil catalog restore # Restore the original installed version
CFS Plugins commands (cfsutil cfsplugins)
List available CFS plugins with their IDs, versions, and configuration options. Filter by SoC, board, or service type.
cfsutil cfsplugins list --soc <SOC>
Device Tree commands (cfsutil dt)
Parse and work with device tree files.
cfsutil dt parse <FILEPATH>
Docker commands (cfsutil docker)
Pull Docker images used by CFS toolchains.
cfsutil docker pull <IMAGE> # Pull an image
cfsutil docker pull <IMAGE> -u # Pull even if it already exists locally
cfsutil docker pull <IMAGE> -n # Do not use credentials when pulling
cfsutil docker pull <IMAGE> -q # Suppress pull output
Authenticate with a myAnalog account for package access and catalog updates.
cfsutil myanalog login
cfsutil myanalog logout
cfsutil myanalog status
API keys (cfsutil myanalog apikey)
API keys authenticate cfsutil without an active myAnalog session — useful in continuous integration and continuous delivery (CI/CD) and scripted environments. Set the CFS_API_KEY environment variable to the key value to use it. Creating, listing, and deleting keys require an active myAnalog session (run cfsutil myanalog login first).
Command
Description
cfsutil myanalog apikey create
Create an API key. The key value appears once — save it immediately. Flags: --description <value> (optional label), --format json|text.
cfsutil myanalog apikey list
List API keys with the ID, masked value, and expiration date of each key. Flag: --format json|text.
cfsutil myanalog apikey delete <APPKEY>
Delete an API key by ID (shown in apikey list). Flag: --format json|text.
List all available SoCs. Supports -f json, -v, -s <search-path>.
cfsutil socs info <SOC>
Details for a specific SoC. Flags: --boards, --cores, --packages, --docs, --format json.
cfsutil socs export <SOCNAME>
Export the SoC data model as JSON. Flags: -p <package>, -o <file>, -i <indent>, -m (minify), --gzip, -v <version>.
cfsutil socs list -f json
cfsutil socs info MAX32690 --boards --packages --cores
cfsutil socs export max32690 -p WLP -o model.json
Tasks commands (cfsutil tasks)
List and run tasks defined for a CFS workspace. The --workspace flag defaults to the current directory, so bare commands only work when run from a generated workspace (or one of its project directories). Pass --workspace explicitly to run from anywhere.
Command
Description
cfsutil tasks list
List tasks for a workspace. Flags: -w/--workspace, -p/--project, -v (also show each task's command).
cfsutil tasks run <task>
Run a task by label. Flags: -w/--workspace, -p/--project, -v, -c/--capture (capture serial output; requires --port and --project), --port, -z/--zephyrTraceFile.
cfsutil tasks list # uses the current directory as the workspace
cfsutil tasks list --workspace <path> # specify the workspace explicitly
cfsutil tasks run build # run the "build" task from the current directory
cfsutil tasks run build -w <path> -p <project> # run within a specific workspace/project
cfsutil tasks run flash_run_JLink -w <path> -p <project> --capture --port COM4
Workspace commands (cfsutil workspace)
Create a CFS workspace either in two steps — generate a workspace configuration file, then create the workspace from it — or in a single workspace create call that takes the parameters directly (see One-step alternative below).
Step 1 — Discover SoC details
cfsutil socs list # Find SoC name and packages
cfsutil socs info <SOC> --boards --packages --cores # Find board, package, and core values
cfsutil cfsplugins list --soc <SOC> # Find template IDs
Specify the target with --board, --package, or both — at least one is required. With --board <BOARD>, the package is inferred from the board; with --package <PACKAGE>, the target is identified directly. Supplying both is also valid and is used together for template validation:
One-step alternative — create directly from command-line arguments
workspace create also accepts the workspace parameters directly, skipping the separate configure step. Use this when you do not need a reusable .cfsworkspace config file:
--soc, --board, --template-id, --name, and -o/--output are all required for the one-step form. --package is optional — it is inferred from the SoC and board when omitted. This form is mutually exclusive with -i/--input: pass the parameters directly for a new workspace, or pass -i for the two-step flow, but not both. Unlike workspace configure, create takes a single workspace-level template and has no --core flag; use the two-step flow for multi-core projects.
Flag
Description
-i/--input=<path>
Path to an existing .cfsworkspace file (the two-step flow above).
-o/--output=<path>
Output path for the new workspace (excluding the workspace name).
--name=<value>
Name for the new workspace.
--soc=<value>
SoC name.
--board=<value>
Board name.
--package=<value>
Package name.
--template-id=<value>
Template ID.
--template-version=<value>
Template version.
-s/--search-path=<path>
Additional search path for templates and data models (repeatable).
When multiple .cfsconfig files exist in .cfs/, auto-discovery can select the wrong file. Pass --config <path> where supported. For commands without --config, keep alternate configurations outside .cfs/ or give them names that do not end in .cfsconfig, then copy the desired configuration to .cfs/<soc>-<package>.cfsconfig before running the command.