AccordionShell Documentation System
Overview
AccordionShell now includes a comprehensive built-in documentation system using the docs command. This provides detailed, formatted documentation for all commands directly in the terminal.
Features
- Formatted Markdown Rendering: Documentation is displayed with colors, formatting, and proper structure
- Syntax Highlighting: Code blocks are highlighted in panels
- Quick Reference: Type
docsto see the index, ordocs <command>for specific help - Dual Help System:
--helpflag: Quick syntax referencedocscommand: Comprehensive guides with examples and workflows
Usage
View Documentation Index
AccordionShell docs
Shows the main documentation index with all available commands.
View Specific Command Documentation
AccordionShell docs init
AccordionShell docs pmbus
AccordionShell docs i2c
Shows detailed documentation for the specified command.
Pager Mode (for long documentation)
AccordionShell docs pmbus --pager
Enables page-by-page viewing for long documentation files.
Examples
Example 1: Quick Syntax Reference
# Quick syntax with built-in help
AccordionShell init --help
Output:
-h, --host Required. The hostname or IP address of the Accordion hardware
-n, --notification Enable notification event reception
-t, --telemetry Enable telemetry event reception
Example 2: Comprehensive Documentation
# Detailed guide with examples
AccordionShell docs init
Output shows:
- Full description
- Required and optional options
- Multiple usage examples
- Behavior details
- Event handler information
- Troubleshooting tips
- Related commands
Example 3: Interactive Mode
AccordionShell
> docs
[Shows documentation index]
> docs pmbus
[Shows PMBus comprehensive guide]
> pmbus --help
[Shows quick syntax reference]
Documentation Features
Formatted Elements
The docs command renders markdown with:
- Headers: Color-coded by level (Yellow H1, Cyan H2, Green H3)
- Code Blocks: Displayed in rounded panels with language labels
- Lists: Bullet points and numbered lists with proper indentation
- Bold/Italic: Text formatting preserved
- Tables: Simple table rendering
- Links: Displayed with URL references
- Special Markers: ⚠️ warnings, ✅ checkmarks highlighted
Documentation Structure
Each command documentation includes:
- Description: What the command does
- Syntax: Basic usage format
- Options: Required and optional parameters
- Examples: Multiple usage scenarios
- Behavior: How the command works
- Output Format: What to expect
- Use Cases: Common workflows
- Error Handling: Troubleshooting
- Best Practices: Tips and recommendations
- See Also: Related commands
Available Documentation
All 18 AccordionShell commands have comprehensive documentation:
Core Commands:
- init, list, get, set, reset, exit
Configuration:
- conf, wait, alias
Module Management:
- module
Bus Operations:
- i2c
Data & Streaming:
- stream, num
Power Management:
- pmbus
Media & Audio:
- media, audio
System Management:
- firmware, general
When to Use Each Help System
Use --help when:
- You know the command but forgot the syntax
- You need a quick parameter reference
- You want to see available options at a glance
Use docs when:
- You're learning a new command
- You need examples and workflows
- You want to understand behavior and use cases
- You're troubleshooting an issue
- You need best practices guidance
Tips
- Start with
docs: When learning a new command, start withdocs <command>for comprehensive information - Quick Reference: Use
<command> --helpfor quick syntax lookups - Browse Index: Use
docswithout arguments to browse all available commands - Pager Mode: For long documentation, add
--pagerto read page by page - Combine with Help: Use both systems -
docsfor learning,--helpfor reminders
Technical Details
Implementation
- Library: Uses Spectre.Console for terminal formatting
- Format: Markdown files rendered with color and structure
- Location: Documentation files in
docs/directory - Deployment: Documentation files copied to output directory
Dependencies
- Spectre.Console (NuGet package for terminal formatting)
- CommandLineParser (existing dependency for argument parsing)
Documentation Files
All documentation is stored in markdown files with the as- prefix:
- as-index.md (main index)
- as-init.md, as-list.md, as-get.md, etc. (command-specific)
Support
For issues or suggestions about the documentation system, please contact the development team.
Future Enhancements
Potential future improvements:
- Search functionality across all documentation
- Interactive navigation between related commands
- Export documentation to PDF/HTML
- Offline documentation viewer
- Custom documentation for user modules