{"id":13408260,"url":"https://github.com/charmbracelet/mods","last_synced_at":"2025-04-29T18:49:24.298Z","repository":{"id":164445160,"uuid":"620999276","full_name":"charmbracelet/mods","owner":"charmbracelet","description":"AI on the command line","archived":false,"fork":false,"pushed_at":"2025-04-22T12:46:05.000Z","size":868,"stargazers_count":3508,"open_issues_count":48,"forks_count":145,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-04-22T13:46:26.998Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/charmbracelet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-03-29T19:41:23.000Z","updated_at":"2025-04-22T12:46:09.000Z","dependencies_parsed_at":"2023-10-16T20:56:47.854Z","dependency_job_id":"ac10ce01-3f8a-407c-aa7a-70599cba5951","html_url":"https://github.com/charmbracelet/mods","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charmbracelet%2Fmods","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charmbracelet%2Fmods/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charmbracelet%2Fmods/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charmbracelet%2Fmods/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/charmbracelet","download_url":"https://codeload.github.com/charmbracelet/mods/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251564023,"owners_count":21609829,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-30T20:00:51.735Z","updated_at":"2025-04-29T18:49:24.291Z","avatar_url":"https://github.com/charmbracelet.png","language":"Go","funding_links":[],"categories":["\u003ca name=\"ai\"\u003e\u003c/a\u003eAI / ChatGPT","Go","CLI","Catalog","others","Developer Tools","AI Coding Assistants","General Purpose Chat \u0026 Shell Utilities","Applications","Productivity"],"sub_categories":["Special-purpose","agent","CLI Tools","AI"],"readme":"# Mods\n\n\u003cp\u003e\n    \u003cimg src=\"https://github.com/charmbracelet/mods/assets/25087/5442bf46-b908-47af-bf4e-60f7c38951c4\" width=\"630\" alt=\"Mods product art and type treatment\"/\u003e\n    \u003cbr\u003e\n    \u003ca href=\"https://github.com/charmbracelet/mods/releases\"\u003e\u003cimg src=\"https://img.shields.io/github/release/charmbracelet/mods.svg\" alt=\"Latest Release\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/charmbracelet/mods/actions\"\u003e\u003cimg src=\"https://github.com/charmbracelet/mods/workflows/build/badge.svg\" alt=\"Build Status\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\nAI for the command line, built for pipelines.\n\n\u003cp\u003e\u003cimg src=\"https://vhs.charm.sh/vhs-5Uyj0U6Hlqi1LVIIRyYKM5.gif\" width=\"900\" alt=\"a GIF of mods running\"\u003e\u003c/p\u003e\n\nLarge Language Models (LLM) based AI is useful to ingest command output and\nformat results in Markdown, JSON, and other text based formats. Mods is a\ntool to add a sprinkle of AI in your command line and make your pipelines\nartificially intelligent.\n\nIt works great with LLMs running locally through [LocalAI]. You can also use\n[OpenAI], [Cohere], [Groq], or [Azure OpenAI].\n\n[LocalAI]: https://github.com/go-skynet/LocalAI\n[OpenAI]: https://platform.openai.com/account/api-keys\n[Cohere]: https://dashboard.cohere.com/api-keys\n[Groq]: https://console.groq.com/keys\n[Azure OpenAI]: https://azure.microsoft.com/en-us/products/cognitive-services/openai-service\n\n### Installation\n\nUse a package manager:\n\n```bash\n# macOS or Linux\nbrew install charmbracelet/tap/mods\n\n# Windows (with Winget)\nwinget install charmbracelet.mods\n\n# Arch Linux (btw)\nyay -S mods\n\n# Nix\nnix-shell -p mods\n```\n\n\u003cdetails\u003e\n\u003csummary\u003eDebian/Ubuntu\u003c/summary\u003e\n\n```bash\nsudo mkdir -p /etc/apt/keyrings\ncurl -fsSL https://repo.charm.sh/apt/gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/charm.gpg\necho \"deb [signed-by=/etc/apt/keyrings/charm.gpg] https://repo.charm.sh/apt/ * *\" | sudo tee /etc/apt/sources.list.d/charm.list\nsudo apt update \u0026\u0026 sudo apt install mods\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eFedora/RHEL\u003c/summary\u003e\n\n```bash\necho '[charm]\nname=Charm\nbaseurl=https://repo.charm.sh/yum/\nenabled=1\ngpgcheck=1\ngpgkey=https://repo.charm.sh/yum/gpg.key' | sudo tee /etc/yum.repos.d/charm.repo\nsudo yum install mods\n```\n\n\u003c/details\u003e\n\nOr, download it:\n\n- [Packages][releases] are available in Debian and RPM formats\n- [Binaries][releases] are available for Linux, macOS, and Windows\n\n[releases]: https://github.com/charmbracelet/mods/releases\n\nOr, just install it with `go`:\n\n```sh\ngo install github.com/charmbracelet/mods@latest\n```\n\n\u003cdetails\u003e\n\u003csummary\u003eShell Completions\u003c/summary\u003e\n\nAll the packages and archives come with pre-generated completion files for Bash,\nZSH, Fish, and PowerShell.\n\nIf you built it from source, you can generate them with:\n\n```bash\nmods completion bash -h\nmods completion zsh -h\nmods completion fish -h\nmods completion powershell -h\n```\n\nIf you use a package (like Homebrew, Debs, etc), the completions should be set\nup automatically, given your shell is configured properly.\n\n\u003c/details\u003e\n\n## What Can It Do?\n\nMods works by reading standard in and prefacing it with a prompt supplied in\nthe `mods` arguments. It sends the input text to an LLM and prints out the\nresult, optionally asking the LLM to format the response as Markdown. This\ngives you a way to \"question\" the output of a command. Mods will also work on\nstandard in or an argument supplied prompt individually.\n\nBe sure to check out the [examples](examples.md) and a list of all the\n[features](features.md).\n\nMods works with OpenAI compatible endpoints. By default, Mods is configured to\nsupport OpenAI's official API and a LocalAI installation running on port 8080.\nYou can configure additional endpoints in your settings file by running\n`mods --settings`.\n\n## Saved Conversations\n\nConversations are saved locally by default. Each conversation has a SHA-1\nidentifier and a title (like `git`!).\n\n\u003cp\u003e\n  \u003cimg src=\"https://vhs.charm.sh/vhs-6MMscpZwgzohYYMfTrHErF.gif\" width=\"900\" alt=\"a GIF listing and showing saved conversations.\"\u003e\n\u003c/p\u003e\n\nCheck the [`./features.md`](./features.md) for more details.\n\n## Usage\n\n- `-m`, `--model`: Specify Large Language Model to use.\n- `-f`, `--format`: Ask the LLM to format the response in a given format.\n- `--format-as`: Specify the format for the output (used with `--format`).\n- `-P`, `--prompt` Include the prompt from the arguments and stdin, truncate stdin to specified number of lines.\n- `-p`, `--prompt-args`: Include the prompt from the arguments in the response.\n- `-q`, `--quiet`: Only output errors to standard err.\n- `-r`, `--raw`: Print raw response without syntax highlighting.\n- `--settings`: Open settings.\n- `-x`, `--http-proxy`: Use HTTP proxy to connect to the API endpoints.\n- `--max-retries`: Maximum number of retries.\n- `--max-tokens`: Specify maximum tokens with which to respond.\n- `--no-limit`: Do not limit the response tokens.\n- `--role`: Specify the role to use (See [custom roles](#custom-roles)).\n- `--word-wrap`: Wrap output at width (defaults to 80)\n- `--reset-settings`: Restore settings to default.\n\n#### Conversations\n\n- `-t`, `--title`: Set the title for the conversation.\n- `-l`, `--list`: List saved conversations.\n- `-c`, `--continue`: Continue from last response or specific title or SHA-1.\n- `-C`, `--continue-last`: Continue the last conversation.\n- `-s`, `--show`: Show saved conversation for the given title or SHA-1.\n- `-S`, `--show-last`: Show previous conversation.\n- `--delete-older-than=\u003cduration\u003e`: Deletes conversations older than given duration (`10d`, `1mo`).\n- `--delete`: Deletes the saved conversations for the given titles or SHA-1s.\n- `--no-cache`: Do not save conversations.\n\n#### Advanced\n\n- `--fanciness`: Level of fanciness.\n- `--temp`: Sampling temperature.\n- `--topp`: Top P value.\n- `--topk`: Top K value.\n\n## Custom Roles\n\nRoles allow you to set system prompts. Here is an example of a `shell` role:\n\n```yaml\nroles:\n  shell:\n    - you are a shell expert\n    - you do not explain anything\n    - you simply output one liners to solve the problems you're asked\n    - you do not provide any explanation whatsoever, ONLY the command\n```\n\nThen, use the custom role in `mods`:\n\n```sh\nmods --role shell list files in the current directory\n```\n\n## Setup\n\n### Open AI\n\nMods uses GPT-4 by default. It will fall back to GPT-3.5 Turbo.\n\nSet the `OPENAI_API_KEY` environment variable. If you don't have one yet, you\ncan grab it the [OpenAI website](https://platform.openai.com/account/api-keys).\n\nAlternatively, set the [`AZURE_OPENAI_KEY`] environment variable to use Azure\nOpenAI. Grab a key from [Azure](https://azure.microsoft.com/en-us/products/cognitive-services/openai-service).\n\n### Cohere\n\nCohere provides enterprise optimized models.\n\nSet the `COHERE_API_KEY` environment variable. If you don't have one yet, you can\nget it from the [Cohere dashboard](https://dashboard.cohere.com/api-keys).\n\n### Local AI\n\nLocal AI allows you to run models locally. Mods works with the GPT4ALL-J model\nas setup in [this tutorial](https://github.com/go-skynet/LocalAI#example-use-gpt4all-j-model).\n\n### Groq\n\nGroq provides models powered by their LPU inference engine.\n\nSet the `GROQ_API_KEY` environment variable. If you don't have one yet, you can\nget it from the [Groq console](https://console.groq.com/keys).\n\n### Gemini\n\nMods supports using Gemini models from Google.\n\nSet the `GOOGLE_API_KEY` enviroment variable. If you don't have one yet,\nyou can get it from the [Google AI Studio](https://aistudio.google.com/apikey).\n\n## Whatcha Think?\n\nWe’d love to hear your thoughts on this project. Feel free to drop us a note.\n\n- [Twitter](https://twitter.com/charmcli)\n- [The Fediverse](https://mastodon.social/@charmcli)\n- [Discord](https://charm.sh/chat)\n\n## License\n\n[MIT](https://github.com/charmbracelet/mods/raw/main/LICENSE)\n\n---\n\nPart of [Charm](https://charm.sh).\n\n\u003ca href=\"https://charm.sh/\"\u003e\u003cimg alt=\"The Charm logo\" width=\"400\" src=\"https://stuff.charm.sh/charm-badge.jpg\" /\u003e\u003c/a\u003e\n\n\u003c!--prettier-ignore--\u003e\nCharm热爱开源 • Charm loves open source\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcharmbracelet%2Fmods","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcharmbracelet%2Fmods","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcharmbracelet%2Fmods/lists"}