Skip to content

Commit 6f04df1

Browse files
authored
CLI: add complete instructions for linux (#114)
1 parent c8e0418 commit 6f04df1

File tree

2 files changed

+67
-5
lines changed

2 files changed

+67
-5
lines changed

SUMMARY.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515

1616
## installation
1717

18+
* [LangStream CLI](installation/langstream-cli.md)
19+
* [Docker](installation/docker.md)
1820
* [Minikube (mini-langstream)](installation/get-started-minikube.md)
1921
* [Kubernetes](installation/kubernetes.md)
20-
* [Docker](installation/docker.md)
21-
* [LangStream CLI](installation/langstream-cli.md)
2222
* [Build and install from source](installation/build-and-install-source.md)
2323

2424
## Building Applications

installation/langstream-cli.md

Lines changed: 65 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,59 @@
11
# LangStream CLI
22

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.
44

55
For LangStream CLI commands, see [CLI commands.](../langstream-cli/langstream-cli-commands.md)
6-
76
To configure the LangStream CLI, see [CLI configuration.](../langstream-cli/langstream-cli-configuration.md)
87

9-
## Download the CLI
8+
## Installation
109

1110
### Mac
1211

12+
Install the latest version
13+
1314
```bash
1415
brew install LangStream/langstream/langstream
1516
```
1617

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+
1733
### Linux
1834

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
1942
```bash
43+
version=x.y.z
44+
export LANGSTREAM_CLI_URL="https://github.com/LangStream/langstream/releases/download/v$version/langstream-cli-$version.zip"
2045
curl -Ls "https://raw.githubusercontent.com/LangStream/langstream/main/bin/get-cli.sh" | bash
2146
```
2247

48+
To upgrade the CLI version, you can run the installer again.
49+
2350
### Windows
2451

2552
Use [WSL](https://learn.microsoft.com/en-us/windows/wsl/about).
2653

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+
2757
{% hint style="info" %}
2858
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.
2959
{% endhint %}
@@ -54,3 +84,35 @@ source $HOME/.zshrc # or open another terminal
5484
[[ $(grep 'langstream generate-completion' "$HOME/.bashrc") ]] || echo -e "source <(langstream generate-completion)" >> "$HOME/.bashrc"
5585
source $HOME/.bashrc # or open another terminal
5686
```
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

Comments
 (0)