Install & Authenticate
Install the CLI
Section titled “Install the CLI”The CLI is distributed via multiple channels: Homebrew (recommended for macOS and Linux), direct download, and Windows package managers.
Homebrew (Recommended)
Section titled “Homebrew (Recommended)”brew install CosineAI/tap/coscos --versionDirect Download
Section titled “Direct Download”For users who prefer not to use Homebrew:
-
Download the latest release for your architecture from the releases page
- Apple Silicon (M1/M2/M3):
cos-darwin-arm64.zip - Intel Macs:
cos-darwin-amd64.zip
- Apple Silicon (M1/M2/M3):
-
Extract and install:
Terminal window unzip cos-darwin-arm64.zipsudo mv cos /usr/local/bin/cos --version -
(Optional) Remove quarantine attribute if prompted:
Terminal window xattr -dr com.apple.quarantine /usr/local/bin/cos
Homebrew
Section titled “Homebrew”brew install CosineAI/tap/coscos --versionDirect Download
Section titled “Direct Download”-
Download the appropriate build for your system from the releases page
- x86_64 (most common):
cos-linux-amd64.zip - ARM64:
cos-linux-arm64.zip - x86_64 (Ubuntu 22.04/glibc 2.35):
cos-linux-amd64-glibc2.35.zip
- x86_64 (most common):
-
Extract and install:
Terminal window unzip cos-linux-amd64.zipsudo mv cos /usr/local/bin/cos --version
One-line Install Script
Section titled “One-line Install Script”curl -fsSL https://cosine.sh/install | bashThe install script detects your platform, downloads the matching cos binary, and installs it somewhere it can be used globally.
By default:
- If the script is run as root, or a global bin directory is writable, it installs to
/usr/local/binwhere possible. - If a global install is not available, it installs to a user bin directory such as
~/.local/bin. - If the chosen user bin directory is not on your
PATH, the installer updates your shell startup file when it can:- zsh:
~/.zshrc - bash:
~/.bashrc - fish:
~/.config/fish/config.fish
- zsh:
- In GitHub Actions, the installer adds the directory to
$GITHUB_PATH. - If the installer cannot safely update your shell startup file, it prints the exact command to add the directory to
PATHyourself.
After installation, open a new terminal or run the source command printed by the installer, then verify:
cos --versionInstall script options
Section titled “Install script options”Install a specific version:
curl -fsSL https://cosine.sh/install | bash -s -- --version nightlycurl -fsSL https://cosine.sh/install | bash -s -- --version nightly-838curl -fsSL https://cosine.sh/install | bash -s -- --version v1.2.3Install into a specific directory:
curl -fsSL https://cosine.sh/install | bash -s -- --install-dir "$HOME/bin"You can also use the environment variable form:
COSINE_INSTALL_DIR="$HOME/bin" curl -fsSL https://cosine.sh/install | bashPrevent the installer from editing shell startup files:
curl -fsSL https://cosine.sh/install | bash -s -- --no-modify-pathForce a reinstall even if the requested version is already installed:
curl -fsSL https://cosine.sh/install | bash -s -- --forceShow all installer options:
curl -fsSL https://cosine.sh/install | bash -s -- --helpWindows
Section titled “Windows”Winget (Recommended)
Section titled “Winget (Recommended)”winget install Cosine.CLIcos --versionDirect Download
Section titled “Direct Download”-
Download the Windows build from the releases page:
cos-windows-amd64.zip -
Extract the zip file to a location on your PATH, such as
C:\Program Files\Cosine\ -
Add to your PATH if needed:
- Open System Properties → Advanced → Environment Variables
- Edit the
Pathvariable and add the directory containingcos.exe
-
Verify installation in PowerShell or CMD:
Terminal window cos --version
Scoop (Community)
Section titled “Scoop (Community)”scoop bucket add cosine https://github.com/CosineAI/scoop-bucketscoop install cosUpdating the CLI
Section titled “Updating the CLI”When a newer version is available, the CLI will prompt you to update automatically.
You can also update manually using the same package manager you installed with:
| Platform | Method | Command |
|---|---|---|
| macOS / Linux | Homebrew | brew upgrade cos |
| Linux | Install script | Re-run curl -fsSL https://cosine.sh/install | bash |
| Windows | Winget | winget upgrade Cosine.CLI |
| Windows | Scoop | scoop update cos |
Authenticate the CLI
Section titled “Authenticate the CLI”First-Time Login
Section titled “First-Time Login”Sign in to Cosine: https://cosine.sh/login
Then, within your terminal:
cos loginThis will:
- Open your browser to the Cosine login page
- Ask you to sign in or create an account
- Redirect you back to confirm successful authentication
- Display a success page in your browser
For the full browser and in-app sign-in flow, see Login Experience.
Authentication and Provider Access
Section titled “Authentication and Provider Access”The CLI supports a default Cosine login plus optional provider-backed access methods:
-
Cosine Account (default) - Use your Cosine credentials
Terminal window cos login -
ChatGPT - Use your ChatGPT subscription for direct Codex access
Terminal window cos login-with-chatgpt
See ChatGPT for details on the provider-backed option.
See Also
Section titled “See Also”- Quickstart - Fastest path from install to first task
- Login Experience - Browser flow, in-app dialog, and re-authentication behavior
- ChatGPT - Use your OpenAI subscription
- OpenAI API Key - Use OpenAI directly with an API key
Log out
Section titled “Log out”To remove stored credentials from the CLI:
cos logoutThis signs you out and removes saved authentication state from the local CLI config.