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.

docs: resolve merge conflict in cli.mdx

Sushmitha Malleshfd17bb20ada8
diff --cc docs/content/docs/cli.mdx
index cb662487f,9eef38bd7..b893d134d
--- a/docs/content/docs/cli.mdx
+++ b/docs/content/docs/cli.mdx
@@@ -14,63 -12,95 +12,99 @@@ The Composio CLI lets you manage toolki
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:
+ ## Getting started
```bash
+ # Authenticate with Composio
composio login
- ```
-
- This opens your browser to complete authentication and stores your API key locally.
- To authenticate without opening a browser (useful for SSH/remote sessions):
+ # Initialize a project in the current directory
+ composio init
- ```bash
- composio login --no-browser
+ # Check your account
+ composio whoami
```
- This displays a URL to manually open in your browser.
+ ## Search and execute a tool
- ### Check authentication status
+ ```bash
+ # Connect your GitHub account
+ composio connected-accounts link github
- Verify your current authentication:
+ # Search for tools
+ composio tools search "star a github repo"
- ```bash
- composio whoami
+ # Look up a tool's input schema
+ composio tools info GITHUB_STAR_A_REPOSITORY_FOR_THE_AUTHENTICATED_USER
+
+ # Execute a tool (star the Composio repo!)
+ composio tools execute GITHUB_STAR_A_REPOSITORY_FOR_THE_AUTHENTICATED_USER -d '{"owner":"composiohq","repo":"composio"}'
```
- This displays your current API key or indicates if you're not authenticated.
+ ## Set up and listen to triggers
- ### Logout
+ ```bash
+ # Find your connected account ID
+ composio connected-accounts list --toolkits github
- Remove stored authentication:
+ # Create a trigger for star events on your repo
+ composio triggers create GITHUB_STAR_ADDED_EVENT --connected-account-id your-connected-account-id --trigger-config '{"owner":"your-username","repo":"your-repo"}'
- ```bash
- composio logout
+ # Listen to all GitHub trigger events on your account in real time
+ composio triggers listen --toolkits github --table
```
+ ## Available commands
+
+ Run `composio <command> --help` for detailed usage and flags.
+
+ <div className="cli-commands">
+
+ | Command | Subcommands | Description |
+ | --- | --- | --- |
+ | `composio login` | | Authenticate with your Composio account |
+ | `composio logout` | | Remove stored authentication |
+ | `composio whoami` | | Display your account information |
+ | `composio init` | | Initialize a Composio project in the current directory |
+ | `composio toolkits` | `list`, `search`, `info`, `version` | Discover and inspect toolkits |
+ | `composio tools` | `list`, `search`, `info`, `execute` | Discover, inspect, and execute tools |
+ | `composio connected-accounts` | `list`, `info`, `whoami`, `link`, `delete` | Manage connected accounts |
+ | `composio auth-configs` | `list`, `info`, `create`, `delete` | Manage auth configurations |
+ | `composio triggers` | `list`, `info`, `create`, `status`, `listen`, `enable`, `disable`, `delete` | Subscribe to events and manage trigger instances |
+ | `composio logs` | `tools`, `triggers` | Inspect tool and trigger execution logs |
+ | `composio generate` | | Generate type stubs (auto-detects language) |
+ | `composio ts` | `generate` | Generate TypeScript type stubs |
+ | `composio py` | `generate` | Generate Python type stubs |
+ | `composio upgrade` | | Upgrade CLI to the latest version |
+ | `composio version` | | Display the current CLI version |
+
+ </div>
+
+ ## Global flags
+
+ | Flag | Description |
+ | --- | --- |
+ | `--log-level <level>` | Set log level: `silent`, `error`, `warn`, `info`, `debug` |
+ | `--help` | Show help for any command |
+
+ ## Environment variables
+
+ | Variable | Description |
+ | --- | --- |
+ | `COMPOSIO_API_KEY` | Your Composio API key |
+ | `COMPOSIO_BASE_URL` | Custom API base URL |
+ | `COMPOSIO_LOG_LEVEL` | Logging level: `silent`, `error`, `warn`, `info`, `debug` |
+ | `COMPOSIO_DISABLE_TELEMETRY` | Set to `"true"` to disable telemetry |
+ | `COMPOSIO_TOOLKIT_VERSION_{TOOLKIT}` | Override toolkit version (e.g., `COMPOSIO_TOOLKIT_VERSION_GMAIL=20250901_00`) |
+ | `COMPOSIO_WEBHOOK_SECRET` | Signing secret for trigger webhook forwarding |
+
## Generate type definitions
+<Callout type="info">
+Type generation is only useful if you're using [direct tool execution](/docs/tools-direct/executing-tools). If you're using sessions with meta tools, you don't need this.
+</Callout>
+
- Generate TypeScript or Python type definitions for all Composio tools. These types provide type safety when using `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:
+ Generate TypeScript or Python type definitions for Composio tools. These types provide autocomplete and type safety when using direct tool execution (`composio.tools.execute()`).
```bash
composio generate
@@@ -128,10 -127,9 +131,10 @@@ The CLI auto-detects your project langu
composio py generate
```
- Custom output directory:
- ```bash
- composio py generate --output-dir ./my_types
- ```
+ | Flag | Description |
+ | --- | --- |
+ | `-o`, `--output-dir <dir>` | Output directory |
+ | `--toolkits <names>` | Only generate for specific toolkits (repeatable) |
</Tab>
</Tabs>
+