Overview
AccordionShell is a command-line interface (CLI) tool for interacting with Accordion hardware systems. It provides a comprehensive set of commands (called "verbs") to initialize connections, configure channels, perform I2C transactions, manage modules, handle media files, and more.
Installation
AccordionShell is distributed as a .NET global tool. Install it using the .NET CLI:
dotnet tool install -g AccordionQ2.Shell
To update to the latest version:
dotnet tool update -g AccordionQ2.Shell
To uninstall:
dotnet tool uninstall -g AccordionQ2.Shell
Prerequisites:
-
.NET 8.0 SDK or later installed on your system
-
Network access to connect to Accordion hardware devices
Quick Start
Running AccordionShell
After installation, run the tool from any directory:
accordionshell [verb] [options]
Or run interactively:
accordionshell
When run without arguments, AccordionShell enters interactive mode where you can type commands and see help for available commands.
Basic Workflow
-
Initialize Connection: Connect to an Accordion hardware device
Bashinit --host <hostname_or_ip> -
List Channels: View available channels
Bashlist -
Get/Set Values: Read or write channel values
Bashget --channel <channel_name> set --channel <channel_name> --value <value> -
Exit: Close the application
Bashexit
Available Commands (Verbs)
AccordionShell organizes functionality into distinct commands called "verbs". Each verb has its own set of options and use cases.
Core Commands
-
init - Initialize connection to Accordion hardware
-
list - List all channels and their values
-
get - Get channel values with performance metrics
-
set - Set channel values
-
reset - Reset the Accordion system
-
exit - Exit the application
-
docs - View comprehensive command documentation
Channel Configuration
-
conf - Configure channel properties
-
wait - Wait for a channel to reach a specific value
-
alias - Manage alias configuration files
Module Management
-
module - Load, unload, and manage modules
Bus Operations
-
i2c - Perform I2C transactions (read, write, scan)
Data Analysis
-
num - Work with numeric result channels and statistical analysis
Media Management
-
media - Upload, download, and manage media files
Common Options Patterns
Channel Selection
Many commands accept a --channel or -c option to specify which channel to operate on:
get --channel "VOLTAGE_SENSOR_1"
set --channel "GPIO_PIN_5" --value "1"
File Paths
Commands that work with files typically use --path or -p for local file locations:
media --upload --path "C:\media\audio.wav"
Regular Expression Filtering
Some commands support regex filtering with the --filter or -f option:
list --filter "VOLTAGE.*"
Configuration Files
AccordionShell works with several types of configuration files:
-
Alias Files: Channel name mappings (
.xmlor.config) -
Module Settings: Module configuration files
-
Media Files: Audio, video, and image files
Tips and Best Practices
Interactive Mode
For rapid testing and exploration, use interactive mode:
-
Run
accordionshellwithout arguments -
Type
helpto see available commands -
Type a command name for quick syntax
-
Type
docsto see comprehensive documentation -
Commands persist the connection state between invocations
Batch Operations
For automation, use command-line arguments:
accordionshell init --host 192.168.1.100
accordionshell set --channel "ENABLE_PIN" --value "1"
accordionshell get --channel "STATUS_REG"
Or chain commands in scripts:
# PowerShell example
accordionshell init --host 192.168.1.100
if ($LASTEXITCODE -eq 0) {
accordionshell get --channel "STATUS" --samples 100
}
Error Handling
-
All errors are displayed in red text
-
Connection issues are reported immediately
-
Use
resetcommand to recover from error states
Performance Monitoring
Many commands report execution time:
get --channel "SENSOR" --samples 1000
# Shows: Average duration, Min/Max duration, Total duration
Command Reference
For detailed information about each command, see the individual documentation pages linked above.
Examples
Example 1: Basic Channel Operations
# Connect to hardware
init --host accordion-dev-01
# List all enabled channels
list
# Get a value
get --channel "TEMPERATURE_1"
# Set a value
set --channel "LED_CONTROL" --value "ON"
# Wait for a condition
wait --channel "READY_FLAG" --value "1" --timeout 5000
Example 2: I2C Device Communication
# Initialize connection
init --host 192.168.1.50
# Scan I2C bus
i2c --channel "I2C_BUS_1" --scan
# Write to I2C device
i2c --channel "I2C_BUS_1" --address 0x50 --write --data 0x00 0xFF
# Read from I2C device
i2c --channel "I2C_BUS_1" --address 0x50 --read --length 4
Example 3: Module Management
# List available and loaded modules
module
# Load a module with initial data
module --module "CustomModule" --key "Setting1" --value "Value1"
# Load with renamed instance
module --module "BaseModule" --rename "CustomInstance"
# Unload a module
module --module "CustomModule" --deactivate
Example 4: Numeric Analysis
# Capture and analyze samples
num --target "VOLTAGE_RAIL_1" --samples 10000 --histogram --bins 20
# Get full statistical results
num --target "CURRENT_SENSE" --samples 5000 --full
Example 5: Configuration and Aliases
# Upload and activate an alias file
alias --upload "production_aliases.xml"
alias --activate "production_aliases.xml"
# Configure a channel
conf --channel "VOLTAGE_SENSOR" --parameter "Alias" --value "VDD_CORE"
conf --channel "GPIO_5" --parameter "Direction" --value "OUT"
Version Information
This documentation is for AccordionShell distributed as the AccordionQ2.Shell .NET global tool.
Current Target Framework: .NET 8.0 or later
To check your installed version:
dotnet tool list -g | findstr AccordionQ2.Shell
Support
For issues, questions, or feature requests, please contact the development team or refer to the project repository.
Additional Resources
-
Use
accordionshell docsto view the documentation index from within the tool -
Use
accordionshell docs <command>to view detailed documentation for a specific command -
Use
accordionshell <command> --helpfor quick syntax reference