@@ -89,7 +89,7 @@ accurate, and the frustrating back-and-forth cycle of trial and error reduced.
8989
9090## Features
9191
92- - Simple command-line interface for coding agent .
92+ - Simple command-line interface for coding agents .
9393- Local documentation access in markdown format.
9494- Crate and item-level browsing for targeted access, reducing the token usage.
9595- Master index listing for comprehensive item discovery.
@@ -98,16 +98,20 @@ accurate, and the frustrating back-and-forth cycle of trial and error reduced.
9898
9999### Build Command
100100
101- Generate markdown documentation for a crate:
102-
103101``` shell
104- cargo txt build < CRATE>
105- ```
102+ $ cargo txt build --help
103+ Generate markdown documentation from rustdoc HTML for coding agents
104+
105+ Usage: cargo txt build [OPTIONS] < CRATE>
106106
107107Arguments:
108+ < CRATE> Crate name to build documentation for
108109
109- - ` <CRATE> ` - Crate name to build documentation for (required). This is the
110- dependency name from ` Cargo.toml ` (e.g., ` rustdoc-types ` ).
110+ Options:
111+ -v, --verbose... Increase logging verbosity
112+ -q, --quiet... Decrease logging verbosity
113+ -h, --help Print help
114+ ```
111115
112116This command generates HTML documentation using ` cargo doc ` , converts all HTML
113117files to markdown, and writes them to the output directory. Output is placed in
@@ -119,7 +123,7 @@ The output directory uses the **library name** (from `cargo doc` output), not
119123the crate name. For example, building ` rustdoc-types ` creates:
120124
121125```
122- target/docmd/rustdoc_types/ # Library name directory (underscores)
126+ target/docmd/rustdoc_types/ # Library name directory (underscores)
123127├── metadata.json # Contains crate_name, lib_name, and item_map
124128├── index.md # Crate overview
125129├── all.md # Master index of all items
@@ -143,29 +147,24 @@ Output:
143147 Run `cargo txt list rustdoc_types` to see all items
144148```
145149
146- Error example:
147-
148- ``` shell
149- $ cargo txt build random-crate
150- Error: Crate ' random-crate' is not an installed dependency.
151-
152- Available crates: anyhow, clap, clap-verbosity-flag, env_logger, log, rustdoc-types, scraper, serde, serde_json, tempfile
153-
154- Only installed dependencies can be built. Add the crate to Cargo.toml as a dependency first.
155- ```
156-
157150### List Command
158151
159152List all items in a crate:
160153
161154``` shell
162- cargo txt list < NAME >
163- ```
155+ $ cargo txt list --help
156+ List all items in a crate
164157
165- ** Arguments: **
158+ Usage: cargo txt list [OPTIONS] < CRATE >
166159
167- - ` <NAME> ` - Library name to list items for (required). This is the library name
168- from ` cargo doc ` output (e.g., ` rustdoc_types ` ).
160+ Arguments:
161+ < CRATE> Crate name (e.g., ' serde' )
162+
163+ Options:
164+ -v, --verbose... Increase logging verbosity
165+ -q, --quiet... Decrease logging verbosity
166+ -h, --help Print help
167+ ```
169168
170169** Examples:**
171170
@@ -214,31 +213,30 @@ To view documentation for a specific item, use the `show` command:
214213``` shell
215214cargo txt show < ITEM_PATH>
216215```
217- ````
218216
219217Examples:
220218
221219- Show struct: ` cargo txt show serde::SomeStruct `
222220- Show trait: ` cargo txt show serde::SomeTrait `
223221- Show enum: ` cargo txt show serde::SomeEnum `
224-
225222````
226223
227224### Show Command
228225
229- Show and view crate documentation:
230-
231226``` shell
232- cargo txt show <ITEM_PATH>
233- ````
227+ $ cargo txt show --help
228+ Show and display crate documentation
234229
235- ** Arguments: **
230+ Usage: cargo txt show [OPTIONS] < ITEM >
236231
237- - ` <ITEM_PATH> ` - Item path to show (required). Can be:
238- - Library name only (e.g., ` rustdoc_types ` ): displays crate overview
239- (index.md)
240- - Full item path with library name (e.g., ` rustdoc_types::Item ` ,
241- ` rustdoc_types::Abi ` ): displays specific item documentation
232+ Arguments:
233+ < ITEM> Item path (e.g., ' serde' , ' serde::Error' , ' serde::ser::StdError' )
234+
235+ Options:
236+ -v, --verbose... Increase logging verbosity
237+ -q, --quiet... Decrease logging verbosity
238+ -h, --help Print help
239+ ```
242240
243241** Important:** Use the library name (with underscores), not the crate name (with
244242hyphens). For example:
0 commit comments