A CLI tool for prompting an LLM
Reason this release was yanked:
Naming conventions
Project description
cli-lm
Switch context less by using a really cheap LLM at the command line.
Installation
# Install from source
git clone https://github.com/davenpi/clm.git
cd clm
pip install -e .
# TODO: Install from PyPI
# pip install clm
Quick Start
The first run will prompt for your
Open AI API key.
Just paste the key in.
Note you'll have to pay Open AI to get yourself an API key and start using their
models. For now this package sets gpt-4o-mini as the model of choice. It costs
0.15¢/0.60¢ per 1 million input/output tokens. 1 token ~ 1 word!
# Directly ask a question
clm "How do I amend a commit in git?"
# Interactive mode (input in python interpreter)
clm
> How do I list the processes listening on a given port?
There is multiturn chat. Just hit Ctrl+c or Ctrl+d to exit.
Configuration
The package looks for your Open AI API key in ~/.clm/.env.
To quickly update your API key run:
echo "OPENAI_API_KEY=your_new_key" > ~/.clm/.env
It works on a Mac, but I haven't tried it on any other system.
Ongoing Improvements
- Multi turn chat capability.
- Can't arrow backward on input! Fix.
- Improved multiline input
- System prompting for really concise, helpful answers
- Make set up easier
- Add token/cost accounting
- Make it faster (imports can be slow)
- Add color
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 cli_lm-0.1.0.tar.gz.
File metadata
- Download URL: cli_lm-0.1.0.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0178b0dc715b3385bf2003c07a4971322025bbbfab9e170b57ef48b72735c893
|
|
| MD5 |
d4566ee707c41006d29a6daa1ffe8e94
|
|
| BLAKE2b-256 |
74e5da1b5a357da4c00e0b35e31d1cc5404a28e45bfabba0d61d398b86c91a87
|
File details
Details for the file cli_lm-0.1.0-py3-none-any.whl.
File metadata
- Download URL: cli_lm-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f516166677957ae58efecf47c3bd0fac37950d51bf1715328844e37f4046dd59
|
|
| MD5 |
44e3c91517275a2d5f9368ac51144e6a
|
|
| BLAKE2b-256 |
832e5fe29971c135f1c7f26b1e3cab9383c5bfd8318fa16a2757de33826e5f8f
|