AccordionShell — CLI Tool Guide
Source:
accordionpilot/submodules/shell/docs/(separate repository: accordionpilot) Full per-verb docs are linked from each section below.
What is AccordionShell?
AccordionShell is a .NET global tool CLI that provides full control of an Accordion device from a terminal. Every operation available in the GUI is also available as a shell verb, making it ideal for scripting, automation, and CI pipelines.
Installation
dotnet tool install -g AccordionQ2.Shell
# Update
dotnet tool update -g AccordionQ2.Shell
# Uninstall
dotnet tool uninstall -g AccordionQ2.Shell
Prerequisites: .NET 8.0 SDK or later.
Usage
accordionshell [verb] [options]
Run without arguments to enter interactive mode — commands are read from stdin, and help lists all verbs.
Built-in Documentation System
Every verb ships with rich terminal documentation:
accordionshell docs # index of all verbs
accordionshell docs init # detailed guide for the init verb
accordionshell docs i2c --pager # paginated output for long docs
The --help flag gives quick syntax; docs <verb> gives the full guide with examples.
Verb Reference
Connection
init — Connect to a device
init --host <hostname_or_ip> [--notification] [--telemetry]
| Option | Short | Description |
|---|---|---|
--host |
-h |
Hostname or IP of the Accordion device |
--notification |
-n |
Enable notification events |
--telemetry |
-t |
Enable telemetry events |
init --host agent64.local
init -h 192.168.0.222 -n -t
exit — Disconnect and close
exit
Channel Operations
list — List channels
list [--filter <regex>] [--disabled]
list # all enabled channels
list --disabled # include disabled channels
list --filter "VOLTAGE.*" # filter by name pattern
get — Read a channel value
get --channel <name> [--samples N] [--interval ms] [--detailed] [--log-file path]
| Option | Short | Default | Description |
|---|---|---|---|
--channel |
-c |
required | Channel net name or alias |
--samples |
-s |
1 | Number of samples |
--interval |
-i |
0 | Delay between samples (ms) |
--detailed |
-d |
false | Show detailed network timing |
--log-file |
-l |
— | CSV file to append latency data |
get -c "VOLTAGE_SENSOR_1"
get -c "ADC_CH0" -s 1000 --detailed
get -c "TEMPERATURE" -s 100 -i 100 -l latency.csv
set — Write a channel value
set --channel <name> --value <value>
set -c "GPIO_PIN_5" -v "1"
set -c "DAC_OUTPUT" -v "2.5"
set -c "MODE_SELECT" -v "AUTO"
conf — Configure channel properties
conf --channel <name> [--parameter <prop>] [--value <val>]
Configurable parameters: Alias, Direction, ChannelType, Description, Unit, GroupName, DeviceName, Enabled
conf -c "ADC_CH0" # list all properties
conf -c "ADC_CH0" -p "Enabled" -v "true"
conf -c "ADC_CH0" -p "Alias" -v "VoltageMonitor"
wait — Wait for a channel to reach a value
wait --channel <name> --value <expected> [--timeout ms]
wait -c "READY_FLAG" -v "1"
wait -c "STATUS" -v "IDLE" --timeout 5000
Bus Operations
i2c — I2C transactions
i2c --channel <ch> [--address <addr>] [--scan] [--write] [--read] [--data <bytes>] [--length N]
i2c -c "I2C_BUS_1" --scan
i2c -c "I2C_BUS_1" -a 0x50 -w -d 0x00 0xFF
i2c -c "I2C_BUS_1" -a 0x50 -r -l 16
Numeric Analysis
num — Statistical sampling
num --target <channel> [--channel <nr-ch>] [--samples N] [--bins N] [--histogram] [--full]
| Option | Short | Default | Description |
|---|---|---|---|
--target |
-t |
required | Analog channel to sample |
--channel |
-c |
first available | NumericResult channel to use |
--samples |
-s |
10 | Sample count |
--bins |
-b |
10 | Histogram bins |
--histogram |
-h |
false | Show histogram |
--full |
-f |
false | Show full statistics |
num -t "VOLTAGE_SENSOR" -s 1000 -f
num -t "TEMPERATURE" -s 500 -h -b 20
Module Management
module — Load / unload / configure modules
module [--module <name>] [--file <path>] [--rename <new>] [--key <k>] [--value <v>] [--deactivate]
module # list all modules
module --module "PMBus_Engine" # load
module --module "MyModule" --rename "Clone" # clone and load
module --module "MyModule" --deactivate # unload
module --module "M" --key "Port" --value "5" # change InitialData before loading
Alias Files
alias — Manage alias configuration files
alias [--upload <path>] [--download <name>] [--activate <name>]
alias # list available alias files
alias --upload ./my_aliases.config # upload (does not activate)
alias --activate my_aliases.config # activate uploaded file
alias --download default.config # download to local disk
Media Files
media — Manage media files
media [--channel <ch>] [--upload] [--download] [--remove] [--activate] [--path <path>] [--name <name>]
media # list media files
media --upload --path ./sound.wav # upload file
media --activate --name sound.wav -c AUDIO_OUT # activate on channel
media --download --name sound.wav -p ./local.wav # download
media --remove --name old.wav # delete
System
reset — Reset the hardware engine
reset
Sends a reset command and reports completion time (e.g. Reset done, took 234.56 ms).
docs — Show built-in documentation
docs [verb] [--pager]
Typical Scripting Workflow
# Connect
accordionshell init --host agent64.local
# Check connection
accordionshell list --filter "Connection.*"
# Sample a voltage 100 times and save latency stats
accordionshell get -c "0.ESH10000590.ADC_CH0" -s 100 -l voltages.csv
# Configure a channel
accordionshell conf -c "0.ESH10000590.ADC_CH0" -p "Alias" -v "VDD_3V3"
# Wait for a flag
accordionshell wait -c "TEST_COMPLETE" -v "1" --timeout 30000
# Reset
accordionshell reset