claude-code-cli-acp 0.1.1

An ACP-compatible adapter for the real Claude Code CLI
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use std::{ffi::OsString, process::Stdio};

use tokio::process::Command;

use crate::compat::claude_probe::ClaudeCli;

pub async fn run(args: Vec<OsString>) -> anyhow::Result<i32> {
    let cli = ClaudeCli::from_env();
    let mut command = Command::new(cli.executable());
    command.args(args);
    command.stdin(Stdio::inherit());
    command.stdout(Stdio::inherit());
    command.stderr(Stdio::inherit());
    let status = command.status().await?;
    Ok(status.code().unwrap_or(1))
}