bctx 0.1.22

bctx CLI — intercept CLI commands and compress output for LLM coding agents
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use anyhow::Result;
use nexus::server::stdio::run_stdio;
use nexus::server::NexusServer;

pub fn handle(http: bool, port: u16) -> Result<()> {
    let server = NexusServer::default();
    if http {
        let rt = tokio::runtime::Runtime::new()?;
        rt.block_on(nexus::server::http::run_http(server, port))?;
    } else {
        eprintln!("bctx mcp: stdio transport active — waiting for MCP JSON-RPC on stdin");
        run_stdio(&server)?;
    }
    Ok(())
}