oxibrain_cli/cmd/import_cmd.rs
1use oxibrain::{Brain, BrainConfig};
2use std::path::Path;
3
4pub async fn run(dir: &Path, file: &Path) -> anyhow::Result<()> {
5 let content = std::fs::read_to_string(file)?;
6 let brain = Brain::open(BrainConfig::at(dir)).await?;
7 brain.import_jsonl(content).await?;
8 println!("imported from {}", file.display());
9 Ok(())
10}