{"id":40006153,"url":"https://github.com/zhangtiande/nudge","last_synced_at":"2026-02-05T16:01:25.596Z","repository":{"id":332301751,"uuid":"1133229018","full_name":"Zhangtiande/nudge","owner":"Zhangtiande","description":"🤖 LLM-powered CLI auto-completion with privacy-first design. Fast, context-aware shell suggestions for Bash/Zsh/PowerShell","archived":false,"fork":false,"pushed_at":"2026-01-28T15:21:38.000Z","size":1711,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-29T06:57:58.772Z","etag":null,"topics":["autocomplete","cli-completion","command-line","llm","shell-completion"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Zhangtiande.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":"ROADMAP.md","authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-13T04:03:04.000Z","updated_at":"2026-01-28T15:26:11.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/Zhangtiande/nudge","commit_stats":null,"previous_names":["zhangtiande/nudge"],"tags_count":18,"template":false,"template_full_name":null,"purl":"pkg:github/Zhangtiande/nudge","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zhangtiande%2Fnudge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zhangtiande%2Fnudge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zhangtiande%2Fnudge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zhangtiande%2Fnudge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Zhangtiande","download_url":"https://codeload.github.com/Zhangtiande/nudge/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zhangtiande%2Fnudge/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29125101,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-05T14:05:12.718Z","status":"ssl_error","status_checked_at":"2026-02-05T14:03:53.078Z","response_time":65,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["autocomplete","cli-completion","command-line","llm","shell-completion"],"created_at":"2026-01-19T02:05:57.970Z","updated_at":"2026-02-05T16:01:25.588Z","avatar_url":"https://github.com/Zhangtiande.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Nudge\n\n\u003e A gentle nudge for your shell - LLM-powered CLI auto-completion\n\n[English](./README.md) | [中文](./README_zh.md)\n\n[![CI](https://github.com/Zhangtiande/nudge/actions/workflows/ci.yml/badge.svg)](https://github.com/Zhangtiande/nudge/actions/workflows/ci.yml)\n[![Release](https://github.com/Zhangtiande/nudge/actions/workflows/release.yml/badge.svg)](https://github.com/Zhangtiande/nudge/actions/workflows/release.yml)\n[![Latest Release](https://img.shields.io/github/v/release/Zhangtiande/nudge)](https://github.com/Zhangtiande/nudge/releases/latest)\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE)\n\nNudge uses Large Language Models to predict and complete command-line inputs based on your shell history, current directory context, and project state.\n\n## Features\n\n- **AI-Powered Completions** - Uses LLM to understand context and suggest relevant commands\n- **Project-Aware** - Automatically detects Git, Node.js, Python, Rust, Docker projects and provides deep context\n- **History-Aware** - Learns from your shell history with similar command search (like Ctrl+R)\n- **System-Aware** - Adapts suggestions based on your OS, architecture, and shell type\n- **Error Diagnosis** - Automatically analyzes failed commands and suggests fixes\n- **Privacy-First** - Sanitizes sensitive data (API keys, passwords) before sending to LLM\n- **Safety Warnings** - Flags potentially dangerous commands (rm -rf, mkfs, etc.)\n- **Multi-Shell** - Works with Bash, Zsh, PowerShell, and CMD\n- **Cross-Platform** - Supports Linux, macOS, and Windows\n- **Fast** - \u003c200ms response time with local LLMs\n- **Auto Mode** - Ghost text suggestions as you type (Zsh only)\n\n## Demo\n\n**Zsh Auto Mode** - Ghost text suggestions appear as you type:\n\nhttps://github.com/user-attachments/assets/766247e1-1cf2-47da-96e7-045415ede013\n\n## Quick Start\n\n### Installation\n\n**Linux/macOS:**\n```bash\ncurl -fsSL https://raw.githubusercontent.com/Zhangtiande/nudge/main/scripts/install.sh | bash\n```\n\n**Windows (PowerShell):**\n```powershell\nirm https://raw.githubusercontent.com/Zhangtiande/nudge/main/scripts/install.ps1 | iex\n```\n\nThe installer downloads the binary, configures shell integration, and starts the daemon.\n\nFor manual installation or building from source, see the [Installation Guide](docs/installation.md).\n\n### Basic Usage\n\nAfter installation, press `Ctrl+E` while typing a command to trigger completion.\n\n```bash\n# Start daemon (if not auto-started)\nnudge start\n\n# Check status\nnudge status\n\n# Show runtime info\nnudge info\n```\n\n### Configuration\n\nCreate `~/.config/nudge/config.yaml` (Linux/macOS) or `%APPDATA%\\nudge\\config\\config.yaml` (Windows):\n\n```yaml\nmodel:\n  endpoint: \"http://localhost:11434/v1\"  # Ollama default\n  model_name: \"codellama:7b\"\n\ntrigger:\n  mode: \"manual\"        # \"manual\" or \"auto\"\n  auto_delay_ms: 500    # Debounce for auto mode\n\ncache:\n  ttl_auto_ms: 3000     # Auto mode cache TTL\n  ttl_manual_ms: 15000  # Manual mode cache TTL\n\ndiagnosis:\n  enabled: true         # Enable error diagnosis\n```\n\nSee [Configuration Reference](docs/configuration.md) for all options.\n\n## Trigger Modes\n\n| Mode | Description | Supported Shells |\n|------|-------------|------------------|\n| **Manual** | Press `Ctrl+E` to trigger | All shells |\n| **Auto** | Ghost text appears as you type | Zsh only |\n\n| Key | Action |\n|-----|--------|\n| `Ctrl+E` | Trigger completion |\n| `Tab` | Accept suggestion (auto mode) |\n| `Right Arrow` | Accept next word (Zsh) |\n\n## Error Diagnosis\n\nWhen a command fails, Nudge analyzes the error with full project context and suggests a fix.\n\n**Zsh:**\n```\n$ gti status\nzsh: command not found: gti\n❌ Typo: 'gti' should be 'git'\n\ngit status          ← Tab to accept\n```\n\n**PowerShell:**\n```\nPS\u003e gti status\n[Error] Command not found: 'gti'\n[Tip] Typo: did you mean 'git'?\n\nPS\u003e █               ← Tab to accept\n```\n\nEnable in config:\n```yaml\ndiagnosis:\n  enabled: true\n```\n\n\u003e [!CAUTION]\n\u003e When error diagnosis is enabled, stderr is temporarily captured during command execution. This means progress output from tools like `cargo build`, `npm install`, or `docker pull` will appear **after** the command completes rather than in real-time. If you need real-time stderr output, disable diagnosis with `diagnosis.enabled: false`.\n\n## Project-Aware Context\n\nNudge automatically detects your project type and provides relevant context to the LLM:\n\n| Project Type | Detection | Context Provided |\n|--------------|-----------|------------------|\n| **Git** | `.git` directory | Branch, staged files, recent commits |\n| **Node.js** | `package.json` | Scripts, dependencies, package manager |\n| **Python** | `pyproject.toml`, `requirements.txt` | Dependencies, virtual env, Python version |\n| **Rust** | `Cargo.toml` | Dependencies, targets, workspace info |\n| **Docker** | `Dockerfile`, `compose.yaml` | Services, images, running containers |\n\n## LLM Providers\n\n### Ollama (Local)\n\n```bash\nollama pull codellama:7b\nollama serve\n```\n\n```yaml\nmodel:\n  endpoint: \"http://localhost:11434/v1\"\n  model_name: \"codellama:7b\"\n```\n\n### OpenAI\n\n```yaml\nmodel:\n  endpoint: \"https://api.openai.com/v1\"\n  model_name: \"gpt-4o-mini\"\n  api_key_env: \"OPENAI_API_KEY\"\n```\n\n### Alibaba DashScope (Qwen)\n\n```yaml\nmodel:\n  endpoint: \"https://dashscope.aliyuncs.com/compatible-mode/v1\"\n  model_name: \"qwen-coder-plus\"\n  api_key_env: \"DASHSCOPE_API_KEY\"\n```\n\n## Platform Support\n\n| Platform | Architecture | Download |\n|----------|--------------|----------|\n| Linux | x86_64 (glibc) | [Download](https://github.com/Zhangtiande/nudge/releases/latest/download/nudge-linux-x86_64.tar.gz) |\n| Linux | x86_64 (musl) | [Download](https://github.com/Zhangtiande/nudge/releases/latest/download/nudge-linux-x86_64-musl.tar.gz) |\n| Linux | aarch64 | [Download](https://github.com/Zhangtiande/nudge/releases/latest/download/nudge-linux-aarch64.tar.gz) |\n| macOS | x86_64 (Intel) | [Download](https://github.com/Zhangtiande/nudge/releases/latest/download/nudge-macos-x86_64.tar.gz) |\n| macOS | aarch64 (Apple Silicon) | [Download](https://github.com/Zhangtiande/nudge/releases/latest/download/nudge-macos-aarch64.tar.gz) |\n| Windows | x86_64 | [Download](https://github.com/Zhangtiande/nudge/releases/latest/download/nudge-windows-x86_64.zip) |\n\n### Shell Support\n\n| Shell | Manual Mode | Auto Mode | Error Diagnosis |\n|-------|-------------|-----------|-----------------|\n| Zsh | ✅ | ✅ | ✅ |\n| Bash | ✅ | ❌ | Planned |\n| PowerShell 7.2+ | ✅ | ❌ | ✅ |\n| PowerShell 5.1 | ✅ | ❌ | ✅ |\n| CMD | ✅ | ❌ | ❌ |\n\n## Architecture\n\n```\n┌─────────────────────────────────────────────────────────────────────┐\n│                          Nudge Binary                               │\n├─────────────────────────────┬───────────────────────────────────────┤\n│         Client Mode         │            Daemon Mode                │\n├─────────────────────────────┼───────────────────────────────────────┤\n│  • Capture buffer/cursor    │  • IPC Server (Socket/Named Pipe)     │\n│  • Send request via IPC     │  • Context Engine                     │\n│  • Output completion        │    ├─ History, CWD, System Info       │\n│                             │    └─ Plugins (Git, Node, Python...)  │\n│                             │  • LLM Connector                      │\n│                             │  • Sanitizer \u0026 Safety Checker         │\n└─────────────────────────────┴───────────────────────────────────────┘\n```\n\n## Documentation\n\n- [Installation Guide](docs/installation.md)\n- [Configuration Reference](docs/configuration.md)\n- [CLI Reference](docs/cli-reference.md)\n- [Auto Mode Guide](docs/auto-mode.md)\n- [Roadmap](ROADMAP.md)\n\n## Development\n\n```bash\ncargo build --release\ncargo test\ncargo clippy\ncargo fmt\n```\n\n## Contributing\n\nContributions are welcome! Please open an issue or pull request.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhangtiande%2Fnudge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzhangtiande%2Fnudge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhangtiande%2Fnudge/lists"}