SCOPE-8: Command-line Parser^

reporter:

kennethpjdyer

assignee:

kennethpjdyer

initiative:

INIT-2: Standard Compiler

created:

2026-10-28

status:

open

Summary^

Implement a standard command-line parser for use in Autotelic Toolworks projects. Then, shift all existing tools from their current ad hoc approach to the new library.

Motivation^

C has a lot of interesting tools for handling command-line parsing, but none of those explored quite have the clean approach found in more recent languages like Python and Go.

With the work in SCOPE-7: Specification Domain, we now have a way to add custom domains to our reStructuredText processor. This means we also have a way to process our document structures to extract relevant data from the docs: and use it to produce whatever we want.

In this case, the goal is to set up a Documentation driven Development approach to command-line parsers. The docs the developer writes to explain what a given sub-command or option does is the source input to generate the C code used to actually parse the arguments and options passed in from the command-line.

Targets^

Goals^

  • Document a domain for command-line interface documentation.

  • Implement command and option structures.

  • Build system to read reStructuredText and output C source code.

  • Implement CLI functionality for each library tool.

Non-Goals^

  • Generate info pages.

  • Generate man pages.

User Experience^

End Users^

The end user’s experience of this project is through consistency between public documentation, help text, and command-line functionality. They will not interact with the tool itself directly.

Developers^

Developers will begin projects with a documentation site that specifies the command-line interface. In the main function, they’ll then pass the argc and argv arguments to the generated CLI function and interact with the return structure to determine further operations.

Issues^

SCOPE-7: Specification Domain SCOPE-9: Validation Tool