Skip to main content

anytype_rpc/
lib.rs

1/*
2 * Anytype gRPC client
3 * github.com/stevelr/anytype
4 *
5 * SPDX-FileCopyrightText: 2025-2026 Steve Schoettler
6 * SPDX-License-Identifier: Apache-2.0
7 */
8//! Anytype gRPC client
9//!
10//! The gRPC api isn't officially supported (by Anytype) for third party clients. However, it's used heavily
11//! by the Anytype applications, including the desktop app and headless cli, and it's the only way
12//! for applications to access certain functionality that is not available over the HTTP api,
13//! such as Files, Chats, Blocks, and Relations.
14//!
15//! # See also
16//!
17//! - [anytype](https://crates.io/crates/anytype) An ergonomic Anytype API client in Rust.
18//!   Includes http rest api plus gRPC backend using this crate, for access to Files and Chats.
19//!
20//! - [anyr](https://crates.io/crates/anyr) a CLI tool for listing, searching, and performing
21//!   CRUD operations on anytype objects. Via `anytype`, also includes operations on Files and Chats.
22//!
23//!
24// some protoc files after parsing have comment formatting that clippy doesn't like
25//   #![allow(clippy::doc_lazy_continuation)]
26
27/// Model types from anytype.model proto package
28#[allow(clippy::style)]
29pub mod model {
30    include!("gen/anytype.model.rs");
31}
32
33/// Storage types from anytype.storage proto package
34#[allow(clippy::style)]
35pub mod storage {
36    include!("gen/anytype.storage.rs");
37}
38
39/// Anytype service, events, and RPC types
40#[allow(clippy::style)]
41pub mod anytype {
42    include!("gen/anytype.rs");
43
44    pub use client_commands_client::ClientCommandsClient;
45}
46
47/// Authentication helpers for creating sessions and attaching tokens.
48pub mod auth;
49/// Space backup helpers using ObjectListExport gRPC.
50pub mod backup;
51/// gRPC client configuration and helpers.
52pub mod client;
53/// Helpers for headless config-based auth.
54pub mod config;
55/// Error types for gRPC operations.
56pub mod error;
57/// Helpers for dataview view metadata.
58pub mod views;