oxibrain-cli 0.6.0

Command-line interface and MCP server for oxibrain
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use oxibrain::Brain;
use oxibrain::BrainConfig;
use oxibrain_store::project::{Declaration, EntityRef};
use std::path::Path;

pub async fn run(dir: &Path, surface: &str, ty: &str, space: &str) -> anyhow::Result<()> {
    let brain = Brain::open(BrainConfig::at(dir)).await?;
    let space_id = brain.ensure_space(space).await?;
    let decl = Declaration::Split {
        entity: EntityRef {
            surface: surface.to_string(),
            ty: ty.to_string(),
        },
    };
    let ep_id = brain.declare(&space_id, decl).await?;
    println!("split as episode: {ep_id}");
    Ok(())
}