Skip to content

Commit

Permalink
docs(README) : update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
LordPax committed Sep 20, 2024
1 parent ad23250 commit a4359bd
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 5 deletions.
56 changes: 56 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@

Projet to use ai api to generate text, image, etc.

## To do

- [-] Faire command text
- [ ] Faire command translate
- [ ] Faire command image
- [ ] Faire command speech
- [ ] Faire command tts

## Build and install

1. Clone the repository:
Expand All @@ -28,3 +36,51 @@ Will generate a config file at `~/.config/aicli/config.ini`
```bash
./aicli
```

## Config example

```ini
[text]
type=openai
model=gpt-4
apiKey=yoursecretapikey
temp=0.7
```

With type as prefix, parameter will be specific for this type, if there is no type, parameter will be global

```ini
[text]
type=openai
openai-model=gpt-4
openai-apiKey=yoursecretapikey
claude-model=claude-3-5-sonnet-20240620
claude-apiKey=yoursecretapikey
temp=0.7
```

## Integration with tmux

Add the following line to your `.tmux.conf`:

```bash
bind H new-window "aicli text" \; rename-window "aicli"
```

## Vim plugin

You can find the vim plugin here

Add the following line to your `.vimrc`:

```vim
Plug 'LordPax/vim-aigpt'
```

### Integration with i3

Add the following line to your `~/.config/i3/config`:

```
bindsym $mod+s exec ~/usr/bin/aicli -c -g speech
```
10 changes: 5 additions & 5 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
[ "$EUID" -ne 0 ] && echo "Please run as root" && exit 1

function installFunc() {
[ ! -f scan2epub ] && echo "ai not found" && exit 1
echo "Installing ai to /usr/bin/ai"
install -Dm 755 scan2epub /usr/bin/scan2epub
[ ! -f aicli ] && echo "aicli not found" && exit 1
echo "Installing aicli to /usr/bin/aicli"
install -Dm 755 aicli /usr/bin/aicli
}

function uninstall() {
echo "Uninstalling ai from /usr/bin/ai"
rm -f /usr/bin/scan2epub
echo "Uninstalling aicli from /usr/bin/aicli"
rm -f /usr/bin/aicli
}

case "$1" in
Expand Down

0 comments on commit a4359bd

Please sign in to comment.