GNU General Public License v3.0

项目介绍

djcopley/ShellOracle 是一个托管在 GitHub 上的开源项目,主要使用 Python 编写,采用 GNU General Public License v3.0 许可证,目前获得 354 个 Star、26 次 Fork。

仓库全名
djcopley/ShellOracle
开源许可证
GNU General Public License v3.0
Star 数
354
Fork 数
26

README 摘要

ShellOracle 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, llmman, OpenAI, Deepseek, LocalAI, and Grok! Show your support for ShellOracle and keep an eye out for exciting new developments by clicking the ⭐ and a 👀! Table of Contents Features Installation…

完整内容见 GitHub 原始 README 或本页 。

常见问题

ShellOracle 用什么语言开发?

主要使用 Python 编写,采用 GNU General Public License v3.0 许可证,目前有 354 个 Star。

ShellOracle 可以免费商用吗?

仓库标注的许可证为 GNU General Public License v3.0,商用前请先阅读仓库 LICENSE 文件确认授权范围。

如何获取 ShellOracle 的源码?

可以直接克隆仓库:git clone https://github.com/djcopley/ShellOracle.git,默认分支为 main;安装与运行步骤见仓库 README。

ShellOracle 最近还在维护吗?

仓库最近一次更新为 9月13日,当前没有未关闭的 Issue;Star 数为 354,可作为社区活跃度的参考。

关于

GitHub 原始描述(英文)

A terminal utility for intelligent shell command generation

描述取自 GitHub 官方 API,保持仓库作者书写的原文。

简要分析

热度分
408
价值分
220
活跃状态
活跃

语言占比

PowerShell
Python
Shell

Release

README

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, llmman, 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 gemma4:12b, run:

ollama pull gemma4:12b

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

llmman

llmman serves the Ollama API on port 17434. Start it and pull the model you chose in the configure step. For example, if you chose gemma4, run:

llmman serve
llmman pull gemma4

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.

评论

暂无评论