Commands
Every command of analog-attach with the Linux backend, with its arguments
and options. The task-oriented guide is CLI Guide; the --json
output of each command is summarized in JSON protocol.
analog-attach <command> --help prints the same information with examples,
and analog-attach --help --all prints the help of every command.
Conventions
<path>is a node: a label (accel), a label then child names (i2c_arm/adxl345@1d) or an absolute path (/soc/i2c@7e804000). See Naming nodes.[…]is optional. Options can be given anywhere after the command name, and an option’s value either as the next argument or after=(--parent=i2c_arm).--ends the options: every argument after it is a positional.
Options of every command
Option |
Meaning |
|---|---|
|
Anywhere on the line: write one line of JSON to standard output, and ask nothing (JSON protocol). |
|
Print the command’s help and do nothing else. |
|
As the first argument: print the version. |
|
Print the help of every command. |
analog-attach (no command)
analog-attach
On a terminal, the guided setup: chooses the backend, checks the tools, asks
for the Linux tree, the base devicetree and the workfile name, builds the
binding caches and runs init. Piped, or with --json, it prints the usage
and the required settings still unset.
Guide: Configuration.
config
analog-attach config [<key>]
analog-attach config <key> <value> [--global]
analog-attach config <key> --reset [--global]
analog-attach config --reload
analog-attach config var [<NAME>]
analog-attach config var <NAME> <value>
analog-attach config var <NAME> --secret
analog-attach config var <NAME> --reset
Shows the settings, sets or resets one, rebuilds the binding caches, and shows
or sets the variables of the build and deploy commands. Setting linux also
builds the binding caches.
Argument or option |
Meaning |
|---|---|
|
A setting: |
|
The value to set. Omit it to show the setting. |
|
Set or reset in the global settings file, not the project’s. |
|
Remove the setting: back to its default, or unset. |
|
Rebuild the binding caches. Takes no other argument. |
|
The variables: system ( |
|
With |
Guide: Configuration. Settings: Configuration file.
init
analog-attach init [--restore build|deploy]
Creates the workfile when it doesn’t exist, empty, and keeps it when it does.
Writes the starter scripts aa_build.sh and aa_deploy.sh in the project
folder when they aren’t there, and sets the project variables the deploy
starter uses (BOARD_IP, BOARD_USER, BOARD_PASSWORD) that the
project doesn’t have. Needs linux, devicetree and workfile set. Never
asks.
Option |
Meaning |
|---|---|
|
Write that starter script again, over the file. Needs nothing else configured. |
import
analog-attach import <source>
Creates a workfile from an overlay of the Linux tree (a name from list
overlay) or from an overlay file, and makes it the configured workfile. The
fragments are imported as written; __overrides__ is dropped; targets and
references the base doesn’t have are listed as warnings.
add
analog-attach add <compatible> [--parent <path>] [--name <name>] [--label <label>]
[--template <template>] [--dry-run] [--quiet]
Adds a device node to the overlay. On a terminal, asks for the parent when
--parent is missing, then for the required properties still missing;
otherwise lists them.
Argument or option |
Meaning |
|---|---|
|
The device’s compatible string ( |
|
The parent node. Default: the first bus |
|
The node name. |
|
The node’s label. Default: one made from the compatible. |
|
|
|
Show the node, write nothing, ask nothing. |
|
Don’t ask for the missing properties; list them. |
Guide: Devices.
read
analog-attach read [<path>] [<property>] [--quiet]
Without a path, prints the whole overlay. With a path, prints the node (from the base and the overlay) and the required properties it lacks. With a property, prints its value with the binding’s description, allowed values and suggestions.
Option |
Meaning |
|---|---|
|
Print only the values. |
update
analog-attach update <path> <property> [<value>...] [--suggest] [--quiet]
Sets a property, replacing its value. Without a value, sets a flag, or reads
the property when it has a value. When <property> names a child node of
the binding (channel@0), creates the child, or reads it when it exists.
Setting reg also renames the node’s unit address.
Argument or option |
Meaning |
|---|---|
|
Numbers, macros, labels or words; several values make an array, |
|
List what the property can be set to, as |
|
When reading: print only the value. When creating a child node: don’t ask. |
Guide: Properties.
delete
analog-attach delete [<path>] [<property>] [--force]
Removes a property, or a node, from the overlay. A node with children, and the
whole overlay (no path), are only previewed without --force. Nodes of the
base devicetree can’t be deleted.
Option |
Meaning |
|---|---|
|
Delete a node that has children, or the whole overlay. |
Guide: Devices.
rename
analog-attach rename <path> <new-name>
Renames a node the overlay adds. A name without @ keeps the unit address;
one with @ changes it, and reg follows.
Guide: Devices.
list
analog-attach list devices [<filter>]
analog-attach list context [<filter>]
analog-attach list property [<path>] [<property>]
analog-attach list value <path> <property>
analog-attach list parent <compatible>
analog-attach list overlay [<compatible>]
analog-attach list node [<filter>]
Command |
Lists |
|---|---|
|
The compatible strings of the Linux tree’s bindings, with their category. With a filter, those that contain it; when only one matches, or the filter is a compatible, that device’s binding. |
|
The base devicetrees ( |
|
Without a path: the overlay’s nodes. With a path: the properties the node’s binding defines, marked set and required, and its child-node patterns. With a property: its type, description and constraints. |
|
The values a property can be set to, each ready for |
|
The nodes a device can be added under, by label, then path. |
|
The overlays of the Linux tree that add the device, and whether they fit the board. Without a compatible, every overlay. |
|
Every node of the base with the overlay applied, with its labels and
compatibles, tagged |
list alone prints this usage.
Guide: Devices, Properties, Configuration.
move
analog-attach move <path> <destination>
Moves a node the overlay adds under another parent. A parent the node’s binding doesn’t allow is refused.
Guide: Devices.
enable, disable
analog-attach enable <path>
analog-attach disable <path>
Sets the node’s status to "okay" or "disabled" in the overlay. When
the node already has that status without the overlay, the overlay’s
status is removed instead.
Guide: Devices.
validate
analog-attach validate [--full]
Runs dt-validate on the nodes the overlay writes, and checks addresses, chip selects, references and disabled parents. Exits with 0 whatever it finds.
Option |
Meaning |
|---|---|
|
Also validate the base devicetree with the overlay applied, reporting what the overlay adds or sets and counting the base’s own findings. |
Guide: Validate, build and deploy.
build
analog-attach build
Runs AA_BUILD (default ./aa_build.sh) in the project folder. The
starter script compiles the overlay with dtc into
<build-dir>/<overlay>.dtbo. With config output devicetree, build
first writes and preprocesses the base with the overlay applied, and the script
compiles it into a .dtb. Doesn’t validate.
Guide: Validate, build and deploy.
deploy
analog-attach deploy
Runs AA_DEPLOY (default ./aa_deploy.sh) in the project folder, with
the project’s secrets in its environment. The starter script copies the
.dtbo to a Raspberry Pi running Kuiper over SSH, adds it to
config.txt and reboots the board. On a terminal, asks for a secret the
environment doesn’t give.
Guide: Validate, build and deploy.
completion
analog-attach completion [<shell>] [--install | --uninstall]
Prints the shell completion script for bash, zsh or fish (default:
the shell $SHELL names), or installs or removes it.
Option |
Meaning |
|---|---|
|
Install the script where the shell loads it, in your home folder. |
|
Remove the installed script. |
Guide: Shell completion.
gui
analog-attach gui [--port <port>] [--server-only]
Opens the GUI for the project in the current folder, in the browser. Serves it
on 127.0.0.1 until stopped with Ctrl-C.
Option |
Meaning |
|---|---|
|
The port. Default: 5177, or the next free one; |
|
Serve the page without opening the browser. |
Guide: GUI Guide.
skill
analog-attach skill install [<name>] [--agent <agent>] [--force]
analog-attach skill uninstall [<name>] [--agent <agent>]
Installs or removes the backend’s skill for an AI agent. The Linux backend’s
skill is analog-attach-linux. Without a name, lists the skills and whether
each is installed.
Option |
Meaning |
|---|---|
|
|
|
Install over an installed copy. |
Guide: Working with AI Agents.