Skip to content

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

CLI docs added

Sushmithamallesh07c6391da467
diff --git a/fern/docs.yml b/fern/docs.yml
index f38c2d480..2be3863fa 100644
--- a/fern/docs.yml
+++ b/fern/docs.yml
@@ -185,38 +185,44 @@ navigation:
icon: book
skip-slug: true
contents:
+ - page: CLI
+ path: pages/dist/resources/cli.mdx
+ slug: cli
- page: Debugging Info
- path: pages/dist/debugging-info.mdx
+ path: pages/dist/resources/debugging-info.mdx
slug: resources/debugging-info
- page: Migration Guide
- path: pages/dist/migration-guide.mdx
+ path: pages/dist/resources/migration-guide.mdx
slug: migration
- section: Troubleshooting
slug: troubleshooting
contents:
- page: Overview
- path: pages/dist/troubleshooting/overview.mdx
+ path: pages/dist/resources/troubleshooting/overview.mdx
slug: overview
- page: API
- path: pages/dist/troubleshooting/api.mdx
+ path: pages/dist/resources/troubleshooting/api.mdx
slug: api
- page: Authentication
- path: pages/dist/troubleshooting/authentication.mdx
+ path: pages/dist/resources/troubleshooting/authentication.mdx
slug: authentication
+ - page: CLI
+ path: pages/dist/resources/troubleshooting/cli.mdx
+ slug: cli
- page: Dashboard
- path: pages/dist/troubleshooting/dashboard.mdx
+ path: pages/dist/resources/troubleshooting/dashboard.mdx
slug: dashboard
- page: MCP
- path: pages/dist/troubleshooting/mcp.mdx
+ path: pages/dist/resources/troubleshooting/mcp.mdx
slug: mcp
- page: SDKs
- path: pages/dist/troubleshooting/sdks.mdx
+ path: pages/dist/resources/troubleshooting/sdks.mdx
slug: sdks
- page: Tools & Toolkits
- path: pages/dist/troubleshooting/tools.mdx
+ path: pages/dist/resources/troubleshooting/tools.mdx
slug: tools
- page: Triggers
- path: pages/dist/troubleshooting/triggers.mdx
+ path: pages/dist/resources/troubleshooting/triggers.mdx
slug: triggers
- tab: examples
layout:
diff --git a/fern/pages/src/resources/cli.mdx b/fern/pages/src/resources/cli.mdx
new file mode 100644
index 000000000..eacfbe7be
--- /dev/null
+++ b/fern/pages/src/resources/cli.mdx
@@ -0,0 +1,128 @@
+---
+title: CLI
+image: "https://og.composio.dev/api/og?title=Composio%20CLI"
+keywords: 'composio cli, command line, type generation, composio generate, typescript types, python types'
+slug: /docs/cli
+hide-nav-links: false
+---
+
+The Composio CLI helps you generate type-safe code and manage your Composio workspace.
+
+## Installation
+
+Install the Composio CLI using the installation script:
+
+```bash
+curl -fsSL https://composio.dev/install | bash
+```
+
+Or using wget:
+```bash
+wget -qO- https://composio.dev/install | bash
+
+## Authentication
+
+Manage your Composio authentication directly from the terminal.
+
+### Login
+
+Authenticate with your Composio account:
+
+```bash
+composio login
+```
+
+This opens your browser to complete authentication and stores your API key locally.
+
+### Check authentication status
+
+Verify your current authentication:
+
+```bash
+composio whoami
+```
+
+This displays your current API key or indicates if you're not authenticated.
+
+### Logout
+
+Remove stored authentication:
+
+```bash
+composio logout
+```
+
+## Generate type definitions
+
+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.
+
+### Auto-detect and generate
+
+The CLI auto-detects your project language.
+In your project directory:
+
+```bash
+composio generate
+```
+
+For TypeScript projects only, include individual tool types:
+```bash
+composio generate --type-tools
+```
+
+The CLI will:
+1. Detect your project type (Python or TypeScript)
+2. Generate appropriate type stubs
+3. Place them in the correct location
+
+### Specify output directory
+
+```bash
+composio generate --output-dir ./my-types
+```
+
+### Language-specific commands
+
+For explicit control, use language-specific commands:
+
+<Tabs>
+ <Tab title="TypeScript">
+ Basic generation:
+ ```bash
+ composio ts generate
+ ```
+
+ Generate as single file:
+ ```bash
+ composio ts generate --compact
+ ```
+
+ Include individual tool types:
+ ```bash
+ composio ts generate --type-tools
+ ```
+
+ Generate both .ts and .js files:
+ ```bash
+ composio ts generate --transpiled
+ ```
+
+ Custom output directory:
+ ```bash
+ composio ts generate --output-dir ./src/types
+ ```
+ </Tab>
+ <Tab title="Python">
+ Basic generation:
+ ```bash
+ composio py generate
+ ```
+
+ Custom output directory:
+ ```bash
+ composio py generate --output-dir ./my_types
+ ```
+ </Tab>
+</Tabs>
+
+
diff --git a/fern/pages/src/debugging-info.mdx b/fern/pages/src/resources/debugging-info.mdx
similarity index 87%
rename from fern/pages/src/debugging-info.mdx
rename to fern/pages/src/resources/debugging-info.mdx
index 0aaf44658..a1bc2b5e4 100644
--- a/fern/pages/src/debugging-info.mdx
+++ b/fern/pages/src/resources/debugging-info.mdx
@@ -13,11 +13,11 @@ Your debugging info is tied to your project and it helps us trace what happened
Navigate to your project settings to find your debugging information:
<Frame>
- <img src="../../assets/images/debugging-info/project-settings.jpeg" alt="Project Settings Debugging Info" />
+ <img src="../../../assets/images/debugging-info/project-settings.jpeg" alt="Project Settings Debugging Info" />
</Frame>
<Frame>
- <img src="../../assets/images/debugging-info/debugging-info.png" alt="Debugging Info Location" />
+ <img src="../../../assets/images/debugging-info/debugging-info.png" alt="Debugging Info Location" />
</Frame>
## What to Share
diff --git a/fern/pages/src/migration-guide.mdx b/fern/pages/src/resources/migration-guide.mdx
similarity index 100%
rename from fern/pages/src/migration-guide.mdx
rename to fern/pages/src/resources/migration-guide.mdx
diff --git a/fern/pages/src/troubleshooting/api.mdx b/fern/pages/src/resources/troubleshooting/api.mdx
similarity index 100%
rename from fern/pages/src/troubleshooting/api.mdx
rename to fern/pages/src/resources/troubleshooting/api.mdx
diff --git a/fern/pages/src/troubleshooting/authentication.mdx b/fern/pages/src/resources/troubleshooting/authentication.mdx
similarity index 100%
rename from fern/pages/src/troubleshooting/authentication.mdx
rename to fern/pages/src/resources/troubleshooting/authentication.mdx
diff --git a/fern/pages/src/resources/troubleshooting/cli.mdx b/fern/pages/src/resources/troubleshooting/cli.mdx
new file mode 100644
index 000000000..d29da60ef
--- /dev/null
+++ b/fern/pages/src/resources/troubleshooting/cli.mdx
@@ -0,0 +1,255 @@
+---
+title: CLI
+description: Troubleshooting common CLI issues
+---
+
+Common issues and solutions for the Composio CLI.
+
+## Command not found
+
+If you're getting "command not found" when trying to run `composio`:
+
+### Verify installation
+
+Check if the CLI is installed:
+
+```bash
+which composio
+```
+
+This should return the path to the composio executable, typically `~/.composio/composio`.
+
+### Check PATH
+
+Ensure your PATH includes the Composio installation directory:
+
+```bash
+echo $PATH | grep .composio
+```
+
+If not present, add it to your shell configuration:
+
+```bash
+# For bash
+echo 'export PATH="$HOME/.composio:$PATH"' >> ~/.bashrc
+source ~/.bashrc
+
+# For zsh
+echo 'export PATH="$HOME/.composio:$PATH"' >> ~/.zshrc
+source ~/.zshrc
+```
+
+### Reinstall
+
+If the CLI isn't installed or PATH issues persist:
+
+```bash
+# Remove existing installation
+rm -f ~/.composio/composio
+
+# Reinstall
+curl -fsSL https://composio.dev/install | bash
+```
+
+Or using wget:
+```bash
+wget -qO- https://composio.dev/install | bash
+```
+
+## Authentication errors
+
+### Invalid API key
+
+If you're getting authentication errors:
+
+1. Check your current authentication status:
+```bash
+composio whoami
+```
+
+2. If no API key is found or it's invalid, re-authenticate:
+```bash
+composio logout
+composio login
+```
+
+### CI/CD authentication
+
+For automated environments, set the API key via environment variable:
+
+```bash
+export COMPOSIO_API_KEY="your-api-key"
+```
+
+Common issues:
+- Ensure the API key is properly exported
+- Check for typos in the environment variable name
+- Verify the API key hasn't expired
+
+## Generate command issues
+
+### Project type not detected
+
+The CLI auto-detects project type by looking for:
+- **TypeScript**: `package.json`, `tsconfig.json`
+- **Python**: `requirements.txt`, `setup.py`, `pyproject.toml`
+
+If auto-detection fails:
+
+1. Use language-specific commands:
+```bash
+composio ts generate # For TypeScript
+composio py generate # For Python
+```
+
+2. Ensure you're in the project root directory:
+```bash
+cd /path/to/your/project
+composio generate
+```
+
+### Output directory issues
+
+If generated files aren't appearing where expected:
+
+1. Specify output directory explicitly:
+```bash
+composio generate --output-dir ./my-types
+```
+
+2. Check write permissions:
+```bash
+ls -la ./ # Unix/Linux/macOS
+dir # Windows
+```
+
+### Cache issues
+
+If you're getting stale or outdated type definitions:
+
+1. Clear the cache:
+```bash
+rm -rf ~/.composio/*.json
+```
+
+2. Force fresh generation:
+```bash
+FORCE_USE_CACHE=false composio generate
+```
+
+## Network issues
+
+### Behind a proxy
+
+Configure proxy settings:
+
+```bash
+export HTTP_PROXY=http://proxy.company.com:8080
+export HTTPS_PROXY=http://proxy.company.com:8080
+```
+
+### API connection errors
+
+If you can't connect to Composio API:
+
+1. Check base URL configuration:
+```bash
+echo $COMPOSIO_BASE_URL
+```
+
+2. Reset to default if needed:
+```bash
+unset COMPOSIO_BASE_URL
+composio login
+```
+
+## Version issues
+
+### Outdated CLI
+
+Check your current version:
+```bash
+composio version
+```
+
+Upgrade to latest:
+```bash
+composio upgrade
+```
+
+### Version mismatch with SDK
+
+Ensure CLI and SDK versions are compatible:
+
+```bash
+# Check CLI version
+composio version
+
+# Check SDK version (TypeScript)
+npm list @composio/core
+
+# Check SDK version (Python)
+pip show composio
+```
+
+## Logging and debugging
+
+### Enable debug logging
+
+For detailed output during troubleshooting:
+
+```bash
+composio --log-level debug [command]
+```
+
+Available log levels:
+- `all` - Most verbose
+- `trace`
+- `debug`
+- `info`
+- `warning`
+- `error`
+- `fatal`
+- `none` - Silent
+
+### View configuration
+
+Check current configuration and environment:
+
+```bash
+# View stored user data
+cat ~/.composio/user_data.json
+
+# Check all Composio environment variables
+env | grep COMPOSIO
+```
+
+## Common error messages
+
+### "API key not found"
+
+Run `composio login` to authenticate.
+
+### "Failed to detect project type"
+
+Ensure you're in a valid Python or TypeScript project directory, or use language-specific commands.
+
+### "Permission denied"
+
+Check write permissions for the output directory or use `sudo` if necessary (not recommended for global installs).
+
+### "Network timeout"
+
+Check your internet connection and proxy settings if applicable.
+
+## Getting help
+
+If you're still experiencing issues:
+
+1. Check the [GitHub issues](https://github.com/ComposioHQ/composio/issues)
+2. Join the [Discord community](https://discord.gg/composio)
+3. Contact support with:
+ - CLI version (`composio version`)
+ - Error message
+ - Steps to reproduce
+ - Environment details (OS, Node.js/Python version)
\ No newline at end of file
diff --git a/fern/pages/src/troubleshooting/dashboard.mdx b/fern/pages/src/resources/troubleshooting/dashboard.mdx
similarity index 100%
rename from fern/pages/src/troubleshooting/dashboard.mdx
rename to fern/pages/src/resources/troubleshooting/dashboard.mdx
diff --git a/fern/pages/src/troubleshooting/mcp.mdx b/fern/pages/src/resources/troubleshooting/mcp.mdx
similarity index 100%
rename from fern/pages/src/troubleshooting/mcp.mdx
rename to fern/pages/src/resources/troubleshooting/mcp.mdx
diff --git a/fern/pages/src/troubleshooting/overview.mdx b/fern/pages/src/resources/troubleshooting/overview.mdx
similarity index 100%
rename from fern/pages/src/troubleshooting/overview.mdx
rename to fern/pages/src/resources/troubleshooting/overview.mdx
diff --git a/fern/pages/src/troubleshooting/sdks.mdx b/fern/pages/src/resources/troubleshooting/sdks.mdx
similarity index 100%
rename from fern/pages/src/troubleshooting/sdks.mdx
rename to fern/pages/src/resources/troubleshooting/sdks.mdx
diff --git a/fern/pages/src/troubleshooting/tools.mdx b/fern/pages/src/resources/troubleshooting/tools.mdx
similarity index 100%
rename from fern/pages/src/troubleshooting/tools.mdx
rename to fern/pages/src/resources/troubleshooting/tools.mdx
diff --git a/fern/pages/src/troubleshooting/triggers.mdx b/fern/pages/src/resources/troubleshooting/triggers.mdx
similarity index 100%
rename from fern/pages/src/troubleshooting/triggers.mdx
rename to fern/pages/src/resources/troubleshooting/triggers.mdx
diff --git a/fern/pages/src/tool-calling/executing-tools.mdx b/fern/pages/src/tool-calling/executing-tools.mdx
index 9c9dcc129..62e3b1700 100644
--- a/fern/pages/src/tool-calling/executing-tools.mdx
+++ b/fern/pages/src/tool-calling/executing-tools.mdx
@@ -59,9 +59,11 @@ Composio provides support for frameworks like this by making sure the tools are
In case you just want to call a tool without using any framework or LLM provider, you can use the `execute` method directly.
<Tip icon="lightbulb">
- **Finding tool arguments**: In the [Auth Configs
- tab](https://platform.composio.dev?next_page=/auth-configs) → Select your toolkit → Tools &
- Triggers → Select the tool to see its required and optional parameters, types, and descriptions.
+ **Finding tool parameters and types:**
+
+ **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
+
+ **CLI**: For python and typescript projects, run `composio generate` to generate types. [Learn more →](/docs/cli#generate-type-definitions)
</Tip>
<CodeGroup>
<SnippetCode src="fern/snippets/tool-calling/python/direct-tool-call.py" title="Python" />