Your terminal deserves more than just errors and logs — a fresh code quote for every session.
A CLI tool that displays inspiring programming quotes with beautiful terminal formatting.
- Random Quotes: Get a random programming quote every time
- Daily Quotes: Same quote for the same day (date-based seeding)
- Tag Filtering: Filter quotes by tags like
programming,clean-code,humor - Language Filtering: Filter by language (e.g.,
en,zh) - Beautiful Output: ANSI colored output with bright purple formatting
- Markdown Support: Output in Markdown blockquote format
- Custom Files: Load additional quotes from JSON/YAML files
- Flexible: Support for multiple file formats and configurations
git clone https://github.com/rosikui/code-quote.git
cd code-quote
go build -o code-quote .Download the latest release from GitHub Releases.
Add code-quote to your terminal startup for daily inspiration:
Add to your ~/.bashrc or ~/.zshrc:
# Add code-quote to your PATH (if not already installed globally)
export PATH="$HOME/path/to/code-quote:$PATH"
# Display a quote on terminal startup
code-quote --dailyAdd to your PowerShell profile ($PROFILE):
# Add code-quote to your PATH (if not already installed globally)
$env:PATH += ";C:\path\to\code-quote"
# Display a quote on terminal startup
code-quote --dailyAdd to your ~/.config/fish/config.fish:
# Add code-quote to your PATH (if not already installed globally)
set -gx PATH $HOME/path/to/code-quote $PATH
# Display a quote on terminal startup
code-quote --dailyAdd to your VS Code settings (settings.json):
{
"terminal.integrated.shellArgs.linux": ["-c", "code-quote --daily; exec bash"],
"terminal.integrated.shellArgs.osx": ["-c", "code-quote --daily; exec zsh"],
"terminal.integrated.shellArgs.windows": ["-c", "code-quote --daily; cmd"]
}- Go to Preferences → Profiles → General
- In Send text at start, add:
code-quote --daily
Add to your Windows Terminal settings (settings.json):
{
"profiles": {
"list": [
{
"name": "PowerShell",
"commandline": "powershell.exe",
"startingDirectory": "%USERPROFILE%",
"launchActions": [
{
"command": "code-quote --daily"
}
]
}
]
}
}# Build and run
make run
# Or build and run manually
go build -o code-quote .
./code-quote
# Set up auto-start (add to your shell profile)
echo 'code-quote --daily' >> ~/.zshrc # or ~/.bashrc# Display a random quote
./code-quote
# Display daily quote (same quote for the same day)
./code-quote --daily
# Show tags with the quote
./code-quote --show-tags
# Output in Markdown format
./code-quote --markdown
# Disable colors
./code-quote --no-color# Filter by tags
./code-quote --tag programming,clean-code
# Filter by language
./code-quote --lang en
# Combine filters
./code-quote --tag programming --lang en --daily# Load additional quotes from a single file
./code-quote --file my-quotes.json
# Load from multiple files
./code-quote --file quotes1.json,quotes2.yaml
# Combine with built-in quotes
./code-quote --file custom.json --tag motivation[
{
"text": "The best error message is the one that never shows up.",
"author": "Thomas Fuchs",
"tags": ["error-handling", "ux", "programming"],
"lang": "en"
}
]- text: "Any fool can write code that a computer can understand. Good programmers write code that humans can understand."
author: "Martin Fowler"
tags: ["clean-code", "readability", "programming"]
lang: "en"text: The quote content (required)author: The quote author (required)tags: Array of tags (optional)lang: Language code (optional)
| Flag | Description |
|---|---|
--file |
Additional quotes file(s) (JSON/YAML, comma-separated) |
--tag |
Filter by tags (comma-separated) |
--lang |
Filter by language |
--daily |
Daily quote (same quote for the same day) |
--no-color |
Disable ANSI colors |
--markdown |
Output in Markdown format |
--show-tags |
Show tags after author |
# Get a random programming quote with tags
./code-quote --tag programming --show-tags
# Get today's quote in Markdown format
./code-quote --daily --markdown
# Load custom quotes and filter by clean-code tag
./code-quote --file my-quotes.json --tag clean-code
# Get a quote without colors for scripting
./code-quote --no-color --tag motivationcode-quote/
├── main.go # Main entry point with embed
├── cmd/
│ └── code-quote/
│ └── main.go # CLI logic with Cobra
├── internal/
│ ├── quote/
│ │ ├── loader.go # JSON/YAML file loading
│ │ └── picker.go # Quote selection and filtering
│ └── term/
│ └── render.go # Terminal output formatting
├── quotes/
│ └── quotes.en.json # Built-in quotes
└── README.md
- Go 1.24+
go build -o code-quote .go test ./...- Code: MIT License
- Quotes: CC-BY-4.0 (see
quotes/LICENSE)
We welcome contributions! Please see our Contributing Guide for detailed information.
For questions and discussions, please use Issue.
The tool comes with a curated collection of programming quotes covering topics like:
- Clean code principles
- Problem solving
- Learning and practice
- Debugging
- Innovation
- And more!
Feel free to contribute new quotes by submitting a pull request or by using the --file flag with your own quote files.