An open API service indexing awesome lists of open source software.

https://github.com/cpcf/meh

Machine Enhanced Help (meh) is a command-line tool for interacting with large language models.
https://github.com/cpcf/meh

cli go llm

Last synced: 5 months ago
JSON representation

Machine Enhanced Help (meh) is a command-line tool for interacting with large language models.

Awesome Lists containing this project

README

          

# meh

## Overview
`meh` is a simple CLI tool that constructs and executes queries based on command-line arguments and piped input. It supports file-based input, configurable settings, persona selection, and an interactive TUI mode.

## Usage
```sh
meh [options] [query]
```

### Options
- `-f `: Read input from a specified file.
- `-c`: Edit configuration settings.
- `-p `: Select a persona.
- `-h`: Display usage instructions.

### Behavior
1. **Query Construction**:
- CLI arguments are combined with any piped input.
- If a query is constructed, it is passed to the application.
2. **File Input (`-f`)**:
- Reads input from a specified file and processes it as a query.
3. **Config Mode (`-c`)**:
- Allows editing of configuration settings.
4. **Persona Selection (`-p`)**:
- Assigns a predefined persona to the session.
5. **Interactive TUI Mode**:
- If no query is provided, a text-based user interface (TUI) is launched.
- The TUI allows creating new personas, selecting an existing persona, and engaging in interactive chat.
6. **Help (`-h`)**:
- Displays usage instructions.
7. **Error Handling**:
- Logs fatal errors if issues occur while reading input or processing commands.

## Example Usage
```sh
meh "Hello World"
```
```sh
echo "piped input" | meh
```
```sh
meh -f input.txt
```
```sh
meh # Launches the interactive TUI
```

## Dependencies
- go 1.23

## Running the Application
```sh
go run meh.go [options] [query]
```