Skip to content

`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.

Notifications You must be signed in to change notification settings

tos-kamiya/clicra

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Additionally, run ollama to download the model file llama3:

ollama pull llama3

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, provide a description of the task you want to execute as a command-line argument:

clicra [options] <task>

Options

  • -m, --model: Specifies the LLM to use (default is llama3).
  • -f, --refer: Executes a specified command and uses its output as additional context to improve the accuracy and relevance of task command generation.
  • -M, --max-chars: Specifies the maximum number of characters to include from the referred command's output in the prompt (default is 2000).
  • -r, --run: Instead of copying the generated command to the clipboard, it executes the command immediately without confirmation, and analyzes the outcome if there are errors (non-zero exit code).
  • -s, --script: Generates a script instead of a command.
  • --p, --prompt: Ask for a prompt to describe the solution (experimental feature). tot for Tree-of-Thought. sbs for Step-by-Step.

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"

Screenshots

About

`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.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages