Use the CLI to test, verify and deploy applications.
For LangStream CLI commands, see CLI commands. To configure the LangStream CLI, see CLI configuration.
Install the latest version
brew install LangStream/langstream/langstream
Install a specific version
brew install LangStream/langstream/[email protected]
To upgrade
brew upgrade LangStream/langstream/langstream
To upgrade to a specific version
brew upgrade LangStream/langstream/[email protected]
Install the latest version
curl -Ls "https://raw.githubusercontent.com/LangStream/langstream/main/bin/get-cli.sh" | bash
Install a specific version
version=x.y.z
export LANGSTREAM_CLI_URL="https://github.com/LangStream/langstream/releases/download/v$version/langstream-cli-$version.zip"
curl -Ls "https://raw.githubusercontent.com/LangStream/langstream/main/bin/get-cli.sh" | bash
To upgrade the CLI version, you can run the installer again.
Use WSL.
Alternatively, you can run the .bat
file present inside the CLI tarball. You can download the tarball from Github Releases
{% hint style="info" %} Want to get started a little quicker? Check out the LangStream VSCode Extension for pre-made applications and agent code snippets. {% endhint %}
Once installed you can test the CLI with the following command.
langstream -h
Installing the binary directly will enable auto-completion for the CLI.
If you installed the CLI with Homebrew, you can enable auto-completion with the following command:
[[ $(grep 'langstream generate-completion' "$HOME/.zshrc") ]] || echo -e "source <(langstream generate-completion)" >> "$HOME/.zshrc"
source $HOME/.zshrc # or open another terminal
[[ $(grep 'langstream generate-completion' "$HOME/.bashrc") ]] || echo -e "source <(langstream generate-completion)" >> "$HOME/.bashrc"
source $HOME/.bashrc # or open another terminal
If for some reasons you prefer to install the CLI and test the applications on a remote machine, this is setup you need to go through.
After creating the VM on EC2, you can run the following commands:
sudo yum update
# jq, unzip are for the installer
sudo yum install -y docker jq unzip java-11-amazon-corretto-headless
# setup docker
sudo usermod -a -G docker ec2-user
id ec2-user
newgrp docker
sudo systemctl enable docker.service
sudo systemctl start docker.service
# download the CLI
curl -Ls "https://raw.githubusercontent.com/LangStream/langstream/main/bin/get-cli.sh" | bash
source ~/.bashrc
# run the sample application
export OPEN_AI_ACCESS_KEY=your-key-here
langstream docker run test -app https://github.com/LangStream/langstream/blob/main/examples/applications/openai-completions -s https://github.com/LangStream/langstream/blob/main/examples/secrets/secrets.yaml