For developers who can never remember the right bash command
Project description
Rubber Ducky
Rubber Ducky is an inline terminal companion that turns natural language prompts into runnable shell commands. Paste multi-line context, get a suggested command, and run it without leaving your terminal.
Quick Start
| Action | Command |
|---|---|
| Install globally | uv tool install rubber-ducky |
| Run once | uvx rubber-ducky -- --help |
| Local install | uv pip install rubber-ducky |
Requirements:
- Ollama running locally
- Model available via Ollama (default:
qwen3-coder:480b-cloud, install withollama pull qwen3-coder:480b-cloud)
Usage
ducky # interactive inline session
ducky --directory src # preload code from a directory
ducky --model llama3 # use a different Ollama model
Both ducky and rubber-ducky executables map to the same CLI, so uvx rubber-ducky -- <args> works as well.
Inline Session (default)
Launching ducky with no arguments opens the inline interface:
- Enter submits; Ctrl+J inserts a newline (helpful when crafting multi-line prompts).
- Ctrl+R re-runs the last suggested command.
- Prefix any line with
!(e.g.,!ls -la) to run a shell command immediately. - Arrow keys browse prompt history, backed by
~/.ducky/prompt_history. - Every prompt, assistant response, and executed command is logged to
~/.ducky/conversation.log. - Press Ctrl+D on an empty line to exit.
- Non-interactive runs such as
cat prompt.txt | duckyprint one response (and suggested command) before exiting; if a TTY is available you'll be asked whether to run the suggested command immediately. - If
prompt_toolkitis unavailable in your environment, Rubber Ducky falls back to a basic input loop (no history or shortcuts); installprompt-toolkit>=3.0.48to unlock the richer UI.
ducky --directory <path> streams the contents of the provided directory to the assistant the next time you submit a prompt (the directory is read once at startup).
Development (uv)
uv sync
uv run ducky --help
uv sync creates a virtual environment and installs dependencies defined in pyproject.toml / uv.lock.
Telemetry & Storage
Rubber Ducky stores:
~/.ducky/prompt_history: readline-compatible history file.~/.ducky/conversation.log: JSON lines with timestamps for prompts, assistant messages, and shell executions.
No other telemetry is collected; delete the directory if you want a fresh slate.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rubber_ducky-1.2.0.tar.gz.
File metadata
- Download URL: rubber_ducky-1.2.0.tar.gz
- Upload date:
- Size: 7.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8955a56b3194487cb190f03210eac9c902f5e6019b9c2952b4caabd6674f9247
|
|
| MD5 |
ee1399b8084c08a74294cf8fc957d122
|
|
| BLAKE2b-256 |
4dd02b1924d0f429a750fb2dbb3a34bcaf3448b3b5ac0c6ce2cc0bb3a270fd3e
|
Provenance
The following attestation bundles were made for rubber_ducky-1.2.0.tar.gz:
Publisher:
python-publish.yml on ParthSareen/ducky
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rubber_ducky-1.2.0.tar.gz -
Subject digest:
8955a56b3194487cb190f03210eac9c902f5e6019b9c2952b4caabd6674f9247 - Sigstore transparency entry: 698253340
- Sigstore integration time:
-
Permalink:
ParthSareen/ducky@371e7b95ed28ffc939ee3e517bcf47080fe931c5 -
Branch / Tag:
refs/tags/v1.2.0 - Owner: https://github.com/ParthSareen
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@371e7b95ed28ffc939ee3e517bcf47080fe931c5 -
Trigger Event:
release
-
Statement type:
File details
Details for the file rubber_ducky-1.2.0-py3-none-any.whl.
File metadata
- Download URL: rubber_ducky-1.2.0-py3-none-any.whl
- Upload date:
- Size: 7.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c7b5955876e7567908d3ea3c8efa94808f94527e1baf30831f9cd545f699fa36
|
|
| MD5 |
522f85400f26dbe6bf4c6b12f4671856
|
|
| BLAKE2b-256 |
b2a2400980c77d3355fee0fc7d778018cd59a8ec203be77ebc07c8f3eedb298a
|
Provenance
The following attestation bundles were made for rubber_ducky-1.2.0-py3-none-any.whl:
Publisher:
python-publish.yml on ParthSareen/ducky
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rubber_ducky-1.2.0-py3-none-any.whl -
Subject digest:
c7b5955876e7567908d3ea3c8efa94808f94527e1baf30831f9cd545f699fa36 - Sigstore transparency entry: 698253365
- Sigstore integration time:
-
Permalink:
ParthSareen/ducky@371e7b95ed28ffc939ee3e517bcf47080fe931c5 -
Branch / Tag:
refs/tags/v1.2.0 - Owner: https://github.com/ParthSareen
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@371e7b95ed28ffc939ee3e517bcf47080fe931c5 -
Trigger Event:
release
-
Statement type: