docs(cli): Add Quick Start with Aliases section
Browse files- docs/CLI_INTEGRATION.md +22 -1
docs/CLI_INTEGRATION.md
CHANGED
|
@@ -82,7 +82,28 @@ api_key: "your-api-key-here"
|
|
| 82 |
|
| 83 |
---
|
| 84 |
|
| 85 |
-
##
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 86 |
|
| 87 |
Many other CLI tools support custom OpenAI endpoints. The standard configuration pattern involves setting `OPENAI_API_BASE` and `OPENAI_API_KEY`.
|
| 88 |
|
|
|
|
| 82 |
|
| 83 |
---
|
| 84 |
|
| 85 |
+
## Quick Start with Aliases (Easy Mode)
|
| 86 |
+
|
| 87 |
+
To avoid manually exporting environment variables every time, you can use the provided helper functions.
|
| 88 |
+
|
| 89 |
+
### 1. Source the Helper Script
|
| 90 |
+
|
| 91 |
+
Add this to your `.bashrc` or `.zshrc`, or run it in your current terminal:
|
| 92 |
+
|
| 93 |
+
```bash
|
| 94 |
+
source examples/cli-config/proxy-tools.rc
|
| 95 |
+
```
|
| 96 |
+
|
| 97 |
+
### 2. Run Tools with the `p-` Prefix
|
| 98 |
+
|
| 99 |
+
Now you can use the following commands to automatically target the proxy:
|
| 100 |
+
|
| 101 |
+
* **`p-claude`**: Runs Claude Code through the proxy.
|
| 102 |
+
* **`p-code`**: Runs Open Interpreter through the proxy.
|
| 103 |
+
|
| 104 |
+
These functions use subshells to ensure your global environment variables (like `ANTHROPIC_BASE_URL`) are only set for that specific command execution and do not "leak" to the rest of your session.
|
| 105 |
+
|
| 106 |
+
---
|
| 107 |
|
| 108 |
Many other CLI tools support custom OpenAI endpoints. The standard configuration pattern involves setting `OPENAI_API_BASE` and `OPENAI_API_KEY`.
|
| 109 |
|