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.
meh [options] [query]-f <file>: Read input from a specified file.-c: Edit configuration settings.-p <persona>: Select a persona.-h: Display usage instructions.
- Query Construction:
- CLI arguments are combined with any piped input.
- If a query is constructed, it is passed to the application.
- File Input (
-f):- Reads input from a specified file and processes it as a query.
- Config Mode (
-c):- Allows editing of configuration settings.
- Persona Selection (
-p):- Assigns a predefined persona to the session.
- 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.
- Help (
-h):- Displays usage instructions.
- Error Handling:
- Logs fatal errors if issues occur while reading input or processing commands.
meh "Hello World"echo "piped input" | mehmeh -f input.txtmeh # Launches the interactive TUI- go 1.23
go run meh.go [options] [query]