Search and read Ditto documentation from your terminal.
cargo install --path .
ditto-docs search <query> [options]
Find documentation pages, StackOverflow answers, GitHub issues, and Discourse posts related to your query.
$ ditto-docs search "conflict resolution"
[1] Conflict Resolution
DQL > Data Types
https://docs.ditto.live/sdk/latest/sync/conflict-resolution
Ditto uses CRDTs to automatically resolve conflicts...
— 10 result(s)
Options:
| Flag | Description |
|---|---|
-l, --limit <n> |
Max results (default: 10) |
--json |
Output as JSON |
--urls |
Output only URLs, one per line |
-o, --open |
Open the first result in your browser |
ditto-docs show <page>
Fetch and display the full markdown content of a documentation page.
$ ditto-docs show sdk/latest/deployment/logging
# SDK Logging
Ditto provides comprehensive logging capabilities to help you
monitor, debug, and optimize your applications...
Accepts paths or full URLs:
ditto-docs show /sdk/latest/crud/create
ditto-docs show https://docs.ditto.live/dql/indexing
ditto-docs show "dql/indexing#creating-indexes"
Fragments (#section-name) are stripped automatically -- the full page is returned.
# Quick lookup
ditto-docs search replication --limit 3
# Get URLs for scripting
ditto-docs search authentication --urls
# Pipe JSON to jq
ditto-docs search "peer to peer" --json | jq '.[].url'
# Read a page
ditto-docs show sdk/latest/crud/read
# Search and open in browser
ditto-docs search "small peer info" --openMIT