|
1 | 1 | # LangStream CLI |
2 | 2 |
|
3 | | -Use the CLI to manage your control plane, deploy applications, and interact with an application's gateway. |
| 3 | +Use the CLI to test, verify and deploy applications. |
4 | 4 |
|
5 | 5 | For LangStream CLI commands, see [CLI commands.](../langstream-cli/langstream-cli-commands.md) |
6 | | - |
7 | 6 | To configure the LangStream CLI, see [CLI configuration.](../langstream-cli/langstream-cli-configuration.md) |
8 | 7 |
|
9 | | -## Download the CLI |
| 8 | +## Installation |
10 | 9 |
|
11 | 10 | ### Mac |
12 | 11 |
|
| 12 | +Install the latest version |
| 13 | + |
13 | 14 | ```bash |
14 | 15 | brew install LangStream/langstream/langstream |
15 | 16 | ``` |
16 | 17 |
|
| 18 | +Install a specific version |
| 19 | +```bash |
| 20 | +brew install LangStream/langstream/ [email protected] |
| 21 | +``` |
| 22 | + |
| 23 | +To upgrade |
| 24 | +```bash |
| 25 | +brew upgrade LangStream/langstream/langstream |
| 26 | +``` |
| 27 | + |
| 28 | +To upgrade to a specific version |
| 29 | +```bash |
| 30 | +brew upgrade LangStream/langstream/ [email protected] |
| 31 | +``` |
| 32 | + |
17 | 33 | ### Linux |
18 | 34 |
|
| 35 | +Install the latest version |
| 36 | + |
| 37 | +```bash |
| 38 | +curl -Ls "https://raw.githubusercontent.com/LangStream/langstream/main/bin/get-cli.sh" | bash |
| 39 | +``` |
| 40 | + |
| 41 | +Install a specific version |
19 | 42 | ```bash |
| 43 | +version=x.y.z |
| 44 | +export LANGSTREAM_CLI_URL="https://github.com/LangStream/langstream/releases/download/v$version/langstream-cli-$version.zip" |
20 | 45 | curl -Ls "https://raw.githubusercontent.com/LangStream/langstream/main/bin/get-cli.sh" | bash |
21 | 46 | ``` |
22 | 47 |
|
| 48 | +To upgrade the CLI version, you can run the installer again. |
| 49 | + |
23 | 50 | ### Windows |
24 | 51 |
|
25 | 52 | Use [WSL](https://learn.microsoft.com/en-us/windows/wsl/about). |
26 | 53 |
|
| 54 | +Alternatively, you can run the `.bat` file present inside the CLI tarball. You can download the tarball from [Github Releases](https://github.com/LangStream/langstream/releases) |
| 55 | + |
| 56 | + |
27 | 57 | {% hint style="info" %} |
28 | 58 | Want to get started a little quicker? Check out the [LangStream VSCode Extension](https://marketplace.visualstudio.com/items?itemName=DataStax.langstream) for pre-made applications and agent code snippets. |
29 | 59 | {% endhint %} |
@@ -54,3 +84,35 @@ source $HOME/.zshrc # or open another terminal |
54 | 84 | [[ $(grep 'langstream generate-completion' "$HOME/.bashrc") ]] || echo -e "source <(langstream generate-completion)" >> "$HOME/.bashrc" |
55 | 85 | source $HOME/.bashrc # or open another terminal |
56 | 86 | ``` |
| 87 | + |
| 88 | + |
| 89 | + |
| 90 | +### Step by step guide on Amazon Linux VM |
| 91 | + |
| 92 | +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. |
| 93 | + |
| 94 | +After creating the VM on [EC2](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EC2_GetStarted.html), you can run the following commands: |
| 95 | + |
| 96 | +```bash |
| 97 | +sudo yum update |
| 98 | +# jq, unzip are for the installer |
| 99 | +sudo yum install -y docker jq unzip java-11-amazon-corretto-headless |
| 100 | +# setup docker |
| 101 | + |
| 102 | +sudo usermod -a -G docker ec2-user |
| 103 | +id ec2-user |
| 104 | +newgrp docker |
| 105 | +sudo systemctl enable docker.service |
| 106 | +sudo systemctl start docker.service |
| 107 | + |
| 108 | +# download the CLI |
| 109 | +curl -Ls "https://raw.githubusercontent.com/LangStream/langstream/main/bin/get-cli.sh" | bash |
| 110 | +source ~/.bashrc |
| 111 | + |
| 112 | +# run the sample application |
| 113 | +export OPEN_AI_ACCESS_KEY=your-key-here |
| 114 | +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 |
| 115 | +``` |
| 116 | + |
| 117 | + |
| 118 | + |
0 commit comments