Mods

Mods is an AI tool for the command line, built for pipelines. It works by reading standard input and prefacing it with a prompt supplied in the arguments, sending the input text to an LLM and printing the result. Users can optionally ask the LLM to format the response as Markdown, providing a way to "question" the output of a command. Mods also works on standard input or an argument-supplied prompt individually.

Main Features:

  • Multiple Endpoints: Configured by default to support OpenAI's official API and a LocalAI installation running on port 8080. It also supports Cohere, Groq, Azure OpenAI, Ollama, Anthropic, and Gemini. Additional endpoints can be configured in the settings file by running mods --settings.
  • Saved Conversations: Conversations are saved locally by default, each with a SHA-1 identifier and a title. It supports listing, continuing, showing, and deleting conversations.
  • Custom Roles: Allows setting system prompts. For instance, a shell role can be defined to instruct the model to output one-liner commands without any explanation.
  • MCP Support: Supports MCP (Model Context Protocol) servers with SSE/HTTP transport types. Users can list, disable MCP servers, and list available tools.
  • Formatted Output: Supports --format and --format-as flags to specify the output format (e.g., JSON). For models that support JSON response format, it sets the response type; otherwise, it adds the format text to the prompt.
  • Pipeline Integration: Can take the standard output of commands as input for AI processing, making it ideal for combining with command-line tools.

Usage: Installable via Homebrew (macOS/Linux), Winget (Windows), yay (Arch Linux), Nix, Debian/RPM packages, binaries, or go install github.com/charmbracelet/mods@latest. Pre-generated shell completions are available for Bash, ZSH, Fish, and PowerShell.

Core Advantages:

  • Seamless integration with the command line, built specifically for pipelines.
  • Open-source and supports various LLM providers, including locally run models.
  • Rich parameter configurations such as model selection (--model), interactive model prompting (--ask-model), sampling temperature (--temp), Top P/K value adjustments, HTTP proxy support, max retries, and token limits.

Pricing: The tool itself is free and open-source under the MIT license. However, using external APIs like OpenAI, Cohere, Groq, Azure OpenAI, and Gemini requires respective API keys, and costs depend on each provider's pricing.

액세스: 27.2K
나라: United States

의론

로그인 After Sign In, you can make comments