Chat with LLMs from the terminal
Project description
Terminal LLM Chatbot
A python terminal-based chatbot application that integrates with language models using LangChain. Features include multiline text input and streaming responses.
Features
- Terminal-based user interface with rich text formatting
- Support for multiline text input
- Streaming responses from the language model
- Markdown rendering for assistant responses
- You can edit the conversation at any point to add/remove context
- Configurable via YAML
Installation
You can install llm_chat_term by running:
uv tool install llm_chat_term
or if you don't have uv installed:
pip install llm_chat_term
Set up your API key(s)
On first run, a config.yaml with default options is created in your Config dir (e.g. ~/.config/llm_chat_term)
Edit it to add your API keys and customize other options. Then re-run the application.
llm:
openai_api_key: "your_openai_api_key_here""
anthropic_key: "your_openai_api_key_here"
Usage
Run the chatbot from the command line:
llm_chat_term
Controls
- Type your message and press
Alt(Esc)+Enterto send - Use
Enterto add a new line in your message - Type
/exit,exit, or pressCtrl+Dto exit the application - Type
/helpto view help for available commands - Press
Ctrl+Cto interrupt and exit
Configuration
The following environment variables can be set in the config.yaml file:
llm:
provider: anthropic
openai_api_key: ""
anthropic_key: ""
model: claude-3-7-sonnet-20250219
temperature: 0.7
system_prompt:
You are a helpful assistant responding to a user's questions in a
terminal environment. The user is an experienced software engineer, your answers
should be concise and not repetitive. Skip conclusions and summarizations of your
answers.If the user asks for a change in code, don't return the whole code, just
the changed segment(s).
ui:
prompt_symbol: ">>> "
user: user
assistant: assistant
colors:
user: cyan
assistant: grey39
system: yellow
Extending
To add new features:
- Add new LLM providers by extending the
LLMClientclass - Customize the UI by modifying the
ChatUIclass - Add configuration options in
config.py
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file llm_chat_term-0.1.3.tar.gz.
File metadata
- Download URL: llm_chat_term-0.1.3.tar.gz
- Upload date:
- Size: 46.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0df766229929b1be579140c7210944fba09073c4c5dfdaae527a8176d7d99767
|
|
| MD5 |
1b908eb2a3bfc24bbde1325b303632ec
|
|
| BLAKE2b-256 |
22f091398d5ef28ab5fa11d60f7e343270a70949c81004aef3c8fc9ba97bfe48
|
Provenance
The following attestation bundles were made for llm_chat_term-0.1.3.tar.gz:
Publisher:
main.yml on vtsiolkas/llm_chat_term
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
llm_chat_term-0.1.3.tar.gz -
Subject digest:
0df766229929b1be579140c7210944fba09073c4c5dfdaae527a8176d7d99767 - Sigstore transparency entry: 178280774
- Sigstore integration time:
-
Permalink:
vtsiolkas/llm_chat_term@d5ad39c6eea3a42511e7ee5255710e422f814dbb -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/vtsiolkas
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
main.yml@d5ad39c6eea3a42511e7ee5255710e422f814dbb -
Trigger Event:
push
-
Statement type:
File details
Details for the file llm_chat_term-0.1.3-py3-none-any.whl.
File metadata
- Download URL: llm_chat_term-0.1.3-py3-none-any.whl
- Upload date:
- Size: 14.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fdd033c130820b1b3baa4d836537bedaa80dfc558f8db2afa659d3cda3b8ddc8
|
|
| MD5 |
c750adae2428010bc9cd12cae8d91504
|
|
| BLAKE2b-256 |
9d42eaa06498d30f67545645ddc351c6922725580e0f24b9bb5099c0b225a10a
|
Provenance
The following attestation bundles were made for llm_chat_term-0.1.3-py3-none-any.whl:
Publisher:
main.yml on vtsiolkas/llm_chat_term
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
llm_chat_term-0.1.3-py3-none-any.whl -
Subject digest:
fdd033c130820b1b3baa4d836537bedaa80dfc558f8db2afa659d3cda3b8ddc8 - Sigstore transparency entry: 178280775
- Sigstore integration time:
-
Permalink:
vtsiolkas/llm_chat_term@d5ad39c6eea3a42511e7ee5255710e422f814dbb -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/vtsiolkas
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
main.yml@d5ad39c6eea3a42511e7ee5255710e422f814dbb -
Trigger Event:
push
-
Statement type: