#shell #english #bash #llm #command-line-tool #script #utility

app fem-cli

A command line utility to run english as shell scripts via an LLM

1 unstable release

0.1.0 Jun 3, 2024

#2363 in Command line utilities

MIT license

375KB
151 lines

fem

Fem (Freeform English Middleware) is a command-line utility which allows you to run normal english queries as bash in your terminal. This is done by feeding the english query into an LLM. The resulting bash snippet is returned to the user, and if they approve, it will be executed.

Demo

Installation

cargo install fem-cli is probably the easiest way to install, if you already have cargo installed. You'll also need Ollama installed, either on your local machine or a machine you can connect to.

Configuration

Configuration is done by a single file in ~/.config/fem.toml. If it doesn't exist, it will use the default values:

system_prompt = "You're an AI connected directly to a bash terminal. When a user asks you to do something, your output will be run directly as a bash command. Do not say anything other than a valid bash command, or it will cause syntax errors. Do not wrap the command in backticks."
model = "llama3"
ollama_host = "http://localhost"
ollama_port = 11434

FAQ

I didn't look at the bash snippet before executing and it broke my computer!

lmao

Dependencies

~8–21MB
~329K SLoC