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

  • 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/llm and add your OpenAI API key to it in the format OPENAI_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> 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

  • 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


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.1.tar.gz (15.3 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.1-py3-none-any.whl (14.0 kB view details)

Uploaded Python 3

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

Hashes for cliff_cli-0.0.1.tar.gz
Algorithm Hash digest
SHA256 328bccafe8318b7965c25a250a165d7ff5cd21b397ac17572c2474de0097900c
MD5 a96fdf02193b28ce14824a9d8587cdf0
BLAKE2b-256 05e31a4328d9723fc67977a426e8800aa907ea8b0f184fe84596a0c22062cc2c

See more details on using hashes here.

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

Hashes for cliff_cli-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fa22ae1076d50d53b8ca37d520bfdc4bc1a99e99b43df1055c19c8f8c9f6f31a
MD5 ba36a1a55b77c8f069209d67f932d7a9
BLAKE2b-256 1b17970e6793d961c737d159c57b5fbf59468ee473f17d0de96ea1ba937b9162

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