Skip to content
/ help-sh Public

"help", a local-LLM-powered script that runs shell tasks described in English (or any natural language).

Notifications You must be signed in to change notification settings

wxwern/help-sh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

help.sh

Screenshot

A simple shell script that runs a given shell task stated in natural language, by generating an appropriate command using a locally-run LLM (Ollama).

Prerequisites

  • bash
  • ollama with any version of deepseek-coder (configurable)
  • jq

Usage

$ ./help.sh [instructions...]

For example:

$ ./help.sh "list files in current directory"

ls

Run the above command [y/N] or regenerate [r]?

Quotes are optional (all arguments are concatenated).

Configure the MODEL environment variable to temporarily change the model used. A partial match is sufficient - the first match in ollama ls is used. For example:

$ MODEL=your-model help "list files in current directory"

Use DEFAULT_HELP_SH_MODEL to set a default model to search for. The default is 'deepseek-coder'. For example, in your .bashrc:

export DEFAULT_HELP_SH_MODEL=your-model

To see these instructions at any time, run the script without any arguments:

$ ./help.sh

Setup

You may symlink or alias help to this script for easier access. For example, in your .bashrc, add:

alias help='path/to/help.sh'

where path/to/help.sh is the path to the script. Then, you can run the script with the following instead:

$ help [instructions...]

Privacy

help.sh provides basic knowledge of your system name and the current working directory to the LLM.

As it uses local LLMs downloaded via ollama, it works without a network connection, and your requests never leave your device.

About

"help", a local-LLM-powered script that runs shell tasks described in English (or any natural language).

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages