Generate Unix commands in the terminal
Project description
Cliff
Cliff (Command Line InterFace Friend) is an AI assistant that helps you come up with Unix commands. Given an objective (for example, "kill the process running on port 8080"), Cliff will generate a command that does the objective and add it to your clipboard for you to easily paste into your terminal.
Why?
It's annoying having to open the browser when I forget how to do something in the terminal.
Requirements
- Python >= 3.9
- A valid OpenAI API key
- A Unix-like operating system
Installation
- Install Cliff from PyPI:
pip install cliff-cli - Create the file
~/envs/llmand add your OpenAI API key to it in the formatOPENAI_API_KEY=sk-...
Usage
Get started by running cliff with an objective.
Example:
cliff kill the process running on port 8080
If needed (i.e., to avoid escaping special characters), you can use quotes.
cliff "kill the process that's running on port 8080"
Currently, cliff uses gpt-4o to generate commands.
Recalling Command Outputs:
Optionally, you can share commands you've ran and their outputs with Cliff to help it debug and improve its responses.
- To run a command and store its output for Cliff, run
cliff -r <command>orcliff --recall <command>. - To view all recalled commands and their outputs, run
cliff --view-recallorcliff -vr. - To clear Cliff's recall storage, run
cliff --clear-recallorcliff -cr.
To view the man page, run cliff with no arguments.
That's it! It's pretty simple which is the point.
Planned Features
- Install with homebrew tap
- Customize Cliff (e.g., which model to use, where API keys are stored, etc.) via a config file
- Chat mode with sliding memory
- Other features as they come to mind
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 cliff_cli-0.0.1.tar.gz.
File metadata
- Download URL: cliff_cli-0.0.1.tar.gz
- Upload date:
- Size: 15.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
328bccafe8318b7965c25a250a165d7ff5cd21b397ac17572c2474de0097900c
|
|
| MD5 |
a96fdf02193b28ce14824a9d8587cdf0
|
|
| BLAKE2b-256 |
05e31a4328d9723fc67977a426e8800aa907ea8b0f184fe84596a0c22062cc2c
|
File details
Details for the file cliff_cli-0.0.1-py3-none-any.whl.
File metadata
- Download URL: cliff_cli-0.0.1-py3-none-any.whl
- Upload date:
- Size: 14.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fa22ae1076d50d53b8ca37d520bfdc4bc1a99e99b43df1055c19c8f8c9f6f31a
|
|
| MD5 |
ba36a1a55b77c8f069209d67f932d7a9
|
|
| BLAKE2b-256 |
1b17970e6793d961c737d159c57b5fbf59468ee473f17d0de96ea1ba937b9162
|