From 5730d4b801c9ce7259a879b8602e67826d45b8c7 Mon Sep 17 00:00:00 2001 From: Nandan Priyadarshi Date: Sat, 28 Mar 2026 23:48:32 +0800 Subject: [PATCH] fix: [#86] Improve trae-cli installation docs and troubleshooting Expand the 'command not found' troubleshooting section with three approaches to running trae-cli (activate venv, uv run, direct binary), plus a tip about persisting venv activation in shell profile. --- README.md | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0e47f059..9a99e74d 100644 --- a/README.md +++ b/README.md @@ -253,11 +253,27 @@ echo $OPENAI_API_KEY trae-cli show-config ``` -**Command Not Found:** +**`trae-cli: command not found`:** + +This happens when the virtual environment's `bin/` directory is not on your `PATH`. Fix it with one of these approaches: + ```bash +# Option 1: Activate the virtual environment (recommended) +source .venv/bin/activate +trae-cli run "your task" + +# Option 2: Use `uv run` (no activation needed) uv run trae-cli run "your task" + +# Option 3: Call the binary directly +.venv/bin/trae-cli run "your task" ``` +> **Tip:** If the command disappears after opening a new terminal, make sure you activate the venv first (`source .venv/bin/activate`). You can add this to your shell profile for convenience: +> ```bash +> echo 'source /path/to/trae-agent/.venv/bin/activate' >> ~/.bashrc +> ``` + **Permission Errors:** ```bash chmod +x /path/to/your/project