Skip to main content

ShellOracle is a pluggable terminal utility that takes a natural language description of a command and substitutes it into your terminal buffer.

Project description

ShellOracle logo

ShellOracle

uv Hatch project Tests PyPI version PyPI Supported Python Versions Downloads

ShellOracle is an innovative terminal utility designed for intelligent shell command generation, bringing a new level of efficiency to your command-line interactions. ShellOracle currently supports Ollama, OpenAI, Deepseek, LocalAI, and Grok!

ShellOracle

Show your support for ShellOracle and keep an eye out for exciting new developments by clicking the ⭐ and a 👀!

Table of Contents

Features

Key features of ShellOracle include:

  • Seamless shell command generation from written descriptions
  • Command history for easy reference
  • Unix pipe support for advanced command chaining
  • Self-hosted for full control over your environment
  • Highly configurable to adapt to your preferences

Installation

Installing ShellOracle is easy!

  1. pipx install the shelloracle package
    pipx install shelloracle
    
  2. Configure ShellOracle and follow the prompts
    shor config init
    
  3. Refer to the providers section for specific details regarding your chosen provider.

Upgrading to the latest version of ShellOracle is just as simple!

  1. pipx upgrade the shelloracle package
    pipx upgrade shelloracle
    

Installation with pip is supported, however, pipx is preferred for its automatic environment isolation.

Usage

ShellOracle is designed to be used as a BASH/ZSH/fish widget activated by the CTRL+F keyboard shortcut.

  1. Press CTRL+F
  2. Describe your command
  3. Press Enter

The generated command will be inserted into your shell prompt after a brief processing period.

Other ways to run ShellOracle

ShellOracle can be run as a Python module with python3 -m shelloracle or using its entrypoint shor, however, running ShellOracle with this method will not automatically insert the result into your shell prompt.

Tips

  1. If you press CTRL+F with text in your ZLE buffer, all text left of your cursor will carry over to your ShellOracle prompt.
  2. ⬆️ arrow and ⬇️ arrow cycle through your prompt history.
  3. ShellOracle can be chained with other commands; try: echo "find all the python files in my cwd" | shor

Providers

Ollama

Before using ShellOracle with Ollama, pull the model you chose in the configure step. For example, if you chose qwen2.5-coder, run:

ollama pull qwen2.5-coder

Refer to the Ollama docs for installation, available models, and usage.

OpenAI

To use ShellOracle with OpenAI's models, create an API key. Edit your ~/.shelloracle/config.toml to change your provider and enter your API key. You can use shor config edit as a shorthand to edit this file.

Deepseek

To use ShellOracle with Deepseek's models, create an API key. Edit your ~/.shelloracle/config.toml to change your provider and enter your API key. You can use shor config edit as a shorthand to edit this file.

LocalAI

Refer to the LocalAI docs for installation, available models, and usage.

LM Studio

To use ShellOracle with LM Studio, you will first need to run a model and start the server. For macOS users, it's recommended to utillize a model that is using the MLX runtime.

Here is an example configuration:

[shelloracle]
provider = "OpenAICompat"

[provider.OpenAICompat]
base_url = "http://localhost:1234/v1"
api_key = "lm-studio"
model = "mistralai/devstral-small-2507"

XAI

To use ShellOracle with XAI's models, create an API key. Edit your ~/.shelloracle/config.toml to change your provider and enter your API key. You can use shor config edit as a shorthand to edit this file.

Google

To use ShellOracle with Google's models, create an API key. Edit your ~/.shelloracle/config.toml to change your provider and enter your API key. You can use shor config edit as a shorthand to edit this file.

Configuration

ShellOracle's configuration is your gateway to tailoring the utility to match your preferences and requirements. The ~/.shelloracle/config.toml file serves as the control center for customizing various aspects of ShellOracle's behavior. You can quickly access and edit this file using the command shor config edit.

System Requirements

Software

ShellOracle supports BASH, ZSH and fish on macOS and Linux.

Hardware

For cloud providers like OpenAI, there are no hardware requirements.

If running locally, refer to your model for hardware requirements.

Feedback

Encountered problems? File an issue. Feature requests are welcome, and contributions can be made by opening a pull request.

License

This software is licensed under the GPLv3 license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

shelloracle-1.10.0.tar.gz (243.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

shelloracle-1.10.0-py3-none-any.whl (45.9 kB view details)

Uploaded Python 3

File details

Details for the file shelloracle-1.10.0.tar.gz.

File metadata

  • Download URL: shelloracle-1.10.0.tar.gz
  • Upload date:
  • Size: 243.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for shelloracle-1.10.0.tar.gz
Algorithm Hash digest
SHA256 6533f2688b5067834cc5c7d9cd758e4dfc153034e71084dca3870e9dd58eb548
MD5 badb20b9d3552c8fe4cd0a9a24df3bdf
BLAKE2b-256 a81bbf322f0614e4065085c453f734cd619384c125d29726f1649f4bb89918b0

See more details on using hashes here.

Provenance

The following attestation bundles were made for shelloracle-1.10.0.tar.gz:

Publisher: release.yml on djcopley/ShellOracle

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file shelloracle-1.10.0-py3-none-any.whl.

File metadata

  • Download URL: shelloracle-1.10.0-py3-none-any.whl
  • Upload date:
  • Size: 45.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for shelloracle-1.10.0-py3-none-any.whl
Algorithm Hash digest
SHA256 86afd31a2cf7be9e2d716ebcd948e0eca68431352ad79de7831eb6a0bd234fb3
MD5 bdb176d66fda8b81a833d6c4f5bffefa
BLAKE2b-256 4e96800f58bdda3717cd47570c789c58753e8da5ab22b7c1c0789a83a58af9d7

See more details on using hashes here.

Provenance

The following attestation bundles were made for shelloracle-1.10.0-py3-none-any.whl:

Publisher: release.yml on djcopley/ShellOracle

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page