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 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> 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.2.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.2-py3-none-any.whl (17.2 kB view details)

Uploaded Python 3

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

Hashes for cliff_cli-0.0.2.tar.gz
Algorithm Hash digest
SHA256 44f7a6cea991987420ea3713e4654f66330418b77208b0a2a9e2e6d844895e8d
MD5 e037f355941220a58510d297617d868c
BLAKE2b-256 c01cb3b572e810939ea81f8bf74164d75c202e01ee1f3bc3918b6aa50b7207d4

See more details on using hashes here.

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

Hashes for cliff_cli-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7bf4fba403634b7b0a7d17a07662a8867636517000a3feb7438fe443b5032370
MD5 943e485fc8d623390d42ab48b41d9c3c
BLAKE2b-256 d7f2737c86bb06d5b4e8fcebe5b0c439dfafe046a130e844208aa0ab0fe0979c

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