MCPcopy Create free account
hub / github.com/clockworklabs/SpacetimeDB / generate_cli_docs

Function generate_cli_docs

tools/ci/src/ci_docs.rs:6–28  ·  view source on GitHub ↗

TODO: use clap_markdown instead of this custom implementation in the future

()

Source from the content-addressed store, hash-verified

4
5// TODO: use clap_markdown instead of this custom implementation in the future
6pub fn generate_cli_docs() -> String {
7 let mut cli = Cli::command();
8 let usage = generate_markdown(&mut cli, 2);
9
10 format!(
11 "\
12# SpacetimeDB's cargo ci
13
14## Overview
15
16This document provides an overview of the `cargo ci` command-line tool, and documentation for each of its subcommands and options.
17
18{}
19---
20
21This document is auto-generated by running:
22
23```bash
24cargo ci self-docs
25```",
26 usage
27 )
28}
29
30fn generate_markdown(cmd: &mut Command, heading_level: usize) -> String {
31 let mut out = String::new();

Callers 1

mainFunction · 0.85

Calls 1

generate_markdownFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…