CLI
Using Speakeasy CLI with mise toolkit
mise (pronounced “MEEZ ahn plahs”) is a polyglot tool version manager that serves as the front-end to your dev environment. It can manage development tools, environments, and tasks, replacing tools like asdf, nvm, pyenv, rbenv, and others.
This guide shows how to install and manage the Speakeasy CLI using mise toolkit.
Prerequisites
Section titled “Prerequisites”First, you need to install mise on your system. Follow the mise installation guide for your operating system.
# Install mise using Homebrewbrew install miseAfter installation, add mise to your shell configuration:
echo 'eval "$(mise activate bash)"' >> ~/.bashrc# or for zshecho 'eval "$(mise activate zsh)"' >> ~/.zshrcInstall Speakeasy CLI with mise
Section titled “Install Speakeasy CLI with mise”Once mise is installed and configured, you can install the Speakeasy CLI using one of the available backends:
# Install using the aqua backend (recommended)mise use aqua:speakeasy-api/speakeasyBackend Selection
- aqua: Recommended backend that offers the most features and security
- ubi: Universal Binary Installer, simpler but with fewer features Both backends will install the same Speakeasy CLI functionality.
Verify Installation
Section titled “Verify Installation”After installation, verify that Speakeasy CLI is available:
speakeasy --versionYou should see the version number of the installed Speakeasy CLI.
Managing Versions
Section titled “Managing Versions”Install a Specific Version
Section titled “Install a Specific Version”# Install a specific version using aqua backendmise use aqua:speakeasy-api/speakeasy@1.556.2
# Or using ubi backendmise use ubi:speakeasy-api/speakeasy@1.556.2List Available Versions
Section titled “List Available Versions”# List available versionsmise ls-remote speakeasyUpdate to Latest Version
Section titled “Update to Latest Version”# Update to the latest versionmise use speakeasy@latestProject-Specific Configuration
Section titled “Project-Specific Configuration”You can configure Speakeasy CLI versions per project using mise’s configuration files:
Using .mise.toml
Section titled “Using .mise.toml”Create a .mise.toml file in your project root:
[tools]speakeasy = "1.556.2"Using .tool-versions
Section titled “Using .tool-versions”Alternatively, use the .tool-versions format:
speakeasy 1.556.2When you enter the project directory, mise will automatically use the specified version.
Authentication and Usage
Section titled “Authentication and Usage”After installing Speakeasy CLI with mise, authenticate and start using it:
# Authenticate with Speakeasy Platformspeakeasy auth login
# Start with quickstartspeakeasy quickstartFor the full set of CLI commands, type speakeasy -h.
Using in CI/CD
Section titled “Using in CI/CD”To use Speakeasy CLI with mise in CI/CD pipelines:
# Example GitHub Actions workflow- name: Install mise uses: jdx/mise-action@v2 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Install Speakeasy CLI run: mise use aqua:speakeasy-api/speakeasy
- name: Use Speakeasy CLI run: speakeasy quickstart env: SPEAKEASY_API_KEY: ${{ secrets.SPEAKEASY_API_KEY }}Troubleshooting
Section titled “Troubleshooting”Command Not Found
Section titled “Command Not Found”If speakeasy command is not found after installation:
- Ensure mise is properly activated in your shell
- Restart your terminal or run
source ~/.bashrc(or~/.zshrc) - Verify the installation with
mise list
Version Conflicts
Section titled “Version Conflicts”If you have multiple version managers installed:
- Check which tools are managing Speakeasy:
which speakeasy - Ensure mise takes precedence in your PATH
- Consider uninstalling other version managers to avoid conflicts