Ask your llm from the command line
Project description
lask
A CLI tool to interact with OpenAI's ChatGPT and other LLMs directly from your terminal.
Usage
Ensure you have OPENAI_API_KEY in your environment variables, then you can use lask to send prompts to the LLM.
lask What movie is this quote from\? \"that still only counts as one\"
Features
- Simple command-line interface to send prompts to GPT-4.1, or other LLMs
- Minimal dependencies (only requires the
requestslibrary) - Easy installation via pip
- Direct output to your terminal
Installation
Using pip (recommended)
pip install lask
(For dev, do pip install .)
For a user-specific installation:
pip install --user lask
From source
-
Clone the repository:
git clone https://github.com/Open-Source-Lodge/lask.git
-
Navigate to the directory:
cd lask
-
Install the package:
pip install -e .
Setup
Before using lask, you need to set up your OpenAI API key:
-
Get an API key from OpenAI
-
Set the environment variable:
Linux/macOS:
export OPENAI_API_KEY='your-api-key-here'
To make it permanent, add the above line to your
~/.bashrc,~/.zshrc, or equivalent shell configuration file.Windows (Command Prompt):
set OPENAI_API_KEY=your-api-key-hereWindows (PowerShell):
$env:OPENAI_API_KEY='your-api-key-here'
API Key Issues
If you see an error about the API key:
- Double-check that you've correctly set the
OPENAI_API_KEYenvironment variable - Verify your API key is valid and has enough credits
Developing
Build
To build the package, run:
uv build
Install for development
To install the package in development mode, run:
pip install dist/lask-0.1.0-py3-none-any.whl
License
GNU General Public License v3.0 (GPL-3.0)
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
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 lask-0.1.5.tar.gz.
File metadata
- Download URL: lask-0.1.5.tar.gz
- Upload date:
- Size: 15.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
60c78e3543e389924f718b108a4fb55104130b240c12f9853890b900bf92b04a
|
|
| MD5 |
1456e1cf6a8a9427b50e6ca86a8585de
|
|
| BLAKE2b-256 |
afc173bcf62aa3970a264041bcf860b4f121e1ab271ddece427eb83ce5a73e06
|
Provenance
The following attestation bundles were made for lask-0.1.5.tar.gz:
Publisher:
pypipublish.yml on Open-Source-Lodge/lask
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lask-0.1.5.tar.gz -
Subject digest:
60c78e3543e389924f718b108a4fb55104130b240c12f9853890b900bf92b04a - Sigstore transparency entry: 219674139
- Sigstore integration time:
-
Permalink:
Open-Source-Lodge/lask@8821a443a0bb777a271dfa93237b27a95fd79c78 -
Branch / Tag:
refs/tags/v0.1.5 - Owner: https://github.com/Open-Source-Lodge
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypipublish.yml@8821a443a0bb777a271dfa93237b27a95fd79c78 -
Trigger Event:
release
-
Statement type:
File details
Details for the file lask-0.1.5-py3-none-any.whl.
File metadata
- Download URL: lask-0.1.5-py3-none-any.whl
- Upload date:
- Size: 15.3 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 |
bbe2b65dd50044a3c4ea2856852c4b2c300d8eb72b23c6619f06d64edc0b4793
|
|
| MD5 |
e913ccbad9d21117f457bcb742d4fa4e
|
|
| BLAKE2b-256 |
1995d4b7f1c277e83365f404c30233380a5c47471230dbac17f7ed8dd9209c74
|
Provenance
The following attestation bundles were made for lask-0.1.5-py3-none-any.whl:
Publisher:
pypipublish.yml on Open-Source-Lodge/lask
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lask-0.1.5-py3-none-any.whl -
Subject digest:
bbe2b65dd50044a3c4ea2856852c4b2c300d8eb72b23c6619f06d64edc0b4793 - Sigstore transparency entry: 219674140
- Sigstore integration time:
-
Permalink:
Open-Source-Lodge/lask@8821a443a0bb777a271dfa93237b27a95fd79c78 -
Branch / Tag:
refs/tags/v0.1.5 - Owner: https://github.com/Open-Source-Lodge
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypipublish.yml@8821a443a0bb777a271dfa93237b27a95fd79c78 -
Trigger Event:
release
-
Statement type: