Skip to content

Commit 7319f5f

Browse files
Add installation instruction and exit prompt (#1)
* Add installation instructions * Add exit meta-command * Add short quit prompt * Update go version in README.md Co-authored-by: Matthew Jaffee <[email protected]> --------- Co-authored-by: Matthew Jaffee <[email protected]>
1 parent cc2b0ab commit 7319f5f

File tree

2 files changed

+30
-3
lines changed

2 files changed

+30
-3
lines changed

README.md

+28-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[![Go Report Card](https://goreportcard.com/badge/github.com/jaffee/aicli)](https://goreportcard.com/report/github.com/jaffee/aicli) [![Go Coverage](https://github.com/jaffee/aicli/wiki/coverage.svg)](https://raw.githack.com/wiki/jaffee/aicli/coverage.html)
1+
[![Go Report Card](https://goreportcard.com/badge/github.com/jaffee/aicli)](https://goreportcard.com/report/github.com/jaffee/aicli) [![Go Coverage](https://github.com/jaffee/aicli/wiki/coverage.svg)](https://raw.githack.com/wiki/jaffee/aicli/coverage.html)
22

33
# aicli
44

@@ -26,6 +26,33 @@ test
2626
I'm an AI language model, and each interaction with me doesn't necessarily carry context from previous conversations unless it's within the same session. If you are looking for a continuation of a previous conversation, please provide some context or restate your question, and I'll do my best to help you. If this is the same session, please simply scroll up to see the previous responses, as they should be visible to you above.
2727
>
2828
```
29+
## Prerequisites
30+
Before you begin, ensure you have the following prerequisites installed on your system:
31+
32+
- Go: aicli is built with Go. You must have Go installed on your machine (version 1.21 or newer is recommended). To verify your Go installation, run `go version` in your terminal.
33+
34+
## Installation
35+
36+
First, clone or download the aicli repository to your local machine. If you have git installed, you can clone the repository by running:
37+
```
38+
git clone https://github.com/jaffee/aicli.git
39+
```
40+
41+
Navigate into the `aicli` directory, which contains the source code:
42+
```
43+
cd aicli
44+
```
45+
46+
With Go installed and from within the root directory of the project (aicli), run the following command to install aicli:
47+
48+
```
49+
go install ./cmd/aicli
50+
```
51+
52+
Ensure that the Go bin directory is in your system's PATH. This allows you to run aicli from anywhere on your system. To verify that aicli is correctly installed and accessible, open a new terminal window and type:
53+
```
54+
aicli --help
55+
```
2956

3057
## Usage
3158

@@ -40,7 +67,6 @@ Whatever you type into the prompt will be sent to the AI, unless it's a meta com
4067
- `\set <param> <value>` Set various config params. See `\config`.
4168
- `\<< [until]` Start accepting multi-line input. If the until argument is present, stop when you get a line that has exactly that. Otherwise stop when you get a line that's just "EOF".
4269

43-
4470
## Configuration
4571

4672
Flags are below. Any flag can also be set as an environment variable, just make it all uppercase and replace dashes with underscores.
@@ -84,4 +110,3 @@ Usage of aicli:
84110
- functions
85111
- other OpenAI features?
86112
- I dunno... open an issue if something interests you.
87-

pkg/aicli/cmd.go

+2
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,8 @@ func (cmd *Cmd) handleMeta(line string) string {
229229
} else {
230230
return newMsg
231231
}
232+
case `\quit`, `\exit`, `\q`:
233+
os.Exit(0)
232234
default:
233235
err = errors.Errorf("Unknown meta command '%s'", line)
234236
}

0 commit comments

Comments
 (0)