Skip to main content

A LLM command-line crafter

Project description

clicra: Command Line Crafter

clicra is a command-line tool that utilizes local large language models (LLMs) to generate and analyze command lines based on tasks provided by users.

Installation

clicra requires Ollama to be installed beforehand. Please follow the instructions on the official Ollama website.

  1. Visit Ollama at https://ollama.com/.
  2. Download the installer from the Download section.
  3. Execute the downloaded installer.

After installing Ollama, you can install clicra. Use pipx, a package manager for Python applications:

pipx install clicra

To uninstall:

pipx uninstall clicra

Usage

To run clicra, use the following syntax:

clicra [options] <task>
  • <task>: Description of the task you want to execute.

Options

  • -r, --run: Generates and executes the command without confirmation and analyzes the outcome if there are errors.
  • -f, --refer: Executes a specified command and uses its output as additional context to improve the accuracy and relevance of task command generation.
  • -m, --model: Specifies the LLM to use (default is llama3).

Examples

To find source files containing TODO comments, you can provide the output of ls as context. This allows clicra to recognize the directory structure and file types:

clicra "Find TODOs in source files" -f "ls"

To get the volume size of an HDD, using the output of lsb_release -a provides additional system information, helping to generate the correct command:

clicra "Get HDD volume size" -f "lsb_release -a"

Screenshots

Here is a screenshot of clicra in use:

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

clicra-0.1.0.tar.gz (5.8 kB view hashes)

Uploaded Source

Built Distribution

clicra-0.1.0-py3-none-any.whl (4.6 kB view hashes)

Uploaded Python 3

Supported by

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