Skip to content
/ aicli Public
generated from LordPax/cli-template

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

Notifications You must be signed in to change notification settings

LordPax/aicli

Repository files navigation

Aicli

Description

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

To do

  • command text
  • command translate
  • command image
  • command speech
  • command tts

Available SDK

Text Generation

  • openai
  • claude
  • mistral

Translation

  • deepl

Build and install

  1. Clone the repository:
git clone https://github.com/LordPax/aicli.git
cd aicli
  1. Build the project:
go mod download
go build
./install.sh
  1. Execute the script to generate config

Will generate a config file at ~/.config/aicli/config.ini

./aicli

Config example

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

[translate]
type=deepl
apiKey=yoursecretapikey

[image]
type=openai
model=dall-e-3
apiKey=yoursecretapikey

Integration with tmux

Add the following line to your .tmux.conf:

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

Vim plugin

You can install vim-aicli to use aicli in vim.

Add the following line to your .vimrc:

Plug 'LordPax/vim-aicli'

Integration with i3

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

bindsym $mod+s exec /usr/bin/aicli -c -g speech