@devries-cameron20 / composio-1 / commits / 0f9609126
Fork 0

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

fix cli troubleshooting

Sushmithamallesh committed Oct 27, 2025 at 18:02 UTC 0f960912679bdee65acc5476da2e7a809ddfefa7
2 files changed +42 -196
fern/pages/src/resources/cli.mdx
+11 -4
@@ -35,6 +35,14 @@ composio login
35
36 This opens your browser to complete authentication and stores your API key locally.
37
38 +To authenticate without opening a browser (useful for SSH/remote sessions):
39 +
40 +```bash
41 +composio login --no-browser
42 +```
43 +
44 +This displays a URL to manually open in your browser.
45 +
46 ### Check authentication status
47
48 Verify your current authentication:
@@ -71,10 +79,9 @@ For TypeScript projects only, include individual tool types:
79 composio generate --type-tools
80 ```
81
74 -The CLI will:
75 -1. Detect your project type (Python or TypeScript)
76 -2. Generate appropriate type stubs
77 -3. Place them in the correct location
82 +The CLI automatically:
83 +- Detects your project type (Python or TypeScript)
84 +- Generates appropriate type definitions
85
86 ### Specify output directory
87
fern/pages/src/resources/troubleshooting/cli.mdx
+31 -192
@@ -1,255 +1,94 @@
1 ---
2 title: CLI
3 -description: Troubleshooting common CLI issues
3 +subtitle: Troubleshooting common CLI issues
4 +image: "https://og.composio.dev/api/og?title=CLI%20Troubleshooting"
5 +keywords: 'cli, command line, troubleshooting, installation, authentication'
6 +hide-nav-links: true
7 ---
8
6 -Common issues and solutions for the Composio CLI.
7 -
9 ## Command not found
10
10 -If you're getting "command not found" when trying to run `composio`:
11 -
12 -### Verify installation
13 -
14 -Check if the CLI is installed:
11 +Verify the CLI is installed and in your PATH:
12
13 ```bash
14 which composio
15 ```
16
20 -This should return the path to the composio executable, typically `~/.composio/composio`.
21 -
22 -### Check PATH
23 -
24 -Ensure your PATH includes the Composio installation directory:
17 +If not found, reinstall:
18
19 ```bash
27 -echo $PATH | grep .composio
28 -```
29 -
30 -If not present, add it to your shell configuration:
31 -
32 -```bash
33 -# For bash
34 -echo 'export PATH="$HOME/.composio:$PATH"' >> ~/.bashrc
35 -source ~/.bashrc
36 -
37 -# For zsh
38 -echo 'export PATH="$HOME/.composio:$PATH"' >> ~/.zshrc
39 -source ~/.zshrc
40 -```
41 -
42 -### Reinstall
43 -
44 -If the CLI isn't installed or PATH issues persist:
45 -
46 -```bash
47 -# Remove existing installation
48 -rm -f ~/.composio/composio
49 -
50 -# Reinstall
20 curl -fsSL https://composio.dev/install | bash
21 ```
22
54 -Or using wget:
23 +Or add to PATH:
24 +
25 ```bash
56 -wget -qO- https://composio.dev/install | bash
26 +echo 'export PATH="$HOME/.composio:$PATH"' >> ~/.bashrc && source ~/.bashrc
27 ```
28
29 ## Authentication errors
30
61 -### Invalid API key
62 -
63 -If you're getting authentication errors:
31 +Check current authentication:
32
65 -1. Check your current authentication status:
33 ```bash
34 composio whoami
35 ```
36
70 -2. If no API key is found or it's invalid, re-authenticate:
37 +Re-authenticate if needed:
38 +
39 ```bash
40 composio logout
41 composio login
42 ```
43
76 -### CI/CD authentication
77 -
78 -For automated environments, set the API key via environment variable:
44 +For CI/CD, use environment variable:
45
46 ```bash
47 export COMPOSIO_API_KEY="your-api-key"
48 ```
49
84 -Common issues:
85 -- Ensure the API key is properly exported
86 -- Check for typos in the environment variable name
87 -- Verify the API key hasn't expired
88 -
89 -## Generate command issues
50 +## Type generation issues
51
52 ### Project type not detected
53
93 -The CLI auto-detects project type by looking for:
94 -- **TypeScript**: `package.json`, `tsconfig.json`
95 -- **Python**: `requirements.txt`, `setup.py`, `pyproject.toml`
54 +Use language-specific commands:
55
97 -If auto-detection fails:
98 -
99 -1. Use language-specific commands:
56 ```bash
101 -composio ts generate # For TypeScript
102 -composio py generate # For Python
57 +composio ts generate # TypeScript
58 +composio py generate # Python
59 ```
60
105 -2. Ensure you're in the project root directory:
106 -```bash
107 -cd /path/to/your/project
108 -composio generate
109 -```
61 +### Output directory missing
62
111 -### Output directory issues
63 +Specify output directory explicitly:
64
113 -If generated files aren't appearing where expected:
114 -
115 -1. Specify output directory explicitly:
65 ```bash
66 composio generate --output-dir ./my-types
67 ```
68
120 -2. Check write permissions:
121 -```bash
122 -ls -la ./ # Unix/Linux/macOS
123 -dir # Windows
124 -```
125 -
126 -### Cache issues
127 -
128 -If you're getting stale or outdated type definitions:
129 -
130 -1. Clear the cache:
131 -```bash
132 -rm -rf ~/.composio/*.json
133 -```
134 -
135 -2. Force fresh generation:
136 -```bash
137 -FORCE_USE_CACHE=false composio generate
138 -```
139 -
140 -## Network issues
69 +## Debug CLI issues
70
142 -### Behind a proxy
143 -
144 -Configure proxy settings:
145 -
146 -```bash
147 -export HTTP_PROXY=http://proxy.company.com:8080
148 -export HTTPS_PROXY=http://proxy.company.com:8080
149 -```
150 -
151 -### API connection errors
152 -
153 -If you can't connect to Composio API:
154 -
155 -1. Check base URL configuration:
156 -```bash
157 -echo $COMPOSIO_BASE_URL
158 -```
159 -
160 -2. Reset to default if needed:
161 -```bash
162 -unset COMPOSIO_BASE_URL
163 -composio login
164 -```
165 -
166 -## Version issues
167 -
168 -### Outdated CLI
169 -
170 -Check your current version:
171 -```bash
172 -composio version
173 -```
174 -
175 -Upgrade to latest:
176 -```bash
177 -composio upgrade
178 -```
179 -
180 -### Version mismatch with SDK
181 -
182 -Ensure CLI and SDK versions are compatible:
183 -
184 -```bash
185 -# Check CLI version
186 -composio version
187 -
188 -# Check SDK version (TypeScript)
189 -npm list @composio/core
190 -
191 -# Check SDK version (Python)
192 -pip show composio
193 -```
194 -
195 -## Logging and debugging
196 -
197 -### Enable debug logging
198 -
199 -For detailed output during troubleshooting:
71 +Enable debug logging:
72
73 ```bash
74 composio --log-level debug [command]
75 ```
76
205 -Available log levels:
206 -- `all` - Most verbose
207 -- `trace`
208 -- `debug`
209 -- `info`
210 -- `warning`
211 -- `error`
212 -- `fatal`
213 -- `none` - Silent
214 -
215 -### View configuration
216 -
217 -Check current configuration and environment:
77 +Check version compatibility:
78
79 ```bash
220 -# View stored user data
221 -cat ~/.composio/user_data.json
222 -
223 -# Check all Composio environment variables
224 -env | grep COMPOSIO
80 +composio version
81 ```
82
227 -## Common error messages
228 -
229 -### "API key not found"
230 -
231 -Run `composio login` to authenticate.
232 -
233 -### "Failed to detect project type"
83 +## Common issues
84
235 -Ensure you're in a valid Python or TypeScript project directory, or use language-specific commands.
236 -
237 -### "Permission denied"
238 -
239 -Check write permissions for the output directory or use `sudo` if necessary (not recommended for global installs).
240 -
241 -### "Network timeout"
242 -
243 -Check your internet connection and proxy settings if applicable.
85 +- **API key not found**: Run `composio login`
86 +- **Project type detection fails**: Use language-specific commands or ensure you're in project root
87 +- **Network timeout**: Check internet connection and proxy settings
88 +- **Permission denied**: Check directory write permissions
89
90 ## Getting help
91
247 -If you're still experiencing issues:
248 -
249 -1. Check the [GitHub issues](https://github.com/ComposioHQ/composio/issues)
250 -2. Join the [Discord community](https://discord.gg/composio)
251 -3. Contact support with:
252 - - CLI version (`composio version`)
253 - - Error message
254 - - Steps to reproduce
255 - - Environment details (OS, Node.js/Python version)
\ No newline at end of file
92 +- **Email**: support@composio.dev
93 +- **Discord**: [#support-form](https://discord.com/channels/1170785031560646836/1268871288156323901)
94 +- **GitHub**: [Create an issue](https://github.com/ComposioHQ/composio/issues/new?labels=bug)
\ No newline at end of file