Add built-in manual pages for Turso

In the hopes of doing a good job at teaching people what Turso can do,
I am adding built-in manual pages. When the CLI starts, it picks a
feature at random, and tells the user that the feature exists:

```
Turso v0.2.0-pre.8
Enter ".help" for usage hints.
Did you know that Turso supports Change Data Capture? Type .manual cdc to learn more.
This software is ALPHA, only use for development, testing, and experimentation.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database
```

There is a lot we can do to make this feature world class:
- we can automatically compile examples during compile time like
  rust-doc, to make sure examples used in the manuals always work
- we can implement scrolling and navigation
- we can document a lot more features

But for now, this is a start!
This commit is contained in:
Glauber Costa
2025-09-24 11:08:15 -03:00
parent c894dcf438
commit fbc3d0dbc3
14 changed files with 1090 additions and 5 deletions

View File

@@ -166,6 +166,12 @@ pub struct CloneArgs {
pub output_file: String,
}
#[derive(Debug, Clone, Args)]
pub struct ManualArgs {
/// The manual page to display (e.g., "mcp")
pub page: Option<String>,
}
#[derive(ValueEnum, Copy, Clone, Debug, PartialEq, Eq)]
pub enum HeadersMode {
On,