CLI ToolsMay 13, 2026·2 min read

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.

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

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets