Islamic prayer times statusline plugin for Claude Code.
- Displays next prayer time in Claude Code statusline
- Supports 15 calculation methods (ISNA, MWL, Umm Al-Qura, etc.)
- Shows countdown to next prayer (e.g., "in 1h 23m")
- Highlights imminent prayers (within 15 minutes) with green color
- After Isha, shows time until tomorrow's Fajr
- Zero runtime dependencies (uses native Node.js fetch)
- In-memory caching to minimize API calls
- Node.js 18+ or Bun
- Claude Code (for plugin integration)
Inside a Claude Code instance, run the following commands:
Step 1: Add the marketplace
/plugin marketplace add utkudarilmaz/claude-pray
Step 2: Install the plugin
⚠️ Linux users: Click here first
On Linux, /tmp is often a separate filesystem (tmpfs), which causes plugin installation to fail with:
EXDEV: cross-device link not permitted
Fix: Set TMPDIR before installing:
mkdir -p ~/.cache/tmp && TMPDIR=~/.cache/tmp claudeThen run the install command below in that session. This is a Claude Code platform limitation.
/plugin install claude-pray
Step 3: Configure the statusline
/claude-pray:setup
This will:
- Ask for your city and country
- Let you select a calculation method
- Detect conflicts with other statusline plugins (like claude-hud)
- Configure the statusline
If you have claude-hud installed, you can choose to:
- Chain both plugins together in the statusline
- Replace claude-hud with claude-pray
- Keep claude-hud and only save prayer configuration
Done! The claude-pray appears immediately — no restart needed.
If you prefer manual setup, create two configuration files:
1. Plugin configuration in ~/.claude/claude-pray.json:
{
"city": "Dubai",
"country": "UAE",
"method": 4,
"enabled": true
}Configuration Fields:
city: Your city name (e.g., "Dubai", "New York", "London")country: Your country code or name (e.g., "UAE", "USA", "UK")method: Calculation method ID (see table below)enabled: Set totrueto activate the plugin
2. Statusline configuration in ~/.claude/settings.json:
{
"statusLine": {
"type": "command",
"command": "bash -c '\"node\" \"$(ls -td ~/.claude/plugins/cache/claude-pray/claude-pray/*/ 2>/dev/null | head -1)dist/index.js\"'"
}
}Replace node with bun in the command if you prefer using Bun runtime.
| ID | Method | Recommended For |
|---|---|---|
| 0 | Shia Ithna-Ashari | Shia communities |
| 1 | University of Islamic Sciences, Karachi | Pakistan, Bangladesh, India |
| 2 | Islamic Society of North America (ISNA) | North America (default) |
| 3 | Muslim World League | Europe, Far East |
| 4 | Umm Al-Qura University, Makkah | Saudi Arabia |
| 5 | Egyptian General Authority of Survey | Africa, Syria, Lebanon |
| 7 | Institute of Geophysics, University of Tehran | Iran |
| 8 | Gulf Region | UAE, Kuwait, Qatar |
| 9 | Kuwait | Kuwait |
| 10 | Qatar | Qatar |
| 11 | Majlis Ugama Islam Singapura | Singapore |
| 12 | Union Organization Islamic de France | France |
| 13 | Diyanet İşleri Başkanlığı | Turkey |
| 14 | Spiritual Administration of Muslims of Russia | Russia |
The default method is ISNA (ID: 2) if not configured.
The statusline shows:
☪ Asr in 1h 23m- Next prayer with countdown (dim color)☪ Maghrib in 12m- Imminent prayer (green color, within 15 minutes)☪ Run /claude-pray:setup- When not configured
This plugin uses the Aladhan Prayer Times API.
Privacy: Prayer times are fetched based on your city and country. No personal data is transmitted.
# Install dependencies
npm install
# Build TypeScript to JavaScript
npm run build
# Run tests (builds first, then runs Node.js test runner)
npm test
# Watch mode for development
npm run devNote: The dist/ directory is committed to the repository to enable direct plugin installation without requiring users to build from source.
src/
├── index.ts # Entry point
├── stdin.ts # Parse Claude Code JSON input
├── config.ts # Read ~/.claude/claude-pray.json
├── prayer-times.ts # Fetch and calculate prayer times
├── types.ts # TypeScript interfaces
└── render/
├── index.ts # Main render coordinator
├── prayer-line.ts # Prayer display formatting
└── colors.ts # ANSI color helpers
Run the plugin directly to test output:
npm run build
echo '{}' | node dist/index.jsExpected output: ☪ Asr in 1h 23m (or setup prompt if not configured)
Prayer times not showing?
- Verify plugin configuration exists:
cat ~/.claude/claude-pray.json - Check that
enabledistruein the config file - Verify statusline configuration in
~/.claude/settings.json - Test the API manually:
curl -sL "https://api.aladhan.com/v1/timingsByCity?city=YourCity&country=YourCountry&method=2" - Restart Claude Code to reload the statusline
Build errors?
- Ensure Node.js 18+ is installed:
node --version - Reinstall dependencies:
rm -rf node_modules && npm install - Clean build:
rm -rf dist && npm run build
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Add tests for new functionality
- Submit a pull request
MIT
