[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-81810":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":15,"stars7d":15,"stars30d":16,"stars90d":15,"forks30d":15,"starsTrendScore":15,"compositeScore":17,"rankGlobal":10,"rankLanguage":10,"license":18,"archived":19,"fork":19,"defaultBranch":20,"hasWiki":21,"hasPages":19,"topics":22,"createdAt":10,"pushedAt":10,"updatedAt":28,"readmeContent":29,"aiSummary":30,"trendingCount":15,"starSnapshotCount":15,"syncStatus":31,"lastSyncTime":32,"discoverSource":33},81810,"inspect","codeprakhar25\u002Finspect","codeprakhar25","Get to know about commands before you execute them","",null,"Rust",38,1,35,0,3,41.2,"MIT License",false,"main",true,[23,24,25,26,27],"cli","commands","linux","macos","wsl2","2026-06-12 04:01:35","\u003Cdiv align=\"center\">\n\n# 🔍 inspect\n\n**Understand any shell command without leaving your terminal.**\n\n[![License: MIT](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-MIT-yellow.svg)](LICENSE)\n[![Built with Rust](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FBuilt%20with-Rust-orange?logo=rust)](https:\u002F\u002Fwww.rust-lang.org\u002F)\n[![Platform: Linux](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FPlatform-Linux-blue?logo=linux)](https:\u002F\u002Fgithub.com\u002Fcodeprakhar25\u002Finspect)\n[![Platform: macOS](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FPlatform-macOS-lightgrey?logo=apple)](https:\u002F\u002Fgithub.com\u002Fcodeprakhar25\u002Finspect)\n[![Platform: WSL](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FPlatform-WSL-4D2AFF?logo=windows)](https:\u002F\u002Fgithub.com\u002Fcodeprakhar25\u002Finspect)\n[![PRs Welcome](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FPRs-welcome-brightgreen.svg)](https:\u002F\u002Fgithub.com\u002Fcodeprakhar25\u002Finspect\u002Fpulls)\n\n![inspect demo](demo.gif)\n\n\u003C\u002Fdiv>\n\n---\n\nYou're mid-workflow. You half-remember what `-rn` does in `cp`. You could Google it, wade through man pages, or just... ask.\n\n```\n$ inspect cp -rn src\u002F dest\u002F\n──────────────────────────────────────\n Command: cp -rn src\u002F dest\u002F\n\n  -r  copy directories recursively\n  -n  will NOT overwrite existing files in dest\u002F\n\n Net effect: safe incremental copy. New files added, nothing clobbered.\n──────────────────────────────────────\n```\n\nNo browser. No context switch. Back to work in 3 seconds.\n\n---\n\n## Features\n\n- **Invocation explain** — paste any command, get a plain-English breakdown of every flag\n- **Command lookup** — full docs: summary, usage, flags, examples, risk warnings\n- **Reverse lookup** — describe a task and get direct command suggestions via local Ollama\n- **Capability explorer** — group a command's practical workflows by use case\n- **Interactive Q&A** — ask follow-up questions after lookup, powered by local LLM (Ollama)\n- **Shell widget** — press `Ctrl+]` on any half-typed command to explain it inline\n- **Git-aware** — understands `git commit`, `git push --force-with-lease`, etc. as subcommands\n- **Works offline** — curated knowledge base + man pages + `--help`, no network needed\n- **LLM enrichment** — local Ollama integration for obscure commands and cached responses\n\n---\n\n## Demo\n\n```\n$ inspect git push --force-with-lease origin main\n──────────────────────────────────────\n Command: git push --force-with-lease origin main\n\n  --force-with-lease  force push only if nobody else has pushed (safer than --force)\n  origin              the remote to push to\n  main                the branch to push\n\n Net effect: rewrites remote history safely — aborts if someone else pushed since your last fetch.\n\n RISKS:\n  caution    Still rewrites history. Coordinate with your team first.\n──────────────────────────────────────\n```\n\n```\n$ inspect tar\n──────────────────────────────────────\n tar — store and extract files from an archive\n\n USAGE: tar [OPTION...] [FILE]...\n\n EXAMPLES:\n  tar -czf archive.tar.gz dir\u002F     create compressed archive\n  tar -xzf archive.tar.gz          extract compressed archive\n  tar -tzf archive.tar.gz          list contents without extracting\n\n IMPORTANT FLAGS:\n  -c, --create     create a new archive\n  -x, --extract    extract files from an archive\n  -z, --gzip       filter through gzip\n  -f, --file       use archive file\n  -v, --verbose    list files processed\n  ...\n──────────────────────────────────────\n\n  ask anything (enter to exit): what's the difference between -z and -j?\n  -z uses gzip compression (.tar.gz), -j uses bzip2 (.tar.bz2). bzip2 compresses\n  better but is slower. For most uses, gzip is fine.\n```\n\n```\n$ inspect --find \"compress a directory into a tarball\"\n──────────────────────────────────────\n Commands for: \"compress a directory into a tarball\"\n\n  tar\n    create a tarball of the specified directory\n    tar -czf archive.tar.gz \u002Fpath\u002Fto\u002Fdirectory\n──────────────────────────────────────\n```\n\n```\n$ inspect --explore tar\n──────────────────────────────────────\n tar — an archiving utility\n\n ARCHIVE FILES\n   Create a new archive or extract files from an existing one\n   $ tar -czf archive.tar.gz dir\u002F\n   $ tar -xzf backup.tar.gz\n\n COMPRESS WITH GZIP\n   Filter archive through gzip for compression\n   $ tar -czf archive.tar.gz dir\u002F\n   $ tar -xzvf archive.tar.gz\n──────────────────────────────────────\n```\n\n---\n\n## Install\n\n### One-liner (Linux & macOS)\n\n```bash\ncurl -fsSL https:\u002F\u002Fraw.githubusercontent.com\u002Fcodeprakhar25\u002Finspect\u002Fmain\u002Finstall.sh | sh\n```\n\nInstalls to `~\u002F.local\u002Fbin\u002Finspect`. Supports Linux x86_64\u002Farm64 and macOS x86_64\u002Farm64.\n\n### From source (requires [Rust](https:\u002F\u002Frustup.rs))\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fcodeprakhar25\u002Finspect.git\ncd inspect\ncargo build --release\n\n# Put on PATH (pick one)\ncp target\u002Frelease\u002Finspect ~\u002F.local\u002Fbin\u002F\nsudo cp target\u002Frelease\u002Finspect \u002Fusr\u002Flocal\u002Fbin\u002F\n```\n\nTo update an existing source checkout:\n\n```bash\ngit pull\ncargo build --release\nhash -r   # bash: clear any cached inspect path\n```\n\n---\n\n## Shell widget — Ctrl+]\n\nThe best part. Press **Ctrl+]** on any command you're typing to explain it inline — without losing your prompt.\n\n```bash\ninspect --install-shell bash   # or zsh\nsource ~\u002F.bashrc               # reload\n```\n\nType something, press Ctrl+]:\n\n```\n$ rsync -avz --progress src\u002F dest\u002F     ← press Ctrl+]\n\n  -a  archive mode (preserves permissions, timestamps, symlinks)\n  -v  verbose\n  -z  compress during transfer\n  --progress  show per-file progress bar\n\n$ rsync -avz --progress src\u002F dest\u002F     ← cursor back, unchanged\n```\n\n---\n\n## LLM modes (optional)\n\nInstall [Ollama](https:\u002F\u002Follama.com), pull a model, and `inspect` can enrich docs, power the interactive Q&A prompt, suggest commands from intent, and explore command capabilities:\n\n```bash\nollama pull llama3.2\n\ninspect --llm some-obscure-tool\ninspect --llm --llm-model qwen2.5 curl\ninspect --find \"find files modified in the last 7 days\"\ninspect --explore tar\n```\n\nThe first request can be slow while Ollama loads the model. Responses cache under `~\u002F.cache\u002Finspect-cli\u002F` — repeated lookups are instant.\n\nWithout Ollama, `inspect` works fine using man pages, `--help`, and the built-in curated database.\n\n**Environment variables:**\n\n| Variable | Default |\n|---|---|\n| `INSPECT_OLLAMA_MODEL` | `llama3.2` |\n| `INSPECT_OLLAMA_URL` | `http:\u002F\u002F127.0.0.1:11434` |\n\n---\n\n## All options\n\n```\ninspect [OPTIONS] \u003Ccommand>\ninspect [OPTIONS] \u003Ccommand> [flags...] [args...]\ninspect --find \u003Cdescription>\ninspect --explore \u003Ccommand>\n\nMODES:\n    inspect cp                     lookup: show docs for 'cp'\n    inspect cp -rn src\u002F dest\u002F      explain: resolve each flag in the invocation\n    inspect git commit -m \"fix\"    explain git subcommands\n    inspect --find \"archive files\" reverse lookup: suggest commands for intent\n    inspect --explore tar          explore: group tar's capabilities by use case\n\nOPTIONS:\n    --json                emit machine-readable JSON\n    --allow-help          run \u003Ccommand> --help even for unknown commands\n    --no-help             skip all \u003Ccommand> --help execution\n    --llm                 enrich output via local Ollama instance\n    --llm-model MODEL     Ollama model (default: env INSPECT_OLLAMA_MODEL or llama3.2)\n    --llm-url URL         Ollama base URL (default: env INSPECT_OLLAMA_URL or http:\u002F\u002F127.0.0.1:11434)\n    --find DESCRIPTION    suggest commands that accomplish DESCRIPTION (uses Ollama)\n    --explore             group the command's capabilities by practical use case (uses Ollama)\n    -v, --verbose         show source\u002Ffallback warnings\n    --install-shell SHELL append shell widget to ~\u002F.bashrc or ~\u002F.zshrc (bash or zsh)\n    -h, --help            show this help\n    -V, --version         print version\n```\n\n---\n\n## How docs are assembled\n\nSources are tried in priority order:\n\n| Priority | Source | Notes |\n|---|---|---|\n| 1 | Curated knowledge base | Hand-written entries for 40+ common commands |\n| 2 | `man` pages | Parsed and cleaned — strips groff, encoding artifacts |\n| 3 | `--help` output | Flag and usage extraction |\n| 4 | Ollama LLM | `--llm`, `--find`, and `--explore`; cached locally |\n\n---\n\n## Contributing\n\nContributions welcome — especially curated entries. A curated entry gives cleaner output than any man page and takes ~10 minutes to write.\n\nEntries live in [`src\u002Fcurated.rs`](src\u002Fcurated.rs). Existing entries are the best format reference.\n\n```bash\ncargo test      # run tests\ncargo clippy    # lint\ncargo fmt       # format\n```\n\nOpen an issue first for anything beyond a curated entry addition or bug fix.\n\n---\n\n## License\n\nMIT — see [LICENSE](LICENSE).\n","inspect 是一个命令行工具，帮助用户在执行前理解任何 shell 命令。它使用 Rust 语言编写，支持 Linux、macOS 和 WSL2 平台。核心功能包括命令解释、查找和反向查询等，能够解析命令的每个参数并以简洁易懂的语言展示其作用及潜在风险。此外，还集成了本地 LLM（Ollama）来提供更深入的帮助信息，并且可以在离线状态下工作。适用于需要频繁使用终端但又不完全熟悉所有命令细节的开发者或系统管理员，在日常开发、运维过程中提高效率与安全性。",2,"2026-06-11 04:06:48","CREATED_QUERY"]