@devries-cameron20 / composio Mirror · read-only / commits / 07c6391da
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.

Mirrored from https://github.com/Camo67/composio.git

Synced Nov 22, 19:30 UTC

CLI docs added

Sushmithamallesh committed Oct 27, 2025 at 15:37 UTC 07c6391da4671f88c075e8f951a4e9739ec011f6
14 files changed +406 -15
fern/docs.yml
+16 -10
@@ -185,38 +185,44 @@ navigation:
185 icon: book
186 skip-slug: true
187 contents:
188 + - page: CLI
189 + path: pages/dist/resources/cli.mdx
190 + slug: cli
191 - page: Debugging Info
189 - path: pages/dist/debugging-info.mdx
192 + path: pages/dist/resources/debugging-info.mdx
193 slug: resources/debugging-info
194 - page: Migration Guide
192 - path: pages/dist/migration-guide.mdx
195 + path: pages/dist/resources/migration-guide.mdx
196 slug: migration
197 - section: Troubleshooting
198 slug: troubleshooting
199 contents:
200 - page: Overview
198 - path: pages/dist/troubleshooting/overview.mdx
201 + path: pages/dist/resources/troubleshooting/overview.mdx
202 slug: overview
203 - page: API
201 - path: pages/dist/troubleshooting/api.mdx
204 + path: pages/dist/resources/troubleshooting/api.mdx
205 slug: api
206 - page: Authentication
204 - path: pages/dist/troubleshooting/authentication.mdx
207 + path: pages/dist/resources/troubleshooting/authentication.mdx
208 slug: authentication
209 + - page: CLI
210 + path: pages/dist/resources/troubleshooting/cli.mdx
211 + slug: cli
212 - page: Dashboard
207 - path: pages/dist/troubleshooting/dashboard.mdx
213 + path: pages/dist/resources/troubleshooting/dashboard.mdx
214 slug: dashboard
215 - page: MCP
210 - path: pages/dist/troubleshooting/mcp.mdx
216 + path: pages/dist/resources/troubleshooting/mcp.mdx
217 slug: mcp
218 - page: SDKs
213 - path: pages/dist/troubleshooting/sdks.mdx
219 + path: pages/dist/resources/troubleshooting/sdks.mdx
220 slug: sdks
221 - page: Tools & Toolkits
216 - path: pages/dist/troubleshooting/tools.mdx
222 + path: pages/dist/resources/troubleshooting/tools.mdx
223 slug: tools
224 - page: Triggers
219 - path: pages/dist/troubleshooting/triggers.mdx
225 + path: pages/dist/resources/troubleshooting/triggers.mdx
226 slug: triggers
227 - tab: examples
228 layout:
fern/pages/src/resources/cli.mdx new
+128
@@ -0,0 +1,128 @@
1 +---
2 +title: CLI
3 +image: "https://og.composio.dev/api/og?title=Composio%20CLI"
4 +keywords: 'composio cli, command line, type generation, composio generate, typescript types, python types'
5 +slug: /docs/cli
6 +hide-nav-links: false
7 +---
8 +
9 +The Composio CLI helps you generate type-safe code and manage your Composio workspace.
10 +
11 +## Installation
12 +
13 +Install the Composio CLI using the installation script:
14 +
15 +```bash
16 +curl -fsSL https://composio.dev/install | bash
17 +```
18 +
19 +Or using wget:
20 +```bash
21 +wget -qO- https://composio.dev/install | bash
22 +
23 +## Authentication
24 +
25 +Manage your Composio authentication directly from the terminal.
26 +
27 +### Login
28 +
29 +Authenticate with your Composio account:
30 +
31 +```bash
32 +composio login
33 +```
34 +
35 +This opens your browser to complete authentication and stores your API key locally.
36 +
37 +### Check authentication status
38 +
39 +Verify your current authentication:
40 +
41 +```bash
42 +composio whoami
43 +```
44 +
45 +This displays your current API key or indicates if you're not authenticated.
46 +
47 +### Logout
48 +
49 +Remove stored authentication:
50 +
51 +```bash
52 +composio logout
53 +```
54 +
55 +## Generate type definitions
56 +
57 +Generate TypeScript or Python type definitions for all Composio tools. These types provide type safety when using direct tool execution (`composio.tools.execute()`), helping you pass the correct parameters and catch errors early.
58 +
59 +### Auto-detect and generate
60 +
61 +The CLI auto-detects your project language.
62 +In your project directory:
63 +
64 +```bash
65 +composio generate
66 +```
67 +
68 +For TypeScript projects only, include individual tool types:
69 +```bash
70 +composio generate --type-tools
71 +```
72 +
73 +The CLI will:
74 +1. Detect your project type (Python or TypeScript)
75 +2. Generate appropriate type stubs
76 +3. Place them in the correct location
77 +
78 +### Specify output directory
79 +
80 +```bash
81 +composio generate --output-dir ./my-types
82 +```
83 +
84 +### Language-specific commands
85 +
86 +For explicit control, use language-specific commands:
87 +
88 +<Tabs>
89 + <Tab title="TypeScript">
90 + Basic generation:
91 + ```bash
92 + composio ts generate
93 + ```
94 +
95 + Generate as single file:
96 + ```bash
97 + composio ts generate --compact
98 + ```
99 +
100 + Include individual tool types:
101 + ```bash
102 + composio ts generate --type-tools
103 + ```
104 +
105 + Generate both .ts and .js files:
106 + ```bash
107 + composio ts generate --transpiled
108 + ```
109 +
110 + Custom output directory:
111 + ```bash
112 + composio ts generate --output-dir ./src/types
113 + ```
114 + </Tab>
115 + <Tab title="Python">
116 + Basic generation:
117 + ```bash
118 + composio py generate
119 + ```
120 +
121 + Custom output directory:
122 + ```bash
123 + composio py generate --output-dir ./my_types
124 + ```
125 + </Tab>
126 +</Tabs>
127 +
128 +
fern/pages/src/resources/debugging-info.mdx renamed
+2 -2
@@ -13,11 +13,11 @@ Your debugging info is tied to your project and it helps us trace what happened
13 Navigate to your project settings to find your debugging information:
14
15 <Frame>
16 - <img src="../../assets/images/debugging-info/project-settings.jpeg" alt="Project Settings Debugging Info" />
16 + <img src="../../../assets/images/debugging-info/project-settings.jpeg" alt="Project Settings Debugging Info" />
17 </Frame>
18
19 <Frame>
20 - <img src="../../assets/images/debugging-info/debugging-info.png" alt="Debugging Info Location" />
20 + <img src="../../../assets/images/debugging-info/debugging-info.png" alt="Debugging Info Location" />
21 </Frame>
22
23 ## What to Share
fern/pages/src/resources/migration-guide.mdx renamed
fern/pages/src/resources/troubleshooting/api.mdx renamed
fern/pages/src/resources/troubleshooting/authentication.mdx renamed
fern/pages/src/resources/troubleshooting/cli.mdx new
+255
@@ -0,0 +1,255 @@
1 +---
2 +title: CLI
3 +description: Troubleshooting common CLI issues
4 +---
5 +
6 +Common issues and solutions for the Composio CLI.
7 +
8 +## Command not found
9 +
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:
15 +
16 +```bash
17 +which composio
18 +```
19 +
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:
25 +
26 +```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
51 +curl -fsSL https://composio.dev/install | bash
52 +```
53 +
54 +Or using wget:
55 +```bash
56 +wget -qO- https://composio.dev/install | bash
57 +```
58 +
59 +## Authentication errors
60 +
61 +### Invalid API key
62 +
63 +If you're getting authentication errors:
64 +
65 +1. Check your current authentication status:
66 +```bash
67 +composio whoami
68 +```
69 +
70 +2. If no API key is found or it's invalid, re-authenticate:
71 +```bash
72 +composio logout
73 +composio login
74 +```
75 +
76 +### CI/CD authentication
77 +
78 +For automated environments, set the API key via environment variable:
79 +
80 +```bash
81 +export COMPOSIO_API_KEY="your-api-key"
82 +```
83 +
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
90 +
91 +### Project type not detected
92 +
93 +The CLI auto-detects project type by looking for:
94 +- **TypeScript**: `package.json`, `tsconfig.json`
95 +- **Python**: `requirements.txt`, `setup.py`, `pyproject.toml`
96 +
97 +If auto-detection fails:
98 +
99 +1. Use language-specific commands:
100 +```bash
101 +composio ts generate # For TypeScript
102 +composio py generate # For Python
103 +```
104 +
105 +2. Ensure you're in the project root directory:
106 +```bash
107 +cd /path/to/your/project
108 +composio generate
109 +```
110 +
111 +### Output directory issues
112 +
113 +If generated files aren't appearing where expected:
114 +
115 +1. Specify output directory explicitly:
116 +```bash
117 +composio generate --output-dir ./my-types
118 +```
119 +
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
141 +
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:
200 +
201 +```bash
202 +composio --log-level debug [command]
203 +```
204 +
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:
218 +
219 +```bash
220 +# View stored user data
221 +cat ~/.composio/user_data.json
222 +
223 +# Check all Composio environment variables
224 +env | grep COMPOSIO
225 +```
226 +
227 +## Common error messages
228 +
229 +### "API key not found"
230 +
231 +Run `composio login` to authenticate.
232 +
233 +### "Failed to detect project type"
234 +
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.
244 +
245 +## Getting help
246 +
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
fern/pages/src/resources/troubleshooting/dashboard.mdx renamed
fern/pages/src/resources/troubleshooting/mcp.mdx renamed
fern/pages/src/resources/troubleshooting/overview.mdx renamed
fern/pages/src/resources/troubleshooting/sdks.mdx renamed
fern/pages/src/resources/troubleshooting/tools.mdx renamed
fern/pages/src/resources/troubleshooting/triggers.mdx renamed
fern/pages/src/tool-calling/executing-tools.mdx
+5 -3
@@ -59,9 +59,11 @@ Composio provides support for frameworks like this by making sure the tools are
59 In case you just want to call a tool without using any framework or LLM provider, you can use the `execute` method directly.
60
61 <Tip icon="lightbulb">
62 - **Finding tool arguments**: In the [Auth Configs
63 - tab](https://platform.composio.dev?next_page=/auth-configs) → Select your toolkit → Tools &
64 - Triggers → Select the tool to see its required and optional parameters, types, and descriptions.
62 + **Finding tool parameters and types:**
63 +
64 + **Platform UI**: [Auth Configs](https://platform.composio.dev?next_page=/auth-configs) → Select your toolkit → Tools & Triggers → Select the tool to see its required and optional parameters
65 +
66 + **CLI**: For python and typescript projects, run `composio generate` to generate types. [Learn more →](/docs/cli#generate-type-definitions)
67 </Tip>
68 <CodeGroup>
69 <SnippetCode src="fern/snippets/tool-calling/python/direct-tool-call.py" title="Python" />