Skip to content

Command Runner #396

Description

@jdc-pub

Proposal

Thanks for your careful work on this project! I suspect AsciiDoc will be really helpful for technical documents as LLM workflows continue. I have an idea for a feature that's entirely out of the current scope, but I thought I'd run it by you in case there's interest in keeping the functionality here in this repository. Otherwise, I'll make another repository as an extension.

I'm proposing a new acdc run command runner which can read commands from .adoc files, with attributes used to encode command metadata. If you think this repository would be a good home for this functionality, I'd like to contribute the feature and help maintain it. Like I said above, otherwise I'm happy to make a new extension repository and import this project's crates as external dependencies.

Usage

README files often contain commands to help build packages, install dependencies, etc. We could use block attributes to mark a verbatim / source block as a command, and list dependencies on other commands. For example, see the build and test command examples immediately below: user could invoke acdc run build and have build instructions pulled automatically (from the README by default).

== Building

This project uses the `cargo xtask` convention.

[command, id=build]
[source, bash]
----
cargo xtask build
----

## Testing

Similarly, use `cargo xtask` to test all components.

[command, id=test, deps=build]
[source, bash]
----
cargo xtask test
----

Mechanics

We could use a particular attribute, e.g. command, as a sentinel value indicating that block should be treated as an executable command. Document level metadata could be used to set the default shell, and specify other global configuration options. The actual source, bash specifier would only be for clear rendering in forges, e.g. GitHub.

Optionally, users could add substitution capability to their verbatim/source blocks, which could be a powerful feature for a command runner.

Alternatives

I see this acdc run proposal as combining just with mask, but with AsciiDoc instead of Markdown.

Forward Work

If you wanted to collaborate on this here in this repository, I'd sketch up an MVP on a branch for your review to get a feel for how this could work. Regardless, thanks for your time and acdc!

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions