docs - Documentation Viewer
Description
The docs command displays comprehensive documentation for AccordionShell commands. It provides a formatted, easy-to-read view of command syntax, options, examples, and detailed explanations. You can view either an index of all available commands or detailed documentation for a specific command.
Syntax
docs [command] [options]
Parameters
| Parameter | Required | Description |
|---|---|---|
command |
No | Specific command to show documentation for. Omit to show the documentation index. |
Optional Options
| Option | Short | Description | Default |
|---|---|---|---|
--pager |
-p |
Enable pager mode for long documentation (press any key to continue after each page) | false |
Examples
View Documentation Index
Shows a complete list of all available commands with brief descriptions:
docs
View Specific Command Documentation
docs init
docs pmbus
docs i2c
Use Pager Mode for Long Documentation
Useful for lengthy documentation that doesn't fit on one screen:
docs pmbus --pager
docs -p firmware
Available Commands
The following commands have comprehensive documentation available:
alias- Manage alias configuration filesaudio- Generate audio signal filesconf- Configure channel propertiesdiscover- Discover Accordion systems on the networkdocs- Documentation viewer (this command)exit- Exit the applicationfirmware- Update firmware and manage servicesgeneral- General operations including Python wrapper generationget- Get channel values with performance metricsi2c- Perform I2C bus operationsinit- Initialize connection to Accordion hardwarelist- List all channels and their valuesmedia- Upload, download, and manage media filesmodule- Load, unload, and manage modulesnum- Work with numeric result channelspmbus- Program and manage PMBus devicesreset- Reset the Accordion systemset- Set channel valuesstream- Handle byte stream channelswait- Wait for channel value conditions
Output Format
Documentation is rendered with formatted markdown including:
- Headers - Color-coded by level (H1: yellow, H2: cyan, H3: green)
- Code blocks - Syntax-highlighted command examples
- Tables - Formatted option tables and data grids
- Lists - Bullet points and numbered lists
- Emphasis - Bold and italic text for important information
Pager Mode
When using --pager mode:
- Documentation displays one screen at a time
- Press any key to continue to the next page
- Press 'q' to quit viewing and return to the prompt
- Useful for long documentation files that exceed screen height
Behavior
- Checks if the
docsdirectory exists in the application folder - If no command is specified, displays the documentation index (
as-index.md) - If a command is specified, looks for the corresponding
as-<command>.mdfile - Renders the markdown content with formatting and color
- If pager mode is enabled, pauses after each screen-full of content
- If documentation is not found, displays list of available commands
Documentation Files
Documentation files are located in the docs subdirectory of the application and follow the naming convention:
as-<command>.md
For example:
as-init.md- Documentation for theinitcommandas-pmbus.md- Documentation for thepmbuscommandas-index.md- Documentation index (shown when no command specified)
Quick Help vs. Comprehensive Documentation
AccordionShell provides two levels of help:
| Method | Command | Content | Use Case |
|---|---|---|---|
| Quick Help | <command> --help |
Brief syntax and options | Quick reference, command-line usage |
| Comprehensive Docs | docs <command> |
Detailed explanations, examples, use cases | Learning, troubleshooting, best practices |
Quick Help Example
init --help
Shows brief syntax overview.
Comprehensive Documentation Example
docs init
Shows detailed explanation, connection options, examples, and troubleshooting tips.
Tips
- Use
docswithout arguments to browse all available commands - The documentation viewer works offline - no internet connection required
- Documentation files can be edited if you need to add custom notes
- Use pager mode (
-p) when viewing documentation on small terminal windows
Error Messages
| Message | Description |
|---|---|
| "Documentation directory not found" | The docs folder is missing from the application directory |
| "Documentation not found for command 'X'" | No documentation file exists for the specified command |
Related Commands
exit- Exit the application after viewing documentationhelp- Command-line help (shows brief command list)
Use Cases
- Learning the Tool: Explore all commands and their capabilities
- Reference: Look up syntax and options for specific commands
- Examples: Find working examples for complex operations
- Troubleshooting: Understand expected behavior and common issues
- Offline Access: View detailed help without internet connectivity