Guide to configure the Claude Agent ACP with the MiniMax API using Bash.
This tutorial is fully adaptable for users of .zshrc or other shells, with only minor changes to environment variable syntax and PATH configuration.
Prerequisites
- Node.js installed
- MiniMax, Kimi, GLM account with an API Key
1. Install Claude Agent ACP globally
npm install -g @zed-industries/claude-agent-acp
2. Configure environment variable
Add to your ~/.bashrc file:
# Define node default on terminal (opcional)
# Check the node version that @zed-industries/claude-agent-acp was installed globally.
if command -v nvm >/dev/null 2>&1; then
nvm use 24 --silent
fi
# KIMI API Key
export KIMI_API_KEY="your-key-here"
3. Create the claudem25-agent-acp script
Create the file cat > ~/.local/bin/claudekimi-agent-acp:
#!/usr/bin/env bash
# Bash script to run ACP with Kimi Coding API
# Usage: claudekimi-agent-acp
# Check if API key exists
if [ -z "$KIMI_API_KEY" ]; then
echo "Error: KIMI_API_KEY is not defined."
exit 1
fi
# Clear existing Anthropic key
unset ANTHROPIC_API_KEY
# Configure Kimi as Anthropic-compatible
export ANTHROPIC_AUTH_TOKEN="$KIMI_API_KEY"
export ANTHROPIC_BASE_URL="https://api.kimi.com/coding/"
export API_TIMEOUT_MS="3000000"
export CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1
export ENABLE_TOOL_SEARCH="false"
export ANTHROPIC_MODEL="kimi-for-coding"
export ANTHROPIC_SMALL_FAST_MODEL="kimi-for-coding"
export ANTHROPIC_DEFAULT_SONNET_MODEL="kimi-for-coding"
export ANTHROPIC_DEFAULT_OPUS_MODEL="kimi-for-coding"
export ANTHROPIC_DEFAULT_HAIKU_MODEL="kimi-for-coding"
# Run ACP globally
claude-agent-acp "$@"
4. Make it executable
chmod +x ~/.local/bin/claudekimi-agent-acp
5. Ensure ~/.local/bin is in PATH
Add to ~/.bashrc:
export PATH="$HOME/.local/bin:$PATH"
6. Usage
Now you can run:
claudekimi-agent-acp
claudekimi-agent-acp --print-only --prompt "your task"
Notes
-
claudem25-agent-acpuses the MiniMax API (M2.5 model) - The official
claude-agent-acpcontinues to work with the Anthropic API - Both can coexist without interfering with each other
RELATED NOTES
How to Set Up Claude Code with Multiple AI Models
https://dev.to/hallancosta/how-to-set-up-claude-code-with-multiple-ai-models-4k6j
How to configure ACP agents in Zed
https://dev.to/hallancosta/how-to-configure-acp-agents-in-zed-521e
Top comments (0)