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 API key from OpenAI, Anthropic, Google, Cohere, Groq, Replicate, Mistral, or Cerebras.
- A Unix-like operating system
Installation
You can install Cliff with homebrew:
brew tap pkelaita/cliff
brew install cliff
Or from PyPI:
pip install cliff-cli
Configuration
Add your LLM provider API credentials as follows:
cliff --config add [provider] [api key]
The provider can be any of openai, anthropic, google, cohere, groq, replicate, mistral, or cerebras.
For a full overview of the configuration system, run cliff --config help, and for a full list of supported models for each provider, see L2M2's docs.
Usage
Get started by running cliff with an objective.
cliff kill the process running on port 8080
Cliff will automatically add the command to your paste buffer, so no need to copy-paste it.
If needed (i.e., to avoid escaping special characters), you can use quotes.
cliff "kill the process that's running on port 8080"
If you want to specify which model to use, you can do so with the --model flag.
cliff --model gpt-4o-mini kill the process running on port 8080
You can set the default model with cliff --config default-model [model].
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
- Chat mode with sliding memory
- Support for Ollama (I need to update L2M2 for this)
- 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.2.tar.gz.
File metadata
- Download URL: cliff_cli-0.0.2.tar.gz
- Upload date:
- Size: 19.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
44f7a6cea991987420ea3713e4654f66330418b77208b0a2a9e2e6d844895e8d
|
|
| MD5 |
e037f355941220a58510d297617d868c
|
|
| BLAKE2b-256 |
c01cb3b572e810939ea81f8bf74164d75c202e01ee1f3bc3918b6aa50b7207d4
|
File details
Details for the file cliff_cli-0.0.2-py3-none-any.whl.
File metadata
- Download URL: cliff_cli-0.0.2-py3-none-any.whl
- Upload date:
- Size: 17.2 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 |
7bf4fba403634b7b0a7d17a07662a8867636517000a3feb7438fe443b5032370
|
|
| MD5 |
943e485fc8d623390d42ab48b41d9c3c
|
|
| BLAKE2b-256 |
d7f2737c86bb06d5b4e8fcebe5b0c439dfafe046a130e844208aa0ab0fe0979c
|