Commit Graph
4 Commits
Author SHA1 Message Date
henning bff34dff15 Update README and mention the CLI. 2026-07-30 17:10:31 +02:00
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
henning a32a437557 Fix broken intra-doc link causing cargo doc warning
[\`uuid::Uuid\`] resolves as an intra-doc link, but the uuid crate is only
in scope when the optional "uuid" feature is enabled, so a default
`cargo doc` failed to resolve it. Use a plain code span instead.
2026-07-30 13:38:37 +02:00
henning dec8face54 Add Outline API client library foundation
Implements a first vertical slice of the Outline RPC API (auth, documents,
collections, users) covering the structural patterns used across the whole
API: single object, paginated list, tree, create/update, delete, search.
Chosen as the basis for future CLI and GUI clients built on top of this crate.

- Handwritten client (not codegen) against the vendored OpenAPI spec, since
  Outline's API is uniformly POST /api/<resource>.<action> with JSON bodies
  and inline/anonymous schemas that generators handle poorly
- Async (reqwest + tokio) Client, cheaply cloneable, no &mut self methods
- thiserror-based Error with ErrorKind classification and boxed API error
  context; forward-compatible models (unknown fields ignored, unknown
  string-enum values preserved via a catch-all variant) since the API is
  unversioned and self-hosted instances vary in age
- Pagination via Page<T>/Paginator with next_page/collect_all/into_stream
- wiremock-based test suite plus a spec-coverage test guarding against typos
  in RPC method names
2026-07-30 13:00:09 +02:00