{"id":16092274,"url":"https://github.com/parthsareen/ducky","last_synced_at":"2026-01-16T04:49:12.054Z","repository":{"id":212533997,"uuid":"731700302","full_name":"ParthSareen/ducky","owner":"ParthSareen","description":"Local AI pair programming tool","archived":false,"fork":false,"pushed_at":"2023-12-17T20:03:44.000Z","size":339,"stargazers_count":15,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-10-22T22:36:03.782Z","etag":null,"topics":["langchain","llama","llm","ollama","pair-programming"],"latest_commit_sha":null,"homepage":"","language":"Python","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/ParthSareen.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":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-12-14T17:07:47.000Z","updated_at":"2024-10-22T10:57:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"df148092-1d8d-4e7a-8803-3f7c69063e87","html_url":"https://github.com/ParthSareen/ducky","commit_stats":{"total_commits":18,"total_committers":1,"mean_commits":18.0,"dds":0.0,"last_synced_commit":"8e0222a7cd76eba46d588ca0ada7c7536f13630d"},"previous_names":["parthsareen/ducky"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ParthSareen%2Fducky","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ParthSareen%2Fducky/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ParthSareen%2Fducky/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ParthSareen%2Fducky/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ParthSareen","download_url":"https://codeload.github.com/ParthSareen/ducky/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227965552,"owners_count":17848445,"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":["langchain","llama","llm","ollama","pair-programming"],"created_at":"2024-10-09T16:06:30.594Z","updated_at":"2026-01-16T04:49:12.043Z","avatar_url":"https://github.com/ParthSareen.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rubber Ducky\n\nTurn natural language into bash commands without leaving your terminal.\n\nRubber Ducky is an inline terminal companion that transforms your prompts into runnable shell commands. Paste multi-line context, get smart suggestions, and execute commands instantly.\n\n---\n\n## Quick Start\n\n```bash\n# Install globally (recommended)\nuv tool install rubber-ducky\n\n# Run interactively\nducky\n\n# Quick one-shot\nducky \"list all files larger than 10MB in current directory\"\n\n# From CLI with options\nducky --model qwen3\nducky --directory src\nducky --local\n\n# Or use uvx (requires -- separator)\nuvx rubber-ducky -- --model qwen3\n```\n\nBoth `ducky` and `rubber-ducky` executables work identically.\n\n### Requirements\n\n- [Ollama](https://ollama.com) (running locally or using cloud models)\n- Python 3.10+\n\n---\n\n## Features\n\n- **Natural to Shell** - Describe what you want, get the bash command\n- **Model Flexibility** - Switch between local Ollama models and cloud models\n- **Crumbs** - Save and reuse commands with argument substitution\n- **Piped Input** - Pipe output from other commands directly to ducky\n- **Interactive REPL** - Rich terminal experience with history and shortcuts\n- **Code Context** - Preload project code for AI awareness\n- **Clipboard Support** - Copy commands across macOS, Windows, and Linux\n\n---\n\n## Key Concepts\n\n### REPL (Interactive Mode)\n\nLaunch `ducky` to start an inline session:\n\n```\nducky\n```\n\n**Key controls:**\n- `Enter` - Submit prompt\n- `Ctrl+J` - Insert newline (for multi-line prompts)\n- `Empty Enter` - Rerun last command or explain shell output\n- `Ctrl+R` - Re-run last suggested command\n- `Ctrl+S` - Copy last command to clipboard\n- `!\u003ccmd\u003e` - Run shell command immediately\n- `Arrow keys` - Browse history\n- `Ctrl+D` - Exit\n\n### Models\n\nRubber Ducky supports both local and cloud models:\n\n- `/model` - Interactive model selection\n- `/local` - List local models (localhost:11434)\n- `/cloud` - List cloud models (ollama.com)\n- Last used model is saved automatically\n\n**Startup flags:**\n- `--local` / `-l` - Use local Ollama with qwen3 default\n- `--model \u003cname\u003e` / `-m` - Specify model directly\n\n### Crumbs\n\nCrumbs are saved command shortcuts. Store frequently-used commands or complex workflows:\n\n```\n\u003e\u003e How do I list all running Python processes?\n...\nSuggested: ps aux | grep python | grep -v grep\n\u003e\u003e /crumb pyprocs\nSaved crumb 'pyprocs'!\n```\n\n**Invoke crumb:**\n```\n\u003e\u003e pyprocs\nCrumb: pyprocs\nCommand: ps aux | grep python | grep -v grep\n...\n```\n\n**With argument substitution:**\n```bash\n# Crumb command: git worktree add \"../$var-$other\" -b $var3\nducky at feature backend develop\n# Executes: git worktree add \"../feature-backend\" -b develop\n```\n\n---\n\n## Usage Guide\n\n### Interactive Mode\n\nDefault mode. Perfect for development sessions.\n\n```bash\nducky\n```\n\nLoad code context for better suggestions:\n\n```bash\nducky --directory src\n```\n\n### Single-Shot Mode\n\nGet one command suggestion and exit.\n\n```bash\nducky \"find all TODO comments in src/\"\n```\n\nCopy to clipboard automatically:\n\n```bash\nducky \"build and run tests\"\n```\n\n### Piped Input\n\nProcess text from other commands:\n\n```bash\ncat error.log | ducky \"what's wrong here?\"\ngit diff | ducky \"summarize these changes\"\n```\n\n### Run Without Confirmation\n\nAuto-execute suggested commands:\n\n```bash\nducky --yolo \"restart the nginx service\"\n```\n\n---\n\n## Crumbs Quick Reference\n\n| Command | Description |\n|---------|-------------|\n| `/crumbs` | List all saved crumbs |\n| `/crumb \u003cname\u003e` | Save last command as crumb |\n| `/crumb add \u003cname\u003e \u003ccmd\u003e` | Manually add crumb |\n| `/crumb del \u003cname\u003e` | Delete crumb |\n| `\u003cname\u003e` | Execute crumb |\n| `/crumb help` | Detailed crumb help |\n\n**Argument Substitution:**\n\nCrumbs support `${VAR}` and `$var` placeholder styles:\n\n```bash\n# Create crumb with placeholders\ngit worktree add \"../$var-$other\" -b $var3\n\n# Invoke with arguments\nducky at feature backend develop\n```\n\nBoth styles are interchangeable.\n\n---\n\n## Command Reference\n\n### Inline Commands\n\n| Command | Action |\n|---------|--------|\n| `/help` | Show all commands |\n| `/clear` / `/reset` | Clear conversation history |\n| `/model` | Select model (interactive) |\n| `/local` | List local models |\n| `/cloud` | List cloud models |\n| `/run` / `:run` | Re-run last command |\n| `/expand` | Show full output of last shell command |\n\n### CLI Flags\n\n| Flag | Description |\n|------|-------------|\n| `--directory \u003cpath\u003e` / `-d` | Preload code from directory |\n| `--model \u003cname\u003e` / `-m` | Specify Ollama model |\n| `--local` / `-l` | Use local Ollama (qwen3 default) |\n| `--yolo` / `-y` | Auto-run without confirmation |\n| `\u003cprompt\u003e` | Single prompt mode (copied to clipboard) |\n\n---\n\n## Tips \u0026 Tricks\n\n### Efficient Workflows\n\n```bash\n# Preload project context\nducky --directory src\n\n# Reuse complex commands with crumbs\ndocker ps | ducky \"kill all containers\"\n\u003e\u003e /crumb killall\n\n# Chain commands\n!ls -la\nducksy \"find large files\"\n\n# Use history\n[↑] Recall previous prompts\n[↓] Navigate command history\n```\n\n### Keyboard Shortcuts Reference\n\n| Key | Action |\n|-----|--------|\n| `Enter` | Submit prompt |\n| `Ctrl+J` | Insert newline |\n| `Empty Enter` | Rerun last command or explain |\n| `Ctrl+R` | Re-run last suggested command |\n| `Ctrl+S` | Copy to clipboard |\n| `Ctrl+D` | Exit |\n| `!cmd` | Run shell command directly |\n\n### Crumb Patterns\n\n```bash\n# Save after complex command\n\u003e\u003e docker-compose up -d \u0026\u0026 wait \u0026\u0026 docker-compose logs\n\u003e\u003e /crumb start-logs\n\n# Manually add with arguments\n\u003e\u003e /crumb add deploy-prod docker build -t app:latest \u0026\u0026 docker push app:latest\n\n# Use for common workflows\n\u003e\u003e ls -la\nfind . -type f -name \"*.py\" | xargs wc -l\n\u003e\u003e /crumb count-py\n```\n\n---\n\n## Storage\n\nRubber Ducky stores data in `~/.ducky/`:\n\n| File | Purpose |\n|------|---------|\n| `prompt_history` | readline-compatible history |\n| `conversation.log` | JSON log of all interactions |\n| `config` | User preferences (last model) |\n| `crumbs.json` | Saved crumb shortcuts |\n\nDelete the entire directory for a fresh start.\n\n---\n\n## Development\n\n```bash\n# Clone and setup\ngit clone \u003crepo\u003e\ncd ducky\nuv sync\n\n# Run\nuv run ducky --help\nuv run ducky\n\n# Lint\nuv run ruff check .\n```\n\n---\n\n## License\n\nMIT © 2023 Parth Sareen\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparthsareen%2Fducky","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fparthsareen%2Fducky","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparthsareen%2Fducky/lists"}