A powerful, colorful, and easy-to-use command-line assistant powered by Google Gemini API. Get instant help with commands, code snippets, and explanations directly in your terminal.
- π Zero Setup: Pull a Docker image and run - no Python installation required
- π¨ Beautiful Output: Rich Markdown formatting with syntax highlighting
- π Secure: API keys passed at runtime, never baked into images
- π³ Containerized: Consistent experience across all platforms
- β‘ Fast: Optimized for command-line workflows
- π§ͺ Well Tested: Comprehensive test suite with CI/CD integration
# Pull and run
docker run --rm -e GEMINI_API_KEY="$GEMINI_API_KEY" akashdocker303/gmnx:latest "explain Docker vs Kubernetes"
# Add persistent alias
echo 'alias ask="docker run --rm -e GEMINI_API_KEY=\"$GEMINI_API_KEY\" akashdocker303/gmnx:latest"' >> ~/.zshrc
source ~/.zshrc
# Use it
ask "how to find all files larger than 100MB"
# Clone and setup
git clone https://github.com/int-arsh/gmnx.git
cd gmnx
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
# Run
export GEMINI_API_KEY="your-api-key"
python ask.py "hello world"
Terminal recording showing gmnx in action
- Docker (for containerized usage) or Python 3.12+ (for local development)
- Google Gemini API Key - Get one from Google AI Studio
gmnx/
βββ ask.py # Main CLI application
βββ Dockerfile # Container definition
βββ requirements.txt # Python dependencies
βββ tests/ # Test suite
β βββ test_ask.py # Unit tests
β βββ test_docker.py # Integration tests
βββ .github/workflows/ # CI/CD pipeline
βββ docs/ # Documentation
# Install dependencies
make install-deps
# Run all tests
make test
# Run with coverage
make test-coverage
# Quick unit tests only
make test-unit
# Build locally
make build
# Run tests
make test-docker
This project uses GitHub Actions for automated testing and deployment:
- On every push to
main
: Runs tests and builds Docker image - On git tags: Creates versioned releases
- Automated Docker Hub publishing: Images pushed automatically
- Test - Unit tests and Docker integration tests
- Build - Multi-arch Docker image creation
- Push - Automatic publishing to Docker Hub
- Consistency: Same environment everywhere
- Isolation: No conflicts with local Python setup
- Distribution: Easy sharing and deployment
- Security: API keys at runtime, not in images
akashdocker303/gmnx:latest
- Latest stable versionakashdocker303/gmnx:v1.0.0
- Pinned version releases
# Mount current directory for file operations
docker run --rm -e GEMINI_API_KEY="$GEMINI_API_KEY" \
-v "$PWD":/work -w /work \
akashdocker303/gmnx:latest "analyze this code"
# Use specific version
docker run --rm -e GEMINI_API_KEY="$GEMINI_API_KEY" \
akashdocker303/gmnx:v1.0.0 "help me debug this"
- Unit Tests: CLI logic, error handling, API mocking
- Integration Tests: Docker container functionality
- CI/CD Tests: Automated testing on every commit
# All tests
make test
# Unit tests only
make test-unit
# Docker tests only
make test-docker
# Coverage report
make test-coverage
ask "how to list all running Docker containers"
ask "explain the difference between soft and hard links"
ask "write a Python function to reverse a string"
ask "debug this error: ModuleNotFoundError"
ask "show me a React component with hooks"
ask "how to implement binary search in Python"
ask "explain Docker networking concepts"
ask "how to monitor disk usage on Linux"
ask "set up a reverse proxy with nginx"
ask "troubleshoot slow database queries"
GEMINI_API_KEY
- Required. Your Google Gemini API key
Add to your ~/.zshrc
or ~/.bashrc
:
# Docker version (recommended)
alias ask='docker run --rm -e GEMINI_API_KEY="$GEMINI_API_KEY" akashdocker303/gmnx:latest'
# Local version
alias ask='python3 /path/to/gmnx/ask.py'
We welcome contributions! Please see CONTRIBUTING.md for details.
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
Security vulnerabilities should be reported privately. See SECURITY.md for details.
Made with β€οΈ for the DevOps community