Minimal Transformers CLI Chat Application
A simple command-line interface to chat with any instruction-tuned LLM from the Hugging Face Hub using the transformers library.
Features
- Interactive CLI chat.
- Supports any model with a chat template.
- Automatic device mapping (CPU/GPU).
- Session management: Save and load chat history automatically.
- Opt-in Core Tools: Choose which system tools to enable for the model.
Prerequisites
- Python 3.8+
- (Optional but recommended) A virtual environment.
Installation
- Clone the repository and install it using pip:
pip install .
Usage
Basic Chat
Once installed, you can start the chat from anywhere in your terminal using the colab_chat command:
colab_chat
Enabling Core Tools
By default, all tools are disabled for security. You can enable them individually using flags:
--calculate: Enable mathematical expression evaluation.--shell: Enable execution of bash shell commands.--read: Enable reading files from your system.--write: Enable writing or updating files on your system.--yolo: Enable all core tools at once (BE CAREFUL).--system_prompt: Path to a text file containing a custom system prompt.
Example: Enable all tools
colab_chat --yolo
Save/Load Sessions
Sessions are saved to the sessions/ directory in your current working folder.
- Load a previous session:
colab_chat --load sessions/chat_20260407_120000.json
Advanced Options
--model: Hugging Face model ID.--max_tokens: Maximum new tokens to generate (default: 8192).--no_save: Disable session saving.--session_name: Set a custom name for the saved session.
Metadata
Release files for colab-chat 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| colab_chat-0.1.0.tar.gz | 17.6 kB | Without provenance | Details for colab_chat-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| colab_chat-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for colab_chat-0.1.0-py3-none-any.whl |
Total release size: 35.9 kB
Release files / colab_chat-0.1.0.tar.gz
| Download URL | colab_chat-0.1.0.tar.gz |
|---|---|
| Size | 17.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dfc3d399d3556244e1d0ca0543b8253a539f4549513317903ab7b5cccbdba1c7
|
|
BLAKE2b-256 checksum How to use checksums |
37a8bb354a91539d29fbe1d62ea3effc9005d8f68d070ea33ba576a6be0fe18d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.11
|
Release files / colab_chat-0.1.0-py3-none-any.whl
| Download URL | colab_chat-0.1.0-py3-none-any.whl |
|---|---|
| Size | 18.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
496a4281601fdc6a7935eaf5975bf9cafb150ee19f21801f6d10b62625a5b336
|
|
BLAKE2b-256 checksum How to use checksums |
fb5f30c987c281900a274ae6d091ce3eb2ae3f8bc03458ea3ddd82eddc63e15c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.11
|
Security for colab-chat 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.