Model or dataset
djcopley/ShellOracle avatar
djcopley/ShellOracle

ShellOracle: Natural Language Shell Commands via CTRL+F

A terminal utility for intelligent shell command generation

353 stars25 forksPythonGPL-3.0

At a glance

What is it?
ShellOracle turns a written description into a shell command and inserts it into your prompt. It is a thin Python client over your choice of LLM provider, and the interesting parts are the widget integration and the config file.
Who is it for?
Adopt ShellOracle if you already run a local model or hold an API key and want command generation inside your existing prompt rather than in a separate chat window. Skip it if you need a deterministic, offline, dependency-free helper, or if you cannot accept that a language model writes text straight into your shell buffer.
Can I use it commercially?
Yes, with conditions. GPL-3.0 is a copyleft licence: if you distribute software that includes it, you must release that software's source code under the same licence. Running it internally without distributing it does not trigger that obligation.
Is it still maintained?
Yes. The repository last received commits 24 days ago.
What is it written in?
Mainly Python, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on October 4, 2026, and from our analysis. They are not legal advice.

Editorial analysis

What ShellOracle actually removes from your workflow

The problem is not that shell syntax is hard. It is that a specific flag or a specific find expression is easy to forget, and the cost of looking it up is a context switch: a browser tab, a man page, a scroll. ShellOracle targets that gap. You press CTRL+F, describe what you want in plain words, press Enter, and the generated command lands in your prompt buffer rather than executing. That last detail matters. The tool substitutes text; it does not run anything, so the review step stays with you.

The intended audience is developers who already live in BASH, ZSH or fish on macOS or Linux and who have access to a model, either locally through Ollama or LocalAI, or through a hosted API such as OpenAI, Deepseek, Google or XAI. The README also documents LM Studio through an OpenAI-compatible provider entry, which is the path to take if you want a GUI-managed local model. If you work mostly in a GUI editor or a notebook, the widget model buys you nothing.

How the widget, the CLI and the provider layer fit together

ShellOracle ships one console script, shor, defined in pyproject.toml as shelloracle.cli:main. The same code runs as python3 -m shelloracle. The difference between the two invocation styles is stated plainly in the README: running it as a module or through shor on its own prints a result but does not insert it into your prompt. The insertion behaviour comes from the shell widget bound to CTRL+F.

The data flow is short. The widget captures the description, optionally taking any text left of the cursor in your ZLE buffer as a prefix, and hands it to the Python process. That process reads ~/.shelloracle/config.toml, picks the provider named under [shelloracle] provider, and sends the prompt through the corresponding client. The dependency list shows what sits underneath: httpx and the openai package for HTTP providers, google-genai for Google, prompt-toolkit for the interactive prompt, rich and pygments for display, tomlkit for config editing, and yaspin for the spinner during the wait.

Because the provider layer is pluggable, the same binary works against a model on localhost and a hosted endpoint. The README lists Ollama, llmman, OpenAI, Deepseek, LocalAI, LM Studio and XAI as supported. That breadth is the main architectural claim, and it is also where configuration mistakes surface first.

Installing ShellOracle and generating your first command

The README recommends pipx over pip because pipx isolates the environment automatically. The install is a single command, and then an interactive configuration step that writes ~/.shelloracle/config.toml and prompts you for a provider and model.

bash
pipx install shelloracle
shor config init

After config init completes you should have a config file at ~/.shelloracle/config.toml. If you chose Ollama, the README says to pull the model you selected before the first request, otherwise the provider will have nothing to serve.

bash
ollama pull gemma4:12b

With the model present, open a new shell and press CTRL+F, type a description such as a request to list Python files in the current directory, and press Enter. The README states the generated command is inserted into your shell prompt after a processing period. Nothing runs until you press Enter a second time.

If you would rather not use the widget, the pipe form works and is useful for scripting. The README gives this exact example.

bash
echo "find all the python files in my cwd" | shor

For a hosted provider, the README points you at ~/.shelloracle/config.toml to set the provider and API key, with shor config edit as the shorthand for opening that file. LM Studio users get a concrete block to copy instead: provider OpenAICompat, base_url http://localhost:1234/v1, api_key lm-studio, and a model name. Upgrades are the same shape as the install.

bash
pipx upgrade shelloracle

Where ShellOracle is the wrong tool

The obvious failure mode is a plausible command that is subtly wrong. ShellOracle inserts text into a live shell buffer, and a model that misreads intent can produce a destructive command with the right shape. Because the tool only substitutes, the README does not describe any confirmation gate, dry-run mode or command validation layer, and it does not document rollback. Treat the inserted text as a draft from a stranger, not as a reviewed patch.

The second constraint is environmental. The README states support for BASH, ZSH and fish on macOS and Linux only. Windows is not listed, and the widget mechanism depends on shell integration that the README does not claim to provide there. If your team is mixed-platform, the widget half of the tool is unavailable to part of it, though the pipe form may still work where Python and a provider are reachable.

The third is dependency weight. pyproject.toml pins a real stack: click, httpx, openai, prompt-toolkit, tomlkit, google-genai, pygments, rich and yaspin, plus tomli on Python below 3.11. The project requires Python 3.10 or newer. If you want a single static binary with no runtime, this is not that. And if your requirement is deterministic output for the same input, a language model is the wrong component regardless of how the client is written.

ShellOracle compared with a shell alias or a snippet manager

The honest alternative for many people is not another AI CLI. It is a shell alias, a function, or a snippet manager like the ones built into modern shells. Those tools are deterministic, instant, and free of network calls. A function that wraps find with your preferred flags will always produce the same command, and it costs nothing to run.

The difference in approach is where the knowledge lives. With an alias or a snippet, you encode the answer once, and you must know in advance which questions you will ask. ShellOracle inverts that: you supply the description at the moment of need, and the model supplies the syntax. That is strictly more flexible and strictly less predictable. The alias cannot hallucinate a flag; it also cannot help you with a command you never thought to save.

A chat interface is the other alternative, and the practical difference is the round trip. With a browser or a separate chat client you copy the result back into the terminal by hand. ShellOracle's widget removes that copy step by writing into the prompt buffer directly, which is a small convenience with a real consequence: the text arrives where a stray newline would execute it. The pipe form, echo "..." | shor, gives you the flexibility without the insertion, at the cost of doing the paste yourself.

Maintenance, licence and the cost of keeping it running

The repository is not archived, and the last push was on 2026-09-13. Releases v1.12.0 and v1.11.0 are dated 2026-09-13, with v1.10.0 before them on 2026-03-08. That gap between March and September is worth noting if you plan to depend on the project: development is not continuous, and a six-month quiet period has already happened once.

Upgrade cost is low by design. pipx upgrade shelloracle replaces the isolated environment, and configuration lives outside the package in ~/.shelloracle/config.toml, so an upgrade does not overwrite your provider settings. The README does not document a config schema version or a migration step, which means a future change to the config format would be discovered by reading the file after an upgrade rather than by a migration command.

The licence is GPL-3.0, stated in the README and reflected in pyproject.toml as GNU General Public License v3 (GPLv3). For individual terminal use that is unremarkable. If you intend to bundle ShellOracle into a distributed product, the copyleft terms apply to that distribution and you should read the LICENSE file in the repository rather than rely on this summary. Nothing here is legal advice.

The dependency surface is the ongoing cost. The pins are compatible-release ranges, so patch and minor updates arrive on their own schedule, and the openai, google-genai and httpx packages all move. There is no lockstep guarantee between ShellOracle releases and those upstreams.

Editorial conclusion

Adopt ShellOracle if you already run a local model or hold an API key and want command generation inside your existing prompt rather than in a separate chat window. Skip it if you need a deterministic, offline, dependency-free helper, or if you cannot accept that a language model writes text straight into your shell buffer. Before trusting it, verify two things: that your provider is reachable at the base_url in ~/.shelloracle/config.toml, and that the generated command is one you would have typed yourself. The widget only inserts text; the Enter key is still yours.

Frequently asked questions

Which shells and operating systems does ShellOracle support?

The README states support for BASH, ZSH and fish on macOS and Linux. Windows is not listed, and the CTRL+F widget depends on shell integration the README does not claim to provide there.

Does ShellOracle run the command it generates?

No. The README describes it as substituting a generated command into your terminal buffer, so the text appears at the prompt and you still press Enter to execute it.

How do I change the model or provider in ShellOracle?

Edit ~/.shelloracle/config.toml, or run shor config edit as a shorthand for opening that file. The README shows setting provider under [shelloracle] and provider-specific keys such as base_url, api_key and model.

Can ShellOracle work with a local model instead of a cloud API?

Yes. The README lists Ollama, llmman and LocalAI as supported, and shows an OpenAICompat configuration for LM Studio pointing at http://localhost:1234/v1. For Ollama you must pull the chosen model first.

Why does running shor not insert the command into my prompt?

The README states that running ShellOracle as a Python module with python3 -m shelloracle, or through the shor entrypoint, does not automatically insert the result into your shell prompt. Insertion comes from the CTRL+F widget.

What licence is ShellOracle released under?

GPL-3.0, per the README and the classifier in pyproject.toml. The repository includes a LICENSE file, which is the authoritative text for your use case.

Official sources

  1. djcopley/ShellOracle on GitHub
  2. Issues
  3. License: GPL-3.0
  4. README
  5. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/djcopley-shelloracle.svg)](https://hysenlabs.com/projects/djcopley-shelloracle)