mirror of
https://github.com/ComposioHQ/composio.git
synced 2026-09-22 11:46:35 +08:00
57574e4f7c
The documented one-line CLI install command curls `install.sh` from the `main` branch: ```bash curl -fsSL https://raw.githubusercontent.com/ComposioHQ/composio/main/install.sh | bash ``` But the repository's default branch is `next` and there is no `main` branch. `raw.githubusercontent.com` does not fall back to the default branch, so the documented command returns HTTP 404 and the install fails for anyone who copies it from `INSTALL.md`. This replaces the `main` branch segment with `next` in the `raw.githubusercontent.com/ComposioHQ/composio/<branch>/install.sh` URL at every documented occurrence, so the install one-liner resolves. It matches the `next` branch already used for the raw asset URL in `README.md`. `install.sh` itself needs no change: it downloads binaries from release assets, not from a branch raw URL. Fixes # <!-- No open issue; self-identified bug. Leave the Fixes line blank, or remove it. --> ### Changes - `INSTALL.md`: update the 5 `.../composio/main/install.sh` URLs to `.../composio/next/install.sh` (One-line Install, Install specific version, and the Troubleshooting / manual-download / environment-variable examples). - `.github/workflows/build-cli-binaries.yml`: same `main` -> `next` update at the 2 URLs inside the `create-install-instructions` job's heredoc, which regenerates `INSTALL.md` as a GitHub Release artifact, so the released copy carries the working URL too and stays consistent with the checked-in file. ### Type of change - [ ] Bug fix - [ ] New feature - [ ] Refactor/Chore - [x] Documentation - [ ] Breaking change <!-- It is a documentation URL fix that also updates the CI job which regenerates that documentation. Marked Documentation; a reviewer may also consider it a Bug fix. --> ### How Has This Been Tested? No application code changed (static Markdown plus a CI heredoc), so no unit test applies. Verified the branch/URL facts directly: ``` # Default branch is next; no main branch exists git ls-remote --symref origin HEAD # -> ref: refs/heads/next git ls-remote --heads origin main next # only refs/heads/next (+ changeset-release/next); no main # The broken vs working URL, live curl -s -o /dev/null -w "%{http_code}" https://raw.githubusercontent.com/ComposioHQ/composio/main/install.sh # 404 curl -s -o /dev/null -w "%{http_code}" https://raw.githubusercontent.com/ComposioHQ/composio/next/install.sh # 200 # After the change: 0 remaining main URLs, 7 next URLs grep -rn "composio/main/install.sh" INSTALL.md .github/workflows/build-cli-binaries.yml # no matches grep -rn "composio/next/install.sh" INSTALL.md .github/workflows/build-cli-binaries.yml # 7 matches # The workflow YAML still parses cleanly after the heredoc edit python -c "import yaml; yaml.safe_load(open('.github/workflows/build-cli-binaries.yml'))" ``` ### Screenshots (if applicable) N/A. ### Checklist - [x] I have read the Code of Conduct and this PR adheres to it - [x] I ran linters/tests locally and they passed <!-- YAML re-parses; grep + curl checks above --> - [x] I updated documentation as needed <!-- this change is the documentation fix --> - [ ] I added tests or explain why not applicable <!-- N/A: static docs URL + CI heredoc, no code path to test --> - [ ] I added a changeset if this change affects published packages <!-- N/A: docs + CI only, no published package --> ### Additional context The 14 `github.com/ComposioHQ/composio/tree/main/...` `homepage` fields in `ts/**/package.json` also point at the non-existent `main` branch, but those are published-package metadata (a different URL form that would require a changeset) and are left out to keep this PR single-purpose. They are a reasonable follow-up.
4.3 KiB
4.3 KiB
Composio CLI Installation Guide
This guide provides multiple ways to install the Composio CLI on your system.
Quick Install (Recommended)
One-line Install
curl -fsSL https://raw.githubusercontent.com/ComposioHQ/composio/next/install.sh | bash
Install specific version
curl -fsSL https://raw.githubusercontent.com/ComposioHQ/composio/next/install.sh | bash -s -- v0.1.24
What the install script does:
- Detects your platform and architecture automatically
- Downloads the appropriate binary from GitHub releases
- Installs to
~/.composio/bin/composio - Updates your shell configuration (.bashrc, .zshrc, or .config/fish/config.fish)
- Adds the binary to your PATH
Manual Installation
From GitHub Releases
-
Go to the releases page
-
Download the appropriate binary for your platform:
composio-linux-x64.zip- Linux 64-bitcomposio-linux-aarch64.zip- Linux ARM64composio-darwin-x64.zip- macOS Intelcomposio-darwin-aarch64.zip- macOS Apple Silicon
-
Extract and install:
# Extract the binary
unzip composio-*.zip
# Move to a directory in your PATH
sudo mv composio /usr/local/bin/
# Make it executable
chmod +x /usr/local/bin/composio
Package Manager Installation
npm
npm install -g @composio/cli
pnpm
pnpm add -g @composio/cli
yarn
yarn global add @composio/cli
Verification
After installation, verify it works:
composio --version
composio --help
Getting Started
-
Login to Composio:
composio login -
Generate types for your project:
# Auto-detect project type and generate composio generate # Generate for TypeScript composio ts generate # Generate for Python composio py generate -
Check your account:
composio whoami
Supported Platforms
✅ Fully Supported:
- Linux x86_64
- Linux ARM64 (aarch64)
- macOS x86_64 (Intel)
- macOS ARM64 (Apple Silicon)
❌ Not Supported:
- Windows (use WSL or npm installation)
Troubleshooting
Permission Denied
If you get permission errors:
chmod +x ~/.composio/bin/composio
Command Not Found
If composio is not found after installation:
-
Restart your shell:
exec $SHELL -
Or manually source your profile:
# For bash source ~/.bashrc # For zsh source ~/.zshrc # For fish source ~/.config/fish/config.fish -
Check if the binary exists:
ls -la ~/.composio/bin/composio -
Manually add to PATH:
export PATH="$HOME/.composio/bin:$PATH"
Download Failures
If the download fails:
-
Check your internet connection
-
Try again with verbose output:
curl -v -fsSL https://raw.githubusercontent.com/ComposioHQ/composio/next/install.sh | bash -
Manual download:
# Download the install script first curl -O https://raw.githubusercontent.com/ComposioHQ/composio/next/install.sh # Review the script cat install.sh # Run it bash install.sh
Uninstallation
To remove Composio CLI:
# Remove the binary
rm -rf ~/.composio
# Remove from shell configuration
# Edit ~/.bashrc, ~/.zshrc, or ~/.config/fish/config.fish
# and remove the lines that were added by the installer:
# export COMPOSIO_INSTALL="$HOME/.composio"
# export PATH="$COMPOSIO_INSTALL/bin:$PATH"
Environment Variables
The installer respects these environment variables:
COMPOSIO_INSTALL- Installation directory (default:~/.composio)GITHUB- GitHub base URL (default:https://github.com)
Example:
export COMPOSIO_INSTALL="/usr/local"
curl -fsSL https://raw.githubusercontent.com/ComposioHQ/composio/next/install.sh | bash
Development
To build the CLI binary locally:
cd ts/packages/cli
pnpm install
pnpm build:binary
The binary will be created at dist/composio.