CLI Guide
Everything the GUI does is available from the command line, with no browser.
Every command accepts --json for machine-readable output.
The pages follow the order of a first project:
Configuration: set up the project with the guided setup or
config, and the variables of the build and deploy scripts.Creating and reading the workfile:
init,importandread.Devices: find a device and its bus,
addit, andrename,move,enable,disableordeletenodes.Properties:
read,list property,list valueandupdate.Validate, build and deploy:
validate,buildanddeploy.Scripting:
--jsonand use in scripts and CI.
Two more commands are described elsewhere: gui starts the GUI (see
Starting), and skill installs the skill of an AI agent (see
Working with AI Agents). Every command, with its options, is listed in
Commands.
The examples use a Raspberry Pi 4 with an ADXL345 accelerometer
(adi,adxl345) on its I2C bus i2c_arm: the project is in
~/work/rpi4-adxl345 and the Linux kernel tree in ~/linux. Outputs are
shortened where marked with ….
Getting help
analog-attach --help # the commands
analog-attach add --help # one command, with examples
analog-attach help add # the same
analog-attach --help --all # the help of every command
Naming nodes
Commands that take a node accept three forms:
Form |
Example |
Means |
|---|---|---|
Label |
|
The node with that label, in the base devicetree or the overlay. |
Label-first |
|
The child |
Absolute |
|
The node at that path. |
Write a label without &: i2c_arm, not &i2c_arm. A node path is one
argument, and a property is a separate argument: read accel reg, not
read accel/reg. list node shows every node with its path and labels.
Options can go anywhere after the command name, and --json anywhere on the
line. To pass a value that starts with - and a letter, put -- before
it: update accel label -- -x. Negative numbers need no --.