Skip to main content

Shell copilot - sh shell AI copilot

Project description

Shy.sh

Sh shell AI copilot

image_cover

Install

pip install shy-sh

Configure your LLM

shy --configure

Supported providers: openai, anthropic, google, groq, aws, ollama

Help

Usage: shy [OPTIONS] [PROMPT]...

Arguments prompt [PROMPT]

Options

  • -x Do not ask confirmation before executing scripts
  • -e Explain the given shell command
  • --configure Configure LLM
  • --help Show this message and exit.

Settings

shy --configure
 Provider: ollama
 Model: llama3.2
 Agent Pattern: react
 Temperature: 0.0
 Language: klingon
 Sandbox Mode: Yes

Configurable settings

  • Provider: The LLM provider to use [OpenAI, Anthropic, Google, Groq, AWS Bedrock, Ollama(local)].
  • API Key: The API key for the LLM provider. (Format for aws bedrock: region_name acces_key secret_key)
  • Model: The LLM model to use.
  • Agent Pattern: react or function_call. (If you are not using OpenAI, Anthropic or Google, react is recommended)
  • Temperature: The LLM model's temperature setting.
  • Language: The language for the LLM's final answers.
  • Sandbox Mode: When enabled, no commands or scripts will be executed on your system; you will only receive suggestions. This feature is recommended for beginners.

All the settings are saved in ~/.config/shy/config.yml

Examples

> shy find all python files in this folder

🛠️ find . -type f -name '*.py'

Do you want to execute this command? [Yes/no/copy/explain/alternatives]:

./src/chat_models.py
./src/agent/tools.py
./src/agent/__init__.py
./src/agent/agent.py
./src/settings.py
./src/main.py

🤖: Here are all the Python files found in the current folder and its subfolders.
> shy -x convert aaa.png to jpeg and resize to 200x200

🛠️ convert aaa.png -resize 200x200 aaa.jpg

🤖: I converted the file aaa.png to JPEG format and resized it to 200x200 pixels.
> shy resize movie.avi to 1024x768 and save it in mp4

🛠️ ffmpeg -i movie.avi -vf scale=1024:768 -c:v libx264 output.mp4

Do you want to execute this command? [Yes/no/copy/explain/alternatives]: c

🤖: Command copied to the clipboard!
> shy

✨: Hello, how are you?

🤖: Hello! I'm fine thanks

✨: how many files in this folder

🛠️ ls | wc -l

Do you want to execute this command? [Yes/no/copy/explain/alternatives]:

5

✨: exit

🤖: 👋 Bye!
> shy -e "find . -type f -name '*.py' | wc -l"

🤖: This shell command uses `find` to search for files (`-type f`) with the extension `.py` (`-name '*.py'`) in the current directory (`.`) and its subdirectories.
The results are then piped to `wc -l`, which counts the number of line.
In conclusion, the command presents the total count of Python files (*.py) located within the current directory and its subdirectories.

image_python

image_ascii

Chat commands

You can use these commands during the chat:

  • /chats to list all the chats
  • /clear to clear the current chat
  • /history to list the recent executed commands/scripts
  • /load [CHAT_ID] to continue a previous chat

Privacy

If you are not using Ollama as provider, please note that information such as the current path, your operating system name, and the last commands executed in the shell may be included in the LLM context.

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

shy_sh-1.1.9.tar.gz (21.2 kB view details)

Uploaded Source

Built Distribution

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

shy_sh-1.1.9-py3-none-any.whl (30.7 kB view details)

Uploaded Python 3

File details

Details for the file shy_sh-1.1.9.tar.gz.

File metadata

  • Download URL: shy_sh-1.1.9.tar.gz
  • Upload date:
  • Size: 21.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.11.11 Linux/6.8.0-1021-azure

File hashes

Hashes for shy_sh-1.1.9.tar.gz
Algorithm Hash digest
SHA256 2f2357aa0565b582cc687959eb0fd4ed9645418d3ea19c0ab5781e207d2de892
MD5 ccefe02eab88a0a1ceb47cfa5f08bdb2
BLAKE2b-256 9405292f2b8bcbc1d3fcdf70d5db013911efc2fef4c135afe2d62534e27674c7

See more details on using hashes here.

File details

Details for the file shy_sh-1.1.9-py3-none-any.whl.

File metadata

  • Download URL: shy_sh-1.1.9-py3-none-any.whl
  • Upload date:
  • Size: 30.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.11.11 Linux/6.8.0-1021-azure

File hashes

Hashes for shy_sh-1.1.9-py3-none-any.whl
Algorithm Hash digest
SHA256 c7a211cd3606ee7145653332c6982c5602965b8f132212f5f5fd0a039ff8e32f
MD5 4b87bc217c10768ee3f52c68a7ba98a5
BLAKE2b-256 d5c2ac07f13ba7c02804a1a082ac8e62c9cdd831649abb2e4e5625c2af2d78f6

See more details on using hashes here.

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