You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+46-30Lines changed: 46 additions & 30 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,74 +1,90 @@
1
1
# SHAI
2
2
3
+
shai is a coding agent, your pair programming buddy that lives in the terminal. Written in rust with love <3
4
+
5
+

6
+
7
+
## Install
8
+
9
+
Install the latest release with the following command:
10
+
3
11
```
4
-
███╗ ███████╗██╗ ██╗ █████╗ ██╗
5
-
╚═███╗ ██╔════╝██║ ██║██╔══██╗██║
6
-
╚═███ ███████╗███████║███████║██║
7
-
███╔═╝ ╚════██║██╔══██║██╔══██║██║
8
-
███╔═╝ ███████║██║ ██║██║ ██║██║
9
-
╚══╝ ╚══════╝╚═╝ ╚═╝╚═╝ ╚═╝╚═╝
10
-
version: 0.0.1
12
+
curl -fsSL https://raw.githubusercontent.com/ovh/shai/main/install.sh | sh
11
13
```
12
14
13
-
shai is a coding agent, your pair programming buddy that lives in the terminal. Written in rust with love <3
15
+
the `shai` binary will be installed in `$HOME/.local/bin`
14
16
15
-
<imgsrc="./.github/demo.gif" />
16
17
18
+
## Configure a provider and Run!
17
19
18
-
## Build
20
+
By default `shai` uses OVHcloud as an anonymous user meaning you will be rate limited! If you want to sign in with your account or select another provider, run:
19
21
20
-
Simply build the project with `cargo`
22
+
```
23
+
shai auth
24
+
```
25
+
26
+

27
+
28
+
Once you have a provider set up, you can run shai:
21
29
22
30
```
23
-
$ cargo build --release
31
+
shai
24
32
```
25
33
26
-
## Login to an LLM provider
34
+

35
+
36
+
## Run Headless
27
37
28
-
By default it uses OVHcloud as an anonymous user meaning you will be rate limited!
29
-
If you want to sign in with your account or select another provider, run `shai auth`:
38
+
Shai can also run in headless mode without user interface. In that case simply pipe a prompt into shai, it will stream event in the stderr:
30
39
31
40
```
32
-
$ shai auth
41
+
echo "make me a hello world in main.py" | shai
33
42
```
34
43
35
-
## Run TUI
44
+

45
+
46
+
you can also instruct shai to return the entire conversation as a trace once it is done:
36
47
37
48
```
38
-
$ shai
49
+
echo "make me a hello world in main.py" | shai 2>/dev/null --trace
39
50
```
40
51
52
+

41
53
42
-
## Run Headless
54
+
this is handy because you can chain `shai` calls:
43
55
44
56
```
45
-
$ echo "make me a hello world in main.py" | shai
57
+
echo "make me a hello world in main.py" | shai --trace | shai "now run it!"
46
58
```
47
59
60
+

61
+
48
62
## shell assistant
49
63
50
-
shai can assist you when you miswrite commands and will propose you a fix. This works by injecting command hook while monitoring your terminal output. Your last terminal output along with the last command and error code will be sent for analysis to the llm provider.
51
-
To start hooking your shell with shai simply type:
64
+
shai can also act as a shell assistant in case a command failed and will propose you a fix. This works by injecting command hook while monitoring your terminal output. Your last terminal output along with the last command and error code will be sent for analysis to the llm provider. To start hooking your shell with shai simply type:
0 commit comments