Skip to main content

A shell wrapper for building context-aware tools

Project description

AIShell ✨

AIShell is a transparent shell wrapper that allows you to build context-aware tools for your shell environment.

Main Features

  • It functions as a transparent shell wrapper, allowing you to use it like any other shell. The key difference is that it captures screen content, including the stdout and stderr of any command, which can then be passed to AI as context.

  • aishell-help - AI-powered shell context analysis and assistance

  • aishell-quick-help - Chat with AI without leaving your terminal (without context)

Installation

git clone https://github.com/cccntu/aishell.git
cd aishell
pip install .

or

pip install git+https://github.com/cccntu/aishell.git

Usage

  • For the tools to work, you need to first start AIShell.

    aishell
    
  • Get AI help:

    aishell-help [--lines N] [--interactive]
    

    Analyzes the current shell context and provides AI-powered assistance. Use --interactive for a chat-like experience.

  • Get quick help (without context):

    aishell-quick-help [<question>]
    

    Quickly get an answer to a shell-related question without leaving your terminal.

Additional commands

  • Get screen state:
    aishell-get-screen [--print] [--lines N] [--output FILE]
    
    Captures the current screen state. Use --print to display on stdout, --lines to limit output, and --output to specify a file.

Supported shells

  • Currently tested on zsh, bash, and fish.

Configuration

  • AIShell currently only supports OpenAI API. Make sure to set your OpenAI API key (OPENAI_API_KEY) as an environment variable.
  • Prompt is defined in src/aishell/aishell_help.py

TODO

  • Function Calling
  • Configuration (model, prompt, etc)
  • Support more API (contributions are welcome)
  • Support more shells (contributions are welcome)
  • Contribution and feedback are welcome!

Contributing

Please open an issue before submitting a PR.

License

MIT

Acknowledgements

This project is inspired by the following projects:

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

aishell_tools-0.1.0.tar.gz (210.2 kB view details)

Uploaded Source

Built Distribution

aishell_tools-0.1.0-py3-none-any.whl (10.4 kB view details)

Uploaded Python 3

File details

Details for the file aishell_tools-0.1.0.tar.gz.

File metadata

  • Download URL: aishell_tools-0.1.0.tar.gz
  • Upload date:
  • Size: 210.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for aishell_tools-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a757c5c7325e2124d633beb4eaa0189f2d8774c84aa61298b197dbb49a31e1ed
MD5 9d3c0287f27eb4cfe74419ff07334e8c
BLAKE2b-256 3bf6d56ca51a9b7d1e69c684d8d35962542097a96ed18be43742946457ee4190

See more details on using hashes here.

File details

Details for the file aishell_tools-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for aishell_tools-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 acb0c766f49136e5636475f4579eaf37397c15fb5e9bd8fa967e92f3a3e19ee6
MD5 cec901547f14b669031dcf926d44e8cd
BLAKE2b-256 d73cf8644129bc5cebfe43fca7b021e6f2057f046aec98ff4c93ddcf81101dfe

See more details on using hashes here.

Supported by

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