TUI interface for LLMs written in Rust πŸ”₯

Overview

Tenere

A crab in the moroccan desert

TUI interface for LLMs written in Rust

πŸ“Έ Demo

demo


πŸ’Ž Supported LLMs

Only ChatGPT is supported for the moment. But I'm planning to support more models in the future.


πŸ”Œ Installation

You can download the prebuilt binaries from the release page.

For MacOs users, you can use brew to install it as following:

brew tap pythops/tenere
brew install tenere

Otherwise, you can build from source. This requires 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.


βš™οΈ Configuration

Tenere can be configured using a TOML configuration file. The file should be located in :

  • Linux : $HOME/.config/tenere/config.toml or $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 to tenere.archive
archive_file_name = "tenere.archive"

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

[key_bindings]
show_help = '?'
show_history = 'h'
new_chat = 'n'
save_chat = 's'

Chatgpt API

To use Tenere's chat functionality, you'll need to provide an API key for OpenAI. There are two ways to do this:

  1. Set an environment variable with your API key:
export OPENAI_API_KEY="YOUTR KEY HERE"
  1. Include your API key in the configuration file:
[gpt]
openai_api_key = "Your API key here"
model = "the chat model name" # <- Optional field

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.

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

q: to quit the app

?: to show the help pop-up. You can dismiss it with Esc


🧭 Roadmap

  • Highlight the chat messages
  • Show the scroll bar
  • Support more models

πŸ› οΈ Built with


πŸ™ Acknowledgments

Big thanks to @orhun and @sophacles for their precious help πŸ™


βš–οΈ License

AGPLv3

You might also like...
A tui to test regexes on the rust regex crate

regex-tui Structure src/ β”œβ”€β”€ app.rs - holds the states and renders the widgets β”œβ”€β”€ event.rs - handles the terminal events (key press, mouse cl

Playground for 2D EKF-SLAM as TUI in Rust

SLAMme.RS Playground for 2D EKF-SLAM as TUI in Rust Installation $ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh # install RUST $ su

Rust TUI library - Clipping region is a set of min/max x/y values applied to the existing region

TinyBit Clipping region is a set of min/max x/y values applied to the existing region A TUI lib This is not yet production ready T O D O TODO: bugs: T

An easy-to-use TUI crate for Rust, based off of the Elm architecture.

Rustea An easy-to-use TUI crate for Rust, based off of the Elm architecture. This is a re-implementation of Go's Tea, created by TJ Holowaychuk. Featu

A TUI for your todos built in Rust with full CLI support.

todui TUI Features This app allows for almost anythig you would need when dealing with todos: Create, edit, and delete tasks Add links to tasks Add du

HTTP client/libcurl TUI front end in Rust, with request + key storage
HTTP client/libcurl TUI front end in Rust, with request + key storage

Rust TUI HTTP Client with API Key Management This project is still in active development and although it is useable, there may still be bugs and signi

A simple TUI password manager made in Rust.

IronKey IronKey is a Terminal User Interface (TUI) based password generator written in Rust. It leverages the power of Rust's performance and safety f

Api testing tool made with rust to use for api developement (Kind of Tui)
Api testing tool made with rust to use for api developement (Kind of Tui)

Api testing tool made with rust to use for api developement (Kind of Tui) This Rust project provides a simple yet powerful tool for making HTTP reques

Rust no-BS Dead Man's Switch TUI
Rust no-BS Dead Man's Switch TUI

Dead Man's Switch This is a simple implementation of a Dead Man's Switch. Use at your own risk. Check the f****(as in friendly) code. Dead man's switc

Releases(v0.5)
Owner
BADR
BADR
Rust library for integrating local LLMs (with llama.cpp) and external LLM APIs.

Table of Contents About The Project Getting Started Roadmap Contributing License Contact A rust interface for the OpenAI API and Llama.cpp ./server AP

Shelby Jenkins 4 Dec 18, 2023
A program that provides LLMs with the ability to complete complex tasks using plugins.

SmartGPT SmartGPT is an experimental program meant to provide LLMs (particularly GPT-3.5 and GPT-4) with the ability to complete complex tasks without

Corman 8 Apr 19, 2023
πŸ›  SmartGPT is an experimental program meant to provide LLMs

?? SmartGPT is an experimental program meant to provide LLMs (particularly GPT-3.5 and GPT-4) with the ability to complete complex tasks without user input by breaking them down into smaller problems, and collecting information using the internet and other external sources.

n0y0u 3 Feb 25, 2024
Use LLMs to generate strongly-typed values

Magic Instantiate Quickstart use openai_magic_instantiate::*; #[derive(MagicInstantiate)] struct Person { // Descriptions can help the LLM unders

Grant Slatton 4 Feb 20, 2024
Demo Rust Cursive crate for terminal user interface (TUI)

Demo Rust Cursive Demonstration of the Rust programming language and Cursvie crate for terminal user interface (TUI). Setup Create: cargo new demo Add

Joel Parker Henderson 5 Dec 27, 2022
A user-friendly TUI client for Matrix written in Rust!

Konoha A user-friendly TUI client for Matrix written in Rust! Notice: The client is currently not usable and is only hosted on GitHub for version cont

L3af 9 Jan 5, 2022
Lemurs - A lightweight TUI display/login manager written in Rust πŸ’

Lemurs ?? A TUI Display/Login Manager written in Rust WIP: Whilst the project is working and installable, there are still a lot of bugs and limitation

Gijs Burghoorn 136 Jan 1, 2023
✨Sleek typing tui written in rust

thokr ✨ sleek typing tui written in rust Installation Cargo $ cargo install thokr Docker $ docker run -it coloradocolby/thokr Arch Linux Install thokr

Colby Thomas 440 Dec 30, 2022
Rust TUI client for steamcmd

Steam TUI About Just a simple TUI client for steamcmd. Allows for the graphical launching, updating, and downloading of steam games through a simple t

Dylan Madisetti 599 Jan 9, 2023
Another TUI based system monitor, this time in Rust!

Another TUI based system monitor, this time in Rust!

Caleb Bassi 2.1k Jan 3, 2023