ReTermAI is a smart command assistant that enhances terminal productivity by recommending relevant commands based on your shell history. Built on advanced AI algorithms, it supports popular shells like zsh and bash, providing intelligent suggestions tailored to user input.
reTermAI serves as an intelligent command recommender that enhances terminal usage by leveraging AI and utilizing personal shell history. Built to optimize productivity, it suggests relevant terminal commands tailored to user preferences and past activities.
zsh and bash shell histories, making it versatile for different environments..env file for secure and streamlined usage.To gain AI-powered command suggestions, simply use:
reterm suggest
Users can customize suggestions with options such as:
--history-limit or -hl: Specify how many recent commands to analyze (default: 300).--context-limit or -cl: Define the number of commands to process for context (default: 20).--provider or -p: Choose between using the openai or gemini model for command suggestions.For example:
reterm suggest -p gemini
reterm suggest --history-limit 500 --context-limit 30
To find past commands related to specific keywords, the following command can be executed:
reterm match [keyword]
This feature allows users to locate any previously executed commands, enhancing efficiency with options to limit the results displayed.
Setting up reTermAI requires the addition of a .env file that contains API keys, tailored for the chosen model:
OPENAI_API_KEY=sk-xxxxxxxxxxxxxxxxxxxxx
GOOGLE_API_KEY=your-gemini-api-key
The project is organized to facilitate easy navigation and contributions:
reterm/
├── cli.py # Main CLI interface
├── llm.py # LLM integration (OpenAI, Gemini)
├── shell.py # Shell history detection and parsing
├── config.py # API key loader
├── welcome.py # ASCII and help panel
Contributions are encouraged. Interested developers can fork the repository, create feature branches, and submit pull requests for review.
No comments yet.
Sign in to be the first to comment.