Hisho is a command-line interface (CLI) tool inspired by Aider
, designed to interact with AI models from OpenRouter.ai
. Built with Crystal, Hisho aims to provide a seamless and efficient way to communicate with various AI models directly from your terminal.
- Connect to OpenRouter.ai models with ease
- Simple setup requiring only a model name and OpenRouter.ai API key
- Interactive command-line interface for natural conversations with AI
- Written in Crystal for performance and type safety
- Extensible architecture allowing for easy addition of new features
- New: Improved structure for better maintainability
-
Install Crystal:
For macOS using Homebrew:
brew install crystal
For Ubuntu:
curl -fsSL https://crystal-lang.org/install.sh | sudo bash
For other operating systems, please refer to the official Crystal installation guide.
-
Clone the repository:
git clone https://github.com/denislour/hisho.git cd hisho
-
Install dependencies:
shards install
Create a .env
file in the project root with your OpenRouter.ai
API key and preferred model:
OPENROUTER_API_KEY=<your-openrouter-api-key>
MODEL=<your-preferred-model>
crystal build src/main.cr -o hisho
./hisho
Hisho has been restructured to improve maintainability and extensibility. The new structure makes it easier to add new features and modify existing ones.
We're constantly working to improve Hisho. Here's our current TODO list:
- Add a File Manager to handle file operations and introduce File classes for storing related data
- Update Conversation to use an array of File objects instead of strings for added files
- Add return types to functions where they're missing
- Organize command files into a dedicated directory
- Expand unit tests in spec for all core functions
- Store prompts as constants
- Prevent CLI termination with Ctrl+C
- Implement an automatic way to handle /help instead of hardcoding content
- Implement a robust error handling and reporting mechanism
- Centralize and manage hardcoded strings
- Fork it (https://github.com/denislour/hisho/fork)
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
- Lektor - creator and maintainer
Hisho is built with love and care, aiming to provide a great user experience while maintaining clean and efficient code.