{"id":22589594,"url":"https://github.com/connorgray/clap-markdown","last_synced_at":"2025-04-07T15:05:49.434Z","repository":{"id":64720859,"uuid":"577723376","full_name":"ConnorGray/clap-markdown","owner":"ConnorGray","description":"Autogenerate Markdown documentation for clap command-line tools","archived":false,"fork":false,"pushed_at":"2024-06-15T21:45:35.000Z","size":33,"stargazers_count":64,"open_issues_count":7,"forks_count":17,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-04T23:28:58.898Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ConnorGray.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-12-13T11:33:20.000Z","updated_at":"2025-03-18T19:53:40.000Z","dependencies_parsed_at":"2024-06-15T06:21:44.126Z","dependency_job_id":"1c72a281-f158-4dca-84ef-c7056b84994d","html_url":"https://github.com/ConnorGray/clap-markdown","commit_stats":{"total_commits":14,"total_committers":1,"mean_commits":14.0,"dds":0.0,"last_synced_commit":"16c42cdd5f65b815bc1672e0b0e2becf08a5f8f1"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ConnorGray%2Fclap-markdown","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ConnorGray%2Fclap-markdown/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ConnorGray%2Fclap-markdown/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ConnorGray%2Fclap-markdown/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ConnorGray","download_url":"https://codeload.github.com/ConnorGray/clap-markdown/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247675596,"owners_count":20977376,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-08T08:14:08.872Z","updated_at":"2025-04-07T15:05:49.394Z","avatar_url":"https://github.com/ConnorGray.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# clap-markdown\n\n[![Crates.io](https://img.shields.io/crates/v/clap-markdown.svg)](https://crates.io/crates/clap-markdown)\n![License](https://img.shields.io/crates/l/clap-markdown.svg)\n[![Documentation](https://docs.rs/clap-markdown/badge.svg)](https://docs.rs/clap-markdown)\n\n#### [API Documentation](https://docs.rs/clap-markdown) | [Changelog](./docs/CHANGELOG.md) | [Contributing](#contributing)\n\nAutomatically generate Markdown documentation for\n[`clap`](https://crates.io/crates/clap) command-line tools.\n\n## Examples\n\nGenerate Markdown text for a basic `clap` app:\n\n```rust\n#[derive(clap::Parser)]\nstruct Cli {\n    #[arg()]\n    name: String,\n}\n\nlet markdown: String = clap_markdown::help_markdown::\u003cCli\u003e();\n```\n\n**Generated Markdown Examples:**\n\nSee `clap` example programs and the corresponding Markdown generated by\n`clap-markdown`:\n\n| Program                                              | Markdown                                         |\n|------------------------------------------------------|--------------------------------------------------|\n| [`./complex_app.rs`](./docs/examples/complex_app.rs) | [complex-app.md](./docs/examples/complex-app.md) |\n\n### Usage Convention: `CommandLineHelp.md`\n\nThis section describes a suggested convention for using `clap-markdown` to\ngenerate a `CommandLineHelp.md` file, which can be committed to source control\nand viewed as online documentation.\n\n1. Add a hidden `--markdown-help` option to your `clap` application:\n\n  ```rust\n  use clap::Parser;\n\n  #[derive(Parser)]\n  struct Cli {\n      #[arg(long, hide = true)]\n      markdown_help: bool,\n  }\n\n  fn main() {\n      let args = Cli::parse();\n\n      // Invoked as: `$ my-app --markdown-help`\n      if args.markdown_help {\n          clap_markdown::print_help_markdown::\u003cCli\u003e();\n      }\n  }\n  ```\n\n2. Invoke `--markdown-help` to generate a `CommandLineHelp.md` file:\n\n  ```shell\n  $ cargo run -- --markdown-help \u003e docs/CommandLineHelp.md\n  ```\n\n3. Save `CommandLineHelp.md` in git, and link to it from the project's README.md\n   or other relevant documentation.\n\n\u003e For projects that have multiple associated executables, consider using the\n\u003e command name as a suffix. For example: `CommandLineHelp-your-app.md`,\n\u003e `CommandLineHelp-other-app.md`.\n\n\u003e Comitting `CommandLineHelp.md` to version control makes it easy to track\n\u003e user-visible changes to the command-line interface.\n\n#### Projects using `clap-markdown`\n\nThe following projects use `clap-markdown` to generate a `CommandLineHelp.md`\nreference document:\n\n* [`wolfram-app-discovery`](https://crates.io/crates/wolfram-app-discovery)\n  — [`CommandLineHelp.md`](https://github.com/WolframResearch/wolfram-app-discovery-rs/blob/master/docs/CommandLineHelp.md)\n* [`wolfram-cli`](https://github.com/ConnorGray/wolfram-cli)\n  — [`CommandLineHelp.md`](https://github.com/ConnorGray/wolfram-cli/blob/main/docs/CommandLineHelp.md)\n\n\u003csmall\u003e\u003ci\u003e\nTo request the addition of a project to this list, please file an issue.\n\u003c/i\u003e\u003c/small\u003e\n\n## Compatibility with clap\n\nWhen this crate adds support for a new MAJOR version of `clap`, the MAJOR\nversion number of `clap-markdown` will be changed.\n\n**Compability History:**\n\n| `clap-markdown` | `clap`    |\n|-----------------|-----------|\n| v0.0.1 – v0.1.4 | `\"4.*.*\"` |\n\n\n## License\n\nLicensed under either of\n\n  * Apache License, Version 2.0\n    ([LICENSE-APACHE](./LICENSE-APACHE) or \u003chttp://www.apache.org/licenses/LICENSE-2.0\u003e)\n  * MIT license\n    ([LICENSE-MIT](./LICENSE-MIT) or \u003chttp://opensource.org/licenses/MIT\u003e)\n\nat your option.\n\n\n## Contributing\n\nUnless you explicitly state otherwise, any contribution intentionally submitted\nfor inclusion in the work by you, as defined in the Apache-2.0 license, shall be\ndual licensed as above, without any additional terms or conditions.\n\nSee [**Development.md**](./docs/Development.md) for instructions on how to\nperform common development tasks.\n\nSee [*Maintenance.md*](./docs/Maintenance.md) for instructions on how to\nmaintain this project.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconnorgray%2Fclap-markdown","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fconnorgray%2Fclap-markdown","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconnorgray%2Fclap-markdown/lists"}