Files
outline/cli/src/commands/mod.rs
T
henning 844d2e716f Add outline-cli: minimal CLI for search and document retrieval
Adds a command-line client in cli/ as its own Cargo workspace, depending
on the outline library via a path dependency. Covers exactly the requested
scope: login (stores the API key in the system keyring via the Secret
Service D-Bus protocol, verified against auth.info() before storing),
search (full-text), and get (fetch a document, render its markdown to a
self-contained HTML page, open it in the default browser).

Verified end-to-end against a real Outline instance and the local
gnome-keyring: login stores and search/get retrieve the token purely from
the keyring and saved config, with no environment variables set.
2026-07-30 15:15:56 +02:00

14 lines
334 B
Rust

mod get;
mod login;
mod search;
use crate::cli::{Cli, Command};
pub async fn dispatch(cli: Cli) -> anyhow::Result<()> {
match cli.command {
Command::Login => login::run(&cli).await,
Command::Search(ref args) => search::run(&cli, args).await,
Command::Get(ref args) => get::run(&cli, args).await,
}
}