diff --git a/README.md b/README.md index c448556..4065a6a 100644 --- a/README.md +++ b/README.md @@ -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: @@ -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 +``` diff --git a/install.sh b/install.sh index 4926cd8..d752ab5 100755 --- a/install.sh +++ b/install.sh @@ -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