A command-line tool for generating, storing, and displaying helpful tips on various topics using AI language models.
- AI-Powered Generation: Generate tips using OpenAI, Anthropic, or Google AI models
- Interactive Display: Browse tips in an interactive terminal interface
- Topic Filtering: Organize and filter tips by topic
- Local Storage: Tips are stored locally in JSON format
- Auto-refresh: Automatically cycle through tips at configurable intervals
- Mark as Known: Remove tips you've learned to focus on new content
- Go 1.19 or later
- API key for one of the supported LLM providers
git clone https://github.com/yourusername/tips
cd tips
go build -o tips
sudo mv tips /usr/local/bin/brew install tipsSet your API key as an environment variable:
# For OpenAI (default)
export OPENAI_API_KEY="your-openai-api-key"
# For Anthropic
export ANTHROPIC_API_KEY="your-anthropic-api-key"
# For Google AI
export GOOGLE_API_KEY="your-google-api-key"Optionally configure the model to use:
# Default: openai/gpt-4o
export TIPS_MODEL="anthropic/claude-3-sonnet-20240229"
export TIPS_MODEL="google/gemini-pro"Generate new tips for specific topics:
# Generate 20 programming tips (default count)
./tips generate -t programming
# Generate 10 cooking tips
./tips generate -t cooking -c 10
# Generate tips for multiple topics
./tips generate -t "go programming" -t "web development" -c 5Show tips with automatic refresh:
# Show random tips, refresh every 60 minutes (default)
./tips
# Show only programming tips
./tips -t programming
# Show tips and refresh every 30 minutes
./tips -r 30
# Show tips from multiple topics
./tips -t programming -t cookingRemove all stored tips from local storage:
# Delete all tips
./tips clearThis permanently deletes the ~/.tips.json file and all stored tips.
While viewing tips:
- Press
nto immediately show the next tip - Press
kto mark the current tip as "known" (removes it permanently) - Press
qto quit - Tips automatically refresh based on the interval you set
tips [OPTIONS] [COMMAND]
Commands:
show Display tips (default command)
generate Generate new tips for a topic
clear Delete all stored tips
Options:
-t, --topic Filter by topic (can specify multiple)
-r, --refresh Refresh interval in minutes (default: 60)
-c, --count Number of tips to generate per API call (default: 20)
# Basic usage
./tips # Show random tip, refresh every 60 min
./tips -t programming # Show programming tips only
./tips -r 30 # Refresh every 30 minutes
./tips generate -t "cooking" # Generate 20 new cooking tips
./tips generate -t "go" -c 10 # Generate 10 new Go programming tips
./tips clear # Delete all stored tips
# Advanced usage
./tips -t programming -t cooking -r 15 # Show programming and cooking tips, refresh every 15 min
./tips generate -t "machine learning" -t "data science" -c 15 # Generate 15 tips for each topicTips are stored locally in ~/.tips.json with the following structure:
{
"tips": [
{
"id": "uuid-here",
"topic": "programming",
"content": "Use meaningful variable names to make your code self-documenting.",
"created_at": "2025-06-05T10:00:00Z"
}
]
}The tool supports multiple AI providers through the TIPS_MODEL environment variable:
OpenAI (default)
openai/gpt-4o(default)openai/gpt-4o-miniopenai/gpt-3.5-turbo
Anthropic
anthropic/claude-3-5-sonnet-20241022anthropic/claude-3-5-haiku-20241022anthropic/claude-3-opus-20240229
google/gemini-2.5-flashgoogle/gemini-1.5-pro
Make sure you have the appropriate API key set:
- OpenAI:
OPENAI_API_KEY - Anthropic:
ANTHROPIC_API_KEY - Google:
GOOGLE_API_KEY
The tool will automatically detect which provider you're using based on the TIPS_MODEL format and check for the corresponding API key.
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.