diff --git a/.markdownlintignore b/.markdownlintignore
index a08320bd7..15454185b 100644
--- a/.markdownlintignore
+++ b/.markdownlintignore
@@ -3,3 +3,4 @@ target/
CHANGELOG.md
docs/node_modules/
node_modules/
+test/
diff --git a/Cargo.lock b/Cargo.lock
index de4118010..8d58204f7 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -4106,9 +4106,9 @@ checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da"
[[package]]
name = "usage-lib"
-version = "0.7.4"
+version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ef8f6a44b06866b37810400ecc3ee80dd0354448c870a60d424d6ab364c7e50b"
+checksum = "4d2f461138354b775e96629ce474dad0f7b9996dd902db85665de06b8a2aaeda"
dependencies = [
"clap",
"heck 0.5.0",
@@ -4120,6 +4120,7 @@ dependencies = [
"once_cell",
"serde",
"strum",
+ "tera",
"thiserror",
"xx",
]
diff --git a/Cargo.toml b/Cargo.toml
index fd6a0b2b2..292000dca 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -116,7 +116,7 @@ toml = { version = "0.8", features = ["parse"] }
toml_edit = { version = "0.22", features = ["parse"] }
url = "2.5.0"
#usage-lib = { path = "../usage/lib" }
-usage-lib = { version = "0.7.0", features = ["clap"] }
+usage-lib = { version = "0.8.0", features = ["clap", "docs"] }
versions = { version = "6.2.0", features = ["serde"] }
vfox = "0.1"
walkdir = "2.5.0"
diff --git a/docs/.vitepress/cli_commands.ts b/docs/.vitepress/cli_commands.ts
index 2156705d3..d8a3b8662 100644
--- a/docs/.vitepress/cli_commands.ts
+++ b/docs/.vitepress/cli_commands.ts
@@ -111,6 +111,9 @@ export const commands: { [key: string]: Command } = {
"github-action": {
hide: false,
},
+ "task-docs": {
+ hide: false,
+ },
},
},
"global": {
diff --git a/docs/cli/generate/task-docs.md b/docs/cli/generate/task-docs.md
new file mode 100644
index 000000000..7c41afda0
--- /dev/null
+++ b/docs/cli/generate/task-docs.md
@@ -0,0 +1,28 @@
+## `mise generate task-docs [OPTIONS]`
+
+```text
+[experimental] Generate documentation for tasks in a project
+
+Usage: generate task-docs [OPTIONS]
+
+Options:
+ -m, --multi
+ render each task as a separate document, requires `--output` to be a directory
+
+ -i, --inject
+ inserts the documentation into an existing file
+
+ This will look for a special comment, , and replace it with the generated documentation.
+ It will replace everything between the comment and the next comment, so it can be
+ run multiple times on the same file to update the documentation.
+
+ -I, --index
+ write only an index of tasks, intended for use with `--multi`
+
+ -o, --output