A Ruby-based CLI tool that bridges Google Cloud Vertex AI (Gemini) and Slack. It provides an interactive terminal interface for chatting with Gemini, while automatically mirroring the conversation to Slack.
- Interactive CLI: Real-time chat with Gemini via terminal.
- Slack Integration: Every question starts a new Slack thread, and the response is posted as a reply within that thread.
- Environment Driven: Easily configured via
.envfile. - Tested & Covered: Includes a comprehensive test suite with >80% code coverage.
- Ruby 3.0 or higher.
- A Google Cloud Project with Vertex AI API enabled.
- A Slack Bot Token with
chat:write:bot(orchat:write) permissions.
-
Clone the repository:
git clone https://github.com/yourusername/gemini-slack.git cd gemini-slack -
Install dependencies:
bundle install
-
Setup environment variables:
cp .env.example .env
Edit
.envand fill in your credentials.
Start the interactive CLI:
./bin/gemini-slackType your prompt and press Enter. The conversation will be mirrored to your specified Slack channel in a threaded format. Type exit or quit to end the session.
We use Minitest and Mocha for testing. To run the test suite:
bundle exec rakeCode coverage reports are generated automatically in the coverage/ directory after running tests.
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Please do not commit your .env file or any credentials to the repository. This project includes a .gitignore to prevent accidental commits of sensitive data.
This project is licensed under the MIT License - see the LICENSE file for details.