Is your feature request related to a problem? Please describe.
Currently, AvaloniaXKCD primarily operates as a GUI application. Users who want to retrieve comic information, integrate XKCD into scripts, or work from the terminal have limited options. The existing command-line interface is basic and could be significantly expanded.
Describe the solution you'd like
Expand command-line capabilities so users can interact with XKCD content directly from the terminal without launching the Avalonia GUI. The project already uses System.CommandLine for parsing arguments in https://github.com/dylanlangston/Axkcd/blob/master/src/AvaloniaXKCD/CommandLineParser.cs.
- Review existing CLI parsing logic and commands
- Extend
CommandLineParser.cs to add new commands. Suggestions:
--get <comicNumber> or get-info — Retrieve and print comic title, alt text, date, and URL
--latest — Fetch and display the most recent comic
--random — Pull and display a random comic
--open <comicNumber> or open-browser — Launch specified comic in default web browser using Process.Start
- Format output cleanly for terminal display (support plain text and JSON modes for scripting)
- Integrate ExplainXKCD lookups (e.g.,
--explain <comicNumber>)
- Implement proper error handling and user feedback for invalid inputs or network issues
- Leverage
XKCDCore
- Update README and add CLI usage documentation with examples
- Ensure cross-platform compatibility for all CLI commands
Describe alternatives you've considered
- Separate CLI-only tool, but integrating into main app reduces maintenance/distribution overhead.
- Basic
--help only, but expanded commands provide real utility for power users.
Additional context
Acceptance Criteria:
This makes AvaloniaXKCD useful for automation, shell integration, and users who prefer terminal interfaces.
Is your feature request related to a problem? Please describe.
Currently, AvaloniaXKCD primarily operates as a GUI application. Users who want to retrieve comic information, integrate XKCD into scripts, or work from the terminal have limited options. The existing command-line interface is basic and could be significantly expanded.
Describe the solution you'd like
Expand command-line capabilities so users can interact with XKCD content directly from the terminal without launching the Avalonia GUI. The project already uses System.CommandLine for parsing arguments in https://github.com/dylanlangston/Axkcd/blob/master/src/AvaloniaXKCD/CommandLineParser.cs.
CommandLineParser.csto add new commands. Suggestions:--get <comicNumber>orget-info— Retrieve and print comic title, alt text, date, and URL--latest— Fetch and display the most recent comic--random— Pull and display a random comic--open <comicNumber>oropen-browser— Launch specified comic in default web browser usingProcess.Start--explain <comicNumber>)XKCDCoreDescribe alternatives you've considered
--helponly, but expanded commands provide real utility for power users.Additional context
Acceptance Criteria:
--helpoutputXKCDCorelogicThis makes AvaloniaXKCD useful for automation, shell integration, and users who prefer terminal interfaces.