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:
Captures the current screen state. Useaishell-get-screen [--print] [--lines N] [--output FILE]
--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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | a757c5c7325e2124d633beb4eaa0189f2d8774c84aa61298b197dbb49a31e1ed |
|
MD5 | 9d3c0287f27eb4cfe74419ff07334e8c |
|
BLAKE2b-256 | 3bf6d56ca51a9b7d1e69c684d8d35962542097a96ed18be43742946457ee4190 |
File details
Details for the file aishell_tools-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: aishell_tools-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | acb0c766f49136e5636475f4579eaf37397c15fb5e9bd8fa967e92f3a3e19ee6 |
|
MD5 | cec901547f14b669031dcf926d44e8cd |
|
BLAKE2b-256 | d73cf8644129bc5cebfe43fca7b021e6f2057f046aec98ff4c93ddcf81101dfe |