Skip to content

rafaelfagundes/ask

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ask 🤖 - Terminal AI Assistant

Go Version GitHub Release Build and Release License: MIT

A context-aware terminal assistant that leverages Google's Gemini AI to help with command line tasks, scripting, and system administration.

Demo

Features ✨

  • 🗃️ Persistent command history with timestamp tracking
  • 📖 Automatic markdown rendering with glow
  • 💻 OS/shell context-aware responses
  • 🗑️ Safe history deletion (single items or all)

Installation ⚡

Quick Install (Linux/macOS)

curl -sSL https://raw.githubusercontent.com/rafaelfagundes/ask/main/install.sh | bash

Manual Installation

  1. Install required dependencies:
go install github.com/charmbracelet/glow@latest
  1. Build and install:
go install github.com/rafaelfagundes/ask/cmd/ask@latest

Usage 🚀

Basic Query

ask "How do I recursively find and delete .tmp files?"

Interactive Mode

ask
> Enter your question: How to monitor CPU usage?

History Management

ask history             # List all queries
ask history delete 3    # Delete item 3
ask history delete all  # Clear all history
ask last                # Show last response

Configuration ⚙️

  1. Get Gemini API Key from Google AI Studio
  2. Add to your shell profile:
export GEMINI_API_KEY="your-api-key-here"

Configuration files stored in:
${XDG_CONFIG_HOME:-$HOME/.config}/ask

Examples 💡

System Administration
ask "Quick checklist for securing a new Ubuntu server"

Scripting Help
ask "Create a bash script to backup directory with timestamp"

Troubleshooting
ask "Debug 'Permission Denied' error after chmod"

DevOps
ask "Explain Kubernetes pod lifecycle in simple terms"

Contributing 🤝

We welcome contributions! Please follow these steps:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License 📄

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments 🙏

  • Google Gemini API for AI capabilities
  • Charmbracelet Glow for markdown rendering
  • SQLite for lightweight history storage

About

Ask is a terminal AI assistant powered by Google's Gemini, offering context-aware help for CLI tasks, scripting, and system administration. Features persistent command history, markdown rendering, and OS/shell-aware responses. Built in Go with MIT licensing.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors