# magic-cli — LLM Command Suggestion for Terminals > magic-cli is a Rust CLI that suggests commands, semantically searches shell history, and works with local or cloud LLM providers. ## Install Copy the content below into your project: ## Quick Use ```bash curl -LsSf https://github.com/guywaldman/magic-cli/releases/download/0.0.6/magic-cli-installer.sh | sh magic-cli suggest "Resize test_image.png to 300x300 with ffmpeg" magic-cli search "zellij attach" magic-cli ask "Set up the dev environment as described in the README" ``` ## Intro magic-cli is a Rust CLI that suggests commands, semantically searches shell history, and works with local or cloud LLM providers. **Best for:** People who live in terminals and want faster ‘what was that flag?’ recovery **Works with:** macOS/Linux/Windows (via installers), Ollama/OpenAI/Anthropic **Setup time:** 4-12 minutes ### Key facts (verified) - GitHub: 746 stars · 19 forks · pushed 2026-04-21. - License: MIT · owner avatar + repo URL verified via GitHub API. - README-verified entrypoint: `brew install guywaldman/tap/magic-cli`. ## Main - Use `suggest` when you know the goal but not the flags; use `search` when you think you’ve run the command before. - Be cost-aware: README warns history embeddings can get expensive with non-local LLMs; start with Ollama for local-first usage. - Add shell helper functions (README shows examples) so you can prompt without quotes and keep muscle memory friendly. ### Source-backed notes - README lists features: suggest commands, generate commands (‘ask’), and semantic search across shell history. - README Installation section provides curl-based installer scripts plus Homebrew and PowerShell options. - README documents configuration at `~/.config/magic_cli/config.json` and supported providers. ### FAQ - **Is it stable?**: README marks it early development; expect breaking changes and keep an eye on releases. - **Can it run fully locally?**: Yes — README lists Ollama as a supported local provider for both chat and embeddings. - **Where are secrets stored?**: README says API keys live in config under your home directory; treat it like any CLI credential store. ## Source & Thanks > Source: https://github.com/guywaldman/magic-cli > License: MIT > GitHub stars: 746 · forks: 19 --- ## Quick Use ```bash curl -LsSf https://github.com/guywaldman/magic-cli/releases/download/0.0.6/magic-cli-installer.sh | sh magic-cli suggest "Resize test_image.png to 300x300 with ffmpeg" magic-cli search "zellij attach" magic-cli ask "Set up the dev environment as described in the README" ``` ## Intro magic-cli 是受 Copilot for CLI 启发的 Rust 工具:可建议命令、语义检索 shell 历史,并支持本地/云端 LLM provider。README 提供 curl 安装脚本与 Homebrew 安装方式。 **Best for:** 终端重度用户:经常忘参数/组合命令,想更快找回正确写法的人 **Works with:** macOS/Linux/Windows(安装脚本);Ollama/OpenAI/Anthropic **Setup time:** 4-12 minutes ### Key facts (verified) - GitHub:746 stars · 19 forks;最近更新 2026-04-21。 - 许可证:MIT;作者头像与仓库链接均已通过 GitHub API 复核。 - README 中核对过的入口命令:`brew install guywaldman/tap/magic-cli`。 ## Main - 知道目标但忘了参数时用 `suggest`;确定以前跑过但想不起来时用 `search`。 - 注意成本:README 提醒用非本地 LLM 做历史 embeddings 可能很贵;可先用 Ollama 走本地方案。 - 按 README 示例在 `~/.zshrc`/`~/.bashrc` 加快捷函数,减少引号与重复输入,提高使用手感。 ### Source-backed notes - README 的 Features 列出:命令建议(suggest)、任务生成命令(ask)、以及 shell 历史语义检索(search)。 - README 的 Installation 提供 curl 安装脚本,并给出 Homebrew 与 PowerShell 安装方式。 - README 说明配置文件路径为 `~/.config/magic_cli/config.json`,并列出支持的 provider。 ### FAQ - **稳定吗?**:README 标注仍处于早期开发,可能有破坏性变更;建议跟随 releases 更新。 - **能完全本地跑吗?**:可以。README 列出 Ollama 作为支持的本地 provider(聊天与 embeddings)。 - **密钥存在哪里?**:README 说明 API key 存在用户目录下的配置文件中;需按常规 CLI 凭证方式管理。 ## Source & Thanks > Source: https://github.com/guywaldman/magic-cli > License: MIT > GitHub stars: 746 · forks: 19 --- Source: https://tokrepo.com/en/workflows/magic-cli-llm-command-suggestion-for-terminals Author: Script Depot