A domain-specific language for organizing and documenting CLI commands - built in Rust.
Asto is a small but powerfull DSL designed to help CLI engineers organize, describe, and document command-line tools - clearly and efficiently.
Whether you're designing a new CLI or keeping track of a large one, Asto gives you a clean structure to define:
- Inputs
- Descriptions
- Output behavior
- Status/version
- Params/Actions
- Exportable documentation
- Minimal syntax
- Easy to read
- Fast to write
- Exportable to
.jsonor.md - Perfect for documenting CLI tools
- Designed for DevTools engineers
- Fully Offline
- Runs on Windows, Linux and macOS
- Built in Rust for performance
Asto is not a replacement for your CLI.
Asto is the language you use to structure it.
- CLI engineer
- DevTools Creators
- Backend Developers
- Documenting Writers
- Anyone building command-line tools
Using a fictional CLI called friend-cli (fnd).
friend_cli_commands.asto
> fnd hi --name
/ "Print 'Hi NAME'"
: new
{
--name STRING "Username"
}
> fnd bye --name
/ "Print 'Bye NAME'"
: new
{
--name STRING "Username"
}
| Symbol | Meaning |
|---|---|
> |
Input command |
/ "" |
Description |
--param |
it represents a parameter |
: |
Command's status (new, depr, expm, stable) |
{} |
Param info |
To use params, use --:
> fn hi --name
To specific param's type or what the param represents, use {}
For example:
> fn hi --name --lastname
/ "Print 'Hi name lastname'"
: new
{
--name string "First name"
--lastname string "Last name"
}
The syntax is:
--param_name type "Description"
With Cargo
cargo install astoVerify installation:
asto --version
Output:
asto vX.X.XWithout Cargo
Download the latest installer (.exe) from the releases page
Get syntax highlighting for your .asto files: gabrielxavier.Asto-Plugin (Search with this in vscode).
asto export friend_cli_command.asto --jsonOutput:
Asto CLI - "friend_cli_command.json" exported with successfully!It generates:
friend_cli_command.json:
[
{
"node": "Input",
"command": "fnd hi --name",
"description": "Print 'Hi name'",
"prefix": "fnd",
"function": "hi",
"version": "new",
"params": [
"--name"
],
"params_config": [
{
"name": "--name",
"typeval": "STRING",
"desc": "Username"
}
]
},
{
"node": "Input",
"command": "fnd bye --name",
"description": "Print 'Bye name'",
"prefix": "fnd",
"function": "bye",
"version": "new",
"params": [
"--name"
],
"params_config": [
{
"name": "--name",
"typeval": "STRING",
"desc": "Username"
}
]
}
]asto export friend_cli_commands.asto --mdAsto CLI - "friend_cli_command.md" exported with successfully!Output (friend_cli_commands.md):
By: YOUR_NAME_HERE
Informations about project...
Say hi for someone
Status: π‘ New
- --name or -n (
str): Username
Say bye for someone
Status: π‘ New
- --name or -n (
str): Username
- Fork
- Create Branch
git branch -b my-improvement - Commit
git commit -m "improve:: description of commands" - Push
git push origin my-improvement - Open a PR
Ideas, docs, features and fixes are welcome.
MIT License - free to use, modify and integrate.
