"Dingens" [ˈdɪŋəns] — that handy German word from the Ruhr area for "thingamajig" or "whatchamacallit". You know, when you can’t quite remember the name of that... dingens.
And speaking of German words, "dingen" means "to hire" or "to delegate" — which is exactly what this tool does. It hires your terminal as an AI-powered sidekick, ready to take on the commands you don’t want to figure out yourself.
True to its name, dingen.sh
has your back when you’re stuck trying to remember that command. It’s a smart command-line wrapper that turns your half-baked ideas into fully-formed commands—no need to Google your way through obscure flags or syntaxes.
Utilizing persisted system prompts and the power of LLMs through gh models
, dingen.sh
helps you generate and run commands with ease and build own dingens by aliasing. ✨
- Reads a system prompt from a specified file.
- Accepts user prompts and optional parameters.
- Validates input to ensure correct usage.
- Interacts with an AI model to generate commands.
- Copies generated commands to the clipboard for easy access.
- Provides syntax highlighting for generated commands.
- Confirms execution of commands before running them.
Perfect for when you need to delegate the grunt work and focus on real tasks—because even the terminal deserves an intern. 💼
By letting you define your own system prompts like the demo home-assistant prompt, dingen.sh
adapts to your workflow, generating precise shell commands tailored to your needs. With built-in error handling and clipboard integration, it streamlines automation—turning your terminal into a powerhouse of efficiency that is superior to other consoles. 🕹️📺
- 💭 "Dingens, Werner, kannst du mir ma eben dat Bierchen kalt stellen? 🍻"
+ 💻 `dingen.sh ./prompts/home-assistant "stell Kühlschrank auf 6°"`
Wayyy to long - let's create or own "dingens" by adding an alias alias werner='dingen.sh ./prompts/home-assistant'
in our .bashrc
or .zshrc
and try again:
- 💭 "Dingens, Werner, stell die Heizung hoch, is ja kälter als inne Zeche hier!"
+ 💻 `werner "stell wohzimmer auf 23 grad"`
To use the script, run the following command in your terminal:
./dingens.sh <system_prompt_file> [--max-tokens <number>] <user_prompt>
<system_prompt_file>
: Path to the file containing the system prompt.--max-tokens <number>
: (Optional) Maximum number of tokens for the AI response. Default is 100.<user_prompt>
: The prompt you want to send to the AI.
./dingens.sh ./prompts/home-assistant "turn off lights in the living room"
- GitHub CLI: Install via
brew install gh
gh models
extension to be installed:gh extension install gh/models
gh auth login
to authenticate with GitHub.bat
for syntax highlighting:brew install bat
jq
for JSON parsing:brew install jq
- Requires
pbcopy
for clipboard functionality (macOS).
Given you have the required dependencies installed, you can "install" it on the fly by adding the following alias to your .bashrc
or .zshrc
:
alias dingen.sh='function _dingens() { bash -c "$(curl -fsSL https://dingen.sh/script)" -- "$@"; }; _dingens'
⚠️ Caution: I would not recommend this for production use for performance and security reasons.
- Clone the repository:
git clone https://github.com/mathiasschopmans/dingen.sh.git
- Make the script executable:
chmod +x ~/path/to/dingen.sh
- Add an alias to your
.bashrc
or.zshrc
:alias dingen.sh='bash ~/path/to/dingen.sh'
- Source your
.bashrc
or.zshrc
:source ~/.bashrc # or source ~/.zshrc
- Install dependencies:
brew install bat gh jq
- Authenticate with GitHub:
gh auth login
- Install the
gh models
extension:gh extension install gh/models
Contributions are welcome. Please open an issue or submit a pull request for any enhancements or bug fixes.
From @mathiasschopmans with löve. 💌
Rheurdt York, Germany, 2025