Skip to main content

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

Installation

You can install Cliff with homebrew:

brew tap pkelaita/cliff
brew install cliff

Or with pip:

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> or cliff --recall <command>.
  • To view all recalled commands and their outputs, run cliff --view-recall or cliff -vr.
  • To clear Cliff's recall storage, run cliff --clear-recall or cliff -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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cliff_cli-0.0.3.tar.gz (19.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cliff_cli-0.0.3-py3-none-any.whl (17.3 kB view details)

Uploaded Python 3

File details

Details for the file cliff_cli-0.0.3.tar.gz.

File metadata

  • Download URL: cliff_cli-0.0.3.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

Hashes for cliff_cli-0.0.3.tar.gz
Algorithm Hash digest
SHA256 22d96b6a74343cacb5424185188a8956a83a8492299ec36e96e1652a3b0ba172
MD5 55c47f8a83bed27af9a98f4951d314cb
BLAKE2b-256 685d24f7df273fb18bbeb92e61bf2cfa06331219e0994db23a6e0509abb00108

See more details on using hashes here.

File details

Details for the file cliff_cli-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: cliff_cli-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 17.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.13.1

File hashes

Hashes for cliff_cli-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 e831862e4db333cb608af0fc0bc80b45e8661d42ff236953ceef5b2d613f9406
MD5 f6fbd12c046d22d21af60016a4768ded
BLAKE2b-256 1e7dfb24bb1d419effd19d83873cc5a166d71ccfe877cd16b14c164198666bb0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page