install
source · Clone the upstream repo
git clone https://github.com/smallnest/imclaw
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/smallnest/imclaw "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/acp-remote" ~/.claude/skills/smallnest-imclaw-acp-remote && rm -rf "$T"
manifest:
skills/acp-remote/SKILL.mdsource content
ACP Remote
Connect to a remote ACP (Agent Client Protocol) server and execute commands using
imclaw-cli.
Prerequisites
Auto-install dependencies
Before using this skill, ensure both
imclaw-cli and acpx are installed. Run these commands to install them automatically:
# Install acpx (ACP protocol support) if ! command -v acpx &> /dev/null; then npm install -g acpx@latest fi # Install imclaw-cli if ! command -v imclaw-cli &> /dev/null; then curl -fsSL https://raw.githubusercontent.com/smallnest/imclaw/main/scripts/install.sh | bash fi
Manual installation
Install acpx
npm install -g acpx@latest
Install imclaw-cli
From GitHub Releases:
# 1. Detect your platform OS=$(uname -s | tr '[:upper:]' '[:lower:]') ARCH=$(uname -m) [ "$ARCH" = "x86_64" ] && ARCH="amd64" [ "$ARCH" = "aarch64" ] && ARCH="arm64" # 2. Get latest release version LATEST=$(curl -s https://api.github.com/repos/smallnest/imclaw/releases/latest | grep '"tag_name"' | sed -E 's/.*"([^"]+)".*/\1/') # 3. Download and extract curl -sL "https://github.com/smallnest/imclaw/releases/download/${LATEST}/imclaw_${OS}_${ARCH}.tar.gz" | tar xz -C /tmp # 4. Install to PATH mkdir -p ~/bin mv /tmp/imclaw-cli ~/bin/ chmod +x ~/bin/imclaw-cli # 5. Ensure ~/bin is in PATH echo 'export PATH="$HOME/bin:$PATH"' >> ~/.bashrc # or ~/.zshrc
Verify installation
imclaw-cli --help acpx --version
Configuration
Set the remote server URL and optional auth token:
# Default server (can be omitted if using default) export IMCLAW_SERVER="ws://your-server:8080/ws" # Auth token (if server requires authentication) export IMCLAW_TOKEN="your-secret-token"
Or pass directly via command line.
Server Configuration
IMClaw server uses command line flags (no config file needed):
# Start server with default settings imclaw # Custom port and auth token imclaw --port 9000 --token my-secret-token # Show help imclaw --help
| Flag | Default | Description |
|---|---|---|
| | Server host address |
| | Server port |
| | Default timeout in seconds |
| | Authentication token (empty = no auth) |
Usage
One-shot mode (recommended)
# Basic usage imclaw-cli --server ws://your-server:8080/ws -p "Hello" # With auth token imclaw-cli --server ws://your-server:8080/ws --token your-token -p "Hello" # Use specific agent imclaw-cli --server ws://your-server:8080/ws --agent codex -p "Analyze this code" # JSON output imclaw-cli --server ws://your-server:8080/ws --format json -p "List files"
Continue a session
# First message creates session, returns session ID imclaw-cli --server ws://your-server:8080/ws -p "Read the README.md" # Continue with same session imclaw-cli --server ws://your-server:8080/ws --session <session-id> -p "Summarize it"
Parameters
| Parameter | Description |
|---|---|
| WebSocket URL of ACP server (default: ws://localhost:8080/ws) |
| Authentication token (if required) |
| Prompt message (one-shot mode) |
| Session ID to continue |
| Agent type: claude, codex, etc. (default: claude) |
| Output format: text, json, quiet (default: text) |
| Auto-approve all permission requests |
| Auto-approve reads, prompt for writes (default) |
| Deny all permission requests |
| Comma-separated tool names (default: Bash,Read,Write) |
| Working directory |
| Max wait time in seconds |
| Agent model ID |
Examples
Execute shell commands on remote
imclaw-cli --server ws://remote-server:8080/ws \ --agent claude \ --approve-all \ -p "Run 'df -h' and show disk usage"
Analyze remote codebase
imclaw-cli --server ws://remote-server:8080/ws \ --cwd /path/to/project \ -p "Review the main.go file and suggest improvements"
Use with SSH tunnel
# Create SSH tunnel first ssh -L 8080:localhost:8080 user@remote-server -N & # Connect via localhost imclaw-cli --server ws://localhost:8080/ws -p "Hello from remote"
Secure connection with token
# Server configured with auth_token imclaw-cli \ --server wss://secure-server:8080/ws \ --token "your-secret-token" \ -p "Execute analysis task"
Environment Variables
For convenience, you can set these environment variables:
# In ~/.bashrc or ~/.zshrc export IMCLAW_SERVER="ws://your-server:8080/ws" export IMCLAW_TOKEN="your-token"
Then simply run:
imclaw-cli --server $IMCLAW_SERVER --token $IMCLAW_TOKEN -p "Hello"
Tips
- Session reuse: Save the session ID from first response to continue conversations
- Permission control: Use
for non-interactive automation--approve-all - Output parsing: Use
for programmatic consumption--format json - Tool restrictions: Use
to limit what the agent can do--allowed-tools - Working directory: Always specify
for file operations--cwd