AccordionQ2.Shell
1.1.2
dotnet tool install --global AccordionQ2.Shell --version 1.1.2
dotnet new tool-manifest
dotnet tool install --local AccordionQ2.Shell --version 1.1.2
#tool dotnet:?package=AccordionQ2.Shell&version=1.1.2
nuke :add-package AccordionQ2.Shell --version 1.1.2
AccordionWebApiShell
A command-line REPL shell for interacting with an Accordion Q2 device over its REST WebApi.
Requirements
- An Accordion Q2 device accessible over HTTP (e.g.
http://192.168.1.100) - .NET 8 runtime
Install
Install as a .NET global tool (requires .NET 8 runtime):
dotnet tool install -g AccordionQ2.Shell
Update to the latest version:
dotnet tool update -g AccordionQ2.Shell
Build
dotnet build AccordionWebApiShell.csproj
Usage
Pass an initial command on the command line, or launch with no arguments to enter the interactive REPL:
accordion init -h http://192.168.1.100
In REPL mode, type help for quick syntax or docs for comprehensive documentation.
Use exit to quit.
Commands
init — Connect to a device
Must be run before any other command.
| Option | Short | Required | Description |
|---|---|---|---|
--host |
-h |
Yes | Device URL, e.g. http://192.168.1.100 |
--notification |
-n |
No | Subscribe to notification events (placeholder) |
--telemetry |
-t |
No | Subscribe to telemetry events (placeholder) |
init -h http://192.168.1.100
list — List all channels and current values
| Option | Short | Description |
|---|---|---|
--filter |
-f |
Regex filter applied to channel aliases |
--disabled |
-d |
Include disabled channels in the output |
list
list -f "^Voltage"
list -d
get — Read a channel value
The channel argument accepts an exact alias, net name, or a regex pattern.
| Option | Short | Description |
|---|---|---|
--channel |
-c |
Channel alias, net name, or regex |
--samples |
-s |
Number of samples to capture (default: 1) |
--detailed |
-d |
Show per-sample network timing |
get -c VoltageIn
get -c "Volt.*" -s 5 -d
set — Write a value to a channel
| Option | Short | Description |
|---|---|---|
--channel |
-c |
Channel alias or net name |
--value |
-v |
Value to write |
set -c OutputEnable -v 1
set -c ReferenceVoltage -v 3.3
wait — Poll a channel until it reaches an expected value
| Option | Short | Description |
|---|---|---|
--channel |
-c |
Channel alias or net name |
--value |
-v |
Expected value to wait for |
--timeout |
-t |
Timeout in milliseconds (default: 1000) |
wait -c SystemStatus -v Ready -t 5000
reset — Reset the Accordion system
reset
module — List, load, and unload modules
Without --module, lists all available and currently loaded modules.
| Option | Short | Description |
|---|---|---|
--module |
-m |
Module name to load or unload |
--rename |
-r |
Clone module under a new name before loading |
--key |
-k |
Initial-data key to override (paired with --value) |
--value |
-v |
Initial-data value (paired with --key) |
--deactivate |
-d |
Unload the module (default: load) |
module
module -m SignalGenerator
module -m SignalGenerator -d
module -m SignalGenerator -r MySigGen -k Frequency -v 1000
conf — Configure a channel property
| Option | Short | Description |
|---|---|---|
--channel |
-c |
Channel alias or net name |
--parameter |
-p |
Property to set: Alias, Direction, ChannelType, Description, Unit, GroupName, DeviceName, Enabled |
--value |
-v |
New value for the property |
Without --parameter, prints the current channel configuration.
conf -c VoltageIn
conf -c VoltageIn -p Alias -v "Input Voltage"
conf -c VoltageIn -p Enabled -v false
alias — Manage alias/config files on the device
Lists available alias files on the device when run without options.
| Option | Short | Description |
|---|---|---|
--upload |
-u |
Path to a local file to upload (does not activate) |
--download |
-d |
Name of a device file to download locally |
--activate |
-a |
Name of a device file to activate |
alias
alias -u ./my-config.json
alias -a default.json
alias -d default.json
media — Manage media files on the device
Lists available media files on the device when run without options.
| Option | Short | Description |
|---|---|---|
--upload |
-u |
Upload the file at --path to the device |
--download |
-d |
Download the device file named --name to --path |
--remove |
-r |
Remove the device file named --name |
--path |
-p |
Local file path (used with upload/download) |
--name |
-n |
Device file name (used with download/remove) |
media
media -u -p ./tone.wav
media -d -n tone.wav -p ./downloaded.wav
media -r -n tone.wav
num — Numeric result acquisition
Without --target, lists all available NumericResult channels and the possible target channels for the selected (or first) NumericResult channel. With --target, triggers an acquisition and prints statistics.
| Option | Short | Description |
|---|---|---|
--channel |
-c |
NumericResult channel alias or net name (default: first available) |
--target |
-t |
Target analog channel to sample |
--samples |
-s |
Number of samples to acquire (default: 10) |
--bins |
-b |
Number of histogram bins (default: 10) |
--histogram |
-h |
Print a histogram after acquisition |
--full |
-f |
Show extended statistics including std dev |
num
num -t VoltageIn
num -t VoltageIn -s 1000
num -t VoltageIn -s 1000 -h -b 20
num -c MyNumCh -t VoltageIn -f
docs — Browse command documentation
Reads Markdown files from a docs/ folder next to the executable.
| Option | Short | Description |
|---|---|---|
[command] |
Command name to look up (omit for index) | |
--pager |
-p |
Enable pager mode for long output |
docs
docs init
docs conf -p
exit — Exit the shell
exit
Dependencies
| Package | Version | Description |
|---|---|---|
AccordionQ2.WebApiClient |
5.2.0 | REST API client for Accordion Q2 |
CommandLineParser |
2.9.1 | Verb-based CLI argument parsing |
Spectre.Console |
0.53.1 | Rich terminal output: tables, spinners, markup |
Target matrix
| Framework | RID | Self-contained |
|---|---|---|
net8.0 |
(none — runs on any OS with .NET 8 runtime) | No |
net48 |
win-x86 |
Yes |
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
This package has no dependencies.