📸 Demo
🪄 Featues
- Syntax highlights
- Chat history
- Save chats to files
- Vim keybinding (partial support for now)
💎 Supported LLMs
Only ChatGPT is supported for the moment. But I'm planning to support more models in the future.
🔌 Installation
Binary releases
You can download the prebuilt binaries from the release page
crates.io
tenere can be installed from crates.io
cargo install tenere
Build from source
To build from the source, you need Rust compiler and Cargo package manager.
Once Rust and Cargo are installed, run the following command to build:
cargo build --release
This will produce an executable file at target/release/tenere that you can copy to a directory in your $PATH.
Brew
On macOS, you can use brew:
⚙️ Configuration
Tenere can be configured using a TOML configuration file. The file should be located in :
- Linux :
$HOME/.config/tenere/config.tomlor$XDG_CONFIG_HOME/tenere/config.toml - Mac :
$HOME/Library/Application Support/tenere/config.toml
General settings
Here are the available general settings:
archive_file_name: the file name where the chat will be saved. By default it is set totenere.archivemodel: the llm model name. Currently onlychatgptis supported.
= "tenere.archive"
= "chatgpt"
Key bindings
Tenere supports customizable key bindings.
You can modify some of the default key bindings by updating the [key_bindings] section in the configuration file.
Here is an example with the default key bindings
[]
= '?'
= 'h'
= 'n'
= 's'
Chatgpt
To use Tenere's chat functionality, you'll need to provide an API key for OpenAI. There are two ways to do this:
- Set an environment variable with your API key:
export OPENAI_API_KEY="YOUTR KEY HERE"
- Include your API key in the configuration file:
[]
= "Your API key here"
= "gpt-3.5-turbo"
= "https://api.openai.com/v1/chat/completions"
The default model is set to gpt-3.5-turbo. check out the OpenAI documentation for more info.
🚀 Usage
There are two modes like vim: Normal and Insert.
Insert mode
To enter Insert mode, You press i. Once you're in, you can use:
Esc: to switch back to Normal mode.
Enter: to create a new line
Backspace: to remove the previous character
Normal mode
When you launch tenere, it's in Normal mode by default. In this mode, you can use:
Enter: to submit the prompt
dd: to clear the prompt.
G: Go to th end.
gg: Go to the top.
n: Start a new chat and save the previous one in history.
s: Save the current chat or chat history (history popup should be visible first) to tenere.archive file in the current directory.
Tab: to switch the focus.
j or Down arrow key: to scroll down
k or Up arrow key: to scroll up
h : Show chat history
t : Stop the stream response
q: to quit the app
?: to show the help pop-up. You can dismiss it with Esc
🛠️ Built with
⚖️ License
AGPLv3