Skip to content

Commit 789bcf4

Browse files
committed
feat(sacp-tokio): add convenience constructors for known ACP agents
Add helper methods to AcpAgent for common agents: - zed_claude_code(): Zed Industries Claude Code - zed_codex(): Zed Industries Codex - google_gemini(): Google Gemini CLI
1 parent 5445a07 commit 789bcf4

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

src/sacp-tokio/src/acp_agent.rs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,25 @@ impl AcpAgent {
102102
}
103103
}
104104

105+
/// Create an ACP agent for Zed Industries' Claude Code tool.
106+
/// Just runs `npx -y @zed-industries/claude-code-acp@latest`.
107+
pub fn zed_claude_code() -> Self {
108+
Self::from_str("npx -y @zed-industries/claude-code-acp@latest").expect("valid bash command")
109+
}
110+
111+
/// Create an ACP agent for Zed Industries' Codex tool.
112+
/// Just runs `npx -y @zed-industries/codex-acp@latest`.
113+
pub fn zed_codex() -> Self {
114+
Self::from_str("npx -y @zed-industries/codex-acp@latest").expect("valid bash command")
115+
}
116+
117+
/// Create an ACP agent for Google's Gemini CLI.
118+
/// Just runs `npx -y -- @google/gemini-cli@latest --experimental-acp`.
119+
pub fn google_gemini() -> Self {
120+
Self::from_str("npx -y -- @google/gemini-cli@latest --experimental-acp")
121+
.expect("valid bash command")
122+
}
123+
105124
/// Get the underlying [`sacp::schema::McpServer`] configuration.
106125
pub fn server(&self) -> &sacp::schema::McpServer {
107126
&self.server

0 commit comments

Comments
 (0)