Overview
Ramadan CLI is built for both humans and agents. It can be installed as a skill package for coding agents and AI tools, providing programmatic access to Ramadan prayer times with multiple output formats.Installation
Installing as a Skill
Add ramadan-cli to your agent’s skill registry:Manual Installation
For direct integration:Agent-Friendly Features
JSON Output
Structured JSON format for parsing and processing
Status Line Mode
Single-line output perfect for status bars
Non-Interactive Config
Programmatic configuration without prompts
Isolated State
Environment variable for isolated config storage
Isolated Configuration
Always isolate config in automation to avoid polluting user or global state.
RAMADAN_CLI_CONFIG_DIR environment variable to specify an isolated config directory:
Reset Isolated State
Non-Interactive Configuration
Configure the CLI programmatically without interactive prompts:1
Set Location and Settings
Use the
config command with flags to set all required parameters:2
Verify Configuration
Check the saved configuration:
3
Use the Configuration
All subsequent commands will use the saved settings:
Config Management
Agent Usage Patterns
Query Without Saved Config
Agents can query specific cities without saving configuration:One-off city queries do not overwrite saved default location.
Handling Interactive Prompts
The CLI behavior depends on the output mode:- JSON Mode
- Status Mode
- Standard Mode
Automatically skips interactive setup:Falls back to IP geolocation if no config exists.
Exit Codes and Error Handling
The CLI uses standard exit codes for automation:Error Handling in Scripts
JSON Error Format
When using--json, errors are written to stderr as structured JSON:
Error Codes Reference
Error Codes Reference
Example: Agent Integration
Here’s a complete example of integrating ramadan-cli into an agent workflow:Testing Agent Integration
1
Test Basic Invocation
2
Test JSON Output
3
Test Error Handling
4
Test Isolated Config
Best Practices
Use Isolated Config Directories
Use Isolated Config Directories
Always set
RAMADAN_CLI_CONFIG_DIR to avoid interfering with user configuration:Prefer JSON Output
Prefer JSON Output
Use
--json for reliable parsing and to skip interactive prompts:Handle Errors Gracefully
Handle Errors Gracefully
Check exit codes and parse error JSON:
Use Status Mode for Display
Use Status Mode for Display
For status bars and simple displays, use
--status:See Also
JSON Output
Learn about the JSON output structure
Status Line Mode
Integrate with status bars and displays