Skip to content

Open-source Grok Bot alternative with a virtual machine that bots can use

Docs: run Command Code as a custom ACP engine (#4368)

Aditya Umale2df2e6c27b76
diff --git a/docs/custom-engines.md b/docs/custom-engines.md
index dac07387e3..f5d2a9d72a 100644
--- a/docs/custom-engines.md
+++ b/docs/custom-engines.md
@@ -97,6 +97,45 @@ OpenMausBot never passes its own `MISTRAL_API_KEY` to the CLI, so turns use the
Vibe sign-in from step 2. Without it, the chat shows `Missing API key for
mistral provider`: sign in again from a terminal (step 2).
+### Example: Command Code
+
+[Command Code](https://commandcode.ai) has an ACP mode, `cmd acp`, so it runs as
+a custom ACP engine with your own Command Code sign-in. (Checked with
+`command-code` 1.88.2.)
+
+1. Install it: `npm install -g command-code`. This puts `cmd` on your `PATH`;
+ on Windows the command is `cmdc`, because `cmd` is the Windows command
+ prompt.
+2. Sign in once from a terminal: run `cmd login` (`cmdc login` on Windows).
+ On a server without a browser, create an API key in Command Code Studio
+ instead and put it in the instance's `environment` as
+ `COMMAND_CODE_API_KEY`; OpenMausBot passes it to the CLI.
+3. Add the instance and restart OpenMausBot:
+
+ ```json
+ {
+ "instances": {
+ "command-code": {
+ "driver": "customAcp",
+ "displayName": "Command Code",
+ "config": { "cli": "cmd acp" }
+ }
+ }
+ }
+ ```
+
+ Use `"cmdc acp"` on Windows, and the full path when the npm global folder
+ is not on the app's `PATH`: `which cmd` on macOS or Linux, or
+ `where.exe cmdc` on Windows.
+4. Pick **Command Code** for a bot. Its model menu shows **Agent default**,
+ which runs Command Code's own default model; **Re-detect** lists the models
+ it advertises once you're signed in.
+
+Without a sign-in the chat shows ``Not authenticated. Run `cmd login` in a
+terminal first.``: sign in from a terminal (step 2). A wrong
+`COMMAND_CODE_API_KEY` shows `401 error: Invalid 'Authorization' header or
+token.`
+
## Any OpenAI-compatible endpoint (no process at all)
The built-in `openai-compat` driver supports multiple instances, so a local