A powerful and intuitive terminal utility for interacting with both local and cloud LLMs.
A tool for those who appreciate keyboard driven apps and terminal workflows
- π¦ Single binary - lightweight, zero dependencies, use anywhere without any requirements
- π€ Support for OpenAI compatible APIs (ChatGPT, Mistral, Ollama, LMStudio, and more)
- π Support for Gemini API
- π¬ Chat sessions management and quick chats
- βοΈ Settings presets (configure different personas with unique settings)
- βοΈ Convenient text selection tool (vim-like line selection)
- π Crossplatform - support for MacOS, Windows and Linux
- π¨ Multiple themes
Ensure API keys are set before proceeding to installtion
brew tap BalanceBalls/BalanceBalls
brew install nekot --cask
choco install nekot
Requires curl
and tar
.
For updating the app, just run the script again
Basic install:
- Requires
sudo
, and installs to/usr/local/bin/
curl -fsSL https://raw.githubusercontent.com/BalanceBalls/nekot/main/install.sh | sudo sh
Install to path:
- Use
-p
flag to specify install path. - Make sure the specified directory is in the
$PATH
. - May require
sudo
depending on the path specified.
bash -c "$(curl -fsSL https://raw.githubusercontent.com/BalanceBalls/nekot/main/install.sh)" -- -p ~/.local/bin
- Go to latest release
- Download and extract the archive
- Place the binary/executable in some directory
- Add that directory to
$PATH
To use the app, you will need to set OPENAI_API_KEY
or/and GEMINI_API_KEY
env variables depending on your needs
API keys guide
For local models the key still needs to be set (OPENAI_API_KEY=1
will do).
Set up your openai api key:
- ChatGPT: how to get an api key
- Mistral: how to get an api key
export OPENAI_API_KEY="some-key" # you would want to export this in your .zshrc or .bashrc
Set up your api key - how to get an api key
export GEMINI_API_KEY="some-key" # you would want to export this in your .zshrc or .bashrc
We provide a config.json
file within your directory for easy access to essential settings.
- On MacOS & Linux, the path is
~/.nekot/config.json
. - On Windows, the path is
C:\Users\%UserName%\.nekot\config.json
or%HOMEPATH%\.nekot\config.json
{
"providerBaseUrl": "https://api.openai.com", // Or http://localhost:1143, or any other OpenAi compatible API
"systemMessage": "",
"defaultModel": "",
"colorScheme": "groove", // pink, blue, groove
"provider": "openai" // openai, gemini
}
providerBaseUrl
: The url can be anything that follows OpenAI API standard ( ollama, lmstudio, etc)chatGPTApiUrl
[obsolete]: same asproviderBaseUrl
systemMessage
field is available for customizing system prompt messages. Better to set it from the appdefaultModel
field sets the default model. Better to set it from the app
You can change API provider using the provider
field.
Available providers:
openai
defaultgemini
To use GeminiAPI, just set "provider": "gemini"
(make sure to set GEMINI_API_KEY env variable).
When using the gemini
provider, providerBaseUrl
param is not used.
You can change colorscheme using the colorScheme
field.
Available themes:
groove
defaultpink
blue
If you need your settings and chats on other machine - simply copy chat.db
and config.json
from the .nekot/
directory
and paste to the same directory on other machine.
Models list is cached for 14 days upon loading. If you need to invalidate cache use --purge-cache
flag:
nekot --purge-cache
To switch between openai and gemini APIs you can use -p
flag:
nekot -p openai
nekot -p gemini
To specify provier url use -u
flag(works with the openai provider only):
nekot -u http://localhost:11434
To specify color scheme use -t
flag:
nekot -t blue
Tab
: Change focus between panes. The currently focused pane will be highlighted1-4
pane jumps:1
prompt pane,2
, chat pane,3
settings pane,4
sessions paneCtrl+b
orCtrl+s
: Interrupt inferenceCtrl+o
: Toggles zen modeCtrl+c
: Exit the programCtrl+n
: Create new sessionCtrl+q
: Start quick chatCtrl+x
: Save quick chat to session
-
i
: Enters insert mode (you can now safely paste messages into the tui) -
Ctrl+e
: Open/Close prompt editor -
Ctrl+r
: Clear prompt -
Ctrl+v
: Paste text from buffer -
Ctrl+s
: Paste text from buffer as a code block (only in editor mode)- if current line contains text, that text will be used as a language for the code block
- Example: if a line contains
go
the result ofCtrl+s
will be:
```go
{bufferContent}
``` -
esc
: Exit insert mode for the prompt- When in 'Prompt editor' mode, pressing
esc
second time will close editor
- When in 'Prompt editor' mode, pressing
y
: Copies the last message into your clipboard.Shift+y
: Copies all messages from current session into your clipboard.v
,Shift+v
orspace
: Enters navigation mode when chat pane is focused (allows to move accross the chat content lines)
Selection mode allows to navigate the chat pane and select lines to copy. Supports basic vim-motions.
Navigation
j
,k
- go down and up a lined
,u
,Ctrl+d
,Ctrl+u
- go up or down half pageg
- go to topShift+g
- go to bottom
Selection
d
,u
,Ctrl+d
,Ctrl+u
- go up or down half pagej
,k
- go down and up a line- Multiline jumps like
3j
(3 lines down),99k
(99 lines up) are also supported
- Multiline jumps like
v
,Shift+v
orspace
to enter or quit line selection modey
to copy selected textEsc
to quit selection or navigation modes
[
and]
: switch between presets and settings tabs
m
: Opens a model picker to change the model. (use/
to set filter)f
: Change the frequency valuet
: Change the maximum number of tokens per messagee
: Change the temperature valuep
: Change the top_p value (nucleus sampling)s
: Opens a text editor to edit system promptCtrl+r
: resets current settings preset to default valuesCtrl+p
: creates new preset with a specified name from the current preset
d
: remove preset (default and current selected presets cannot be removed)enter
: select preset as the current one/
: filter presets
Ctrl+n
: Creates a new session.d
: Deletes the currently selected session from the list.e
: Edit session nameEnter
: Switches to the session that is currently selected./
: filter sessions
Information pane displays processing state of inference (IDLE
, PROCESSING
) as well as token stats for the current session:
IN
: shows the total amount of input tokens LLM consumed per sessionOUT
: shows the total amount of output tokens LLM produced per session
Please refer to this guide as you navigate the TUI. Happy exploring!
The SQL db is stored in you your/home/directory/.nekot
, as well as the debug log. To enable debug
mode, export DEBUG=1
before running the program.
To get access to the release candidates, install command:
brew install rc-nekot
rc-nekot
- Go
- bubbletea: A Go framework for terminal user interfaces. It's a great framework that makes it easy to create TUIs in Go.
- openai: OpenAI's REST Api
- sqlite: CGO-free sqlite lib
- lipgloss: Style definitions for nice terminal layouts!
- bubbles: Some general use components for Bubble Tea apps!
BalanceBalls π π» |
Taranveer (Taran) Bains π π§ π π» |
TJ Miller π π» |