APIMon
Apimon v2.0.0 — a devtools command-line toolkit for checking, validating, generating, formatting, linting, explaining, converting, templating, diffing, previewing, fixing, and reporting on API-related tasks. All operations are timestamped and logged, with built-in search, statistics, and multi-format export.
Commands
| Command | Description |
|---|
| INLINECODE0 | Record a check entry (no args = show recent checks) |
| INLINECODE1 |
Record a validation entry (no args = show recent validations) |
|
apimon generate <input> | Record a generation entry (no args = show recent generations) |
|
apimon format <input> | Record a format entry (no args = show recent formats) |
|
apimon lint <input> | Record a lint entry (no args = show recent lints) |
|
apimon explain <input> | Record an explain entry (no args = show recent explains) |
|
apimon convert <input> | Record a conversion entry (no args = show recent conversions) |
|
apimon template <input> | Record a template entry (no args = show recent templates) |
|
apimon diff <input> | Record a diff entry (no args = show recent diffs) |
|
apimon preview <input> | Record a preview entry (no args = show recent previews) |
|
apimon fix <input> | Record a fix entry (no args = show recent fixes) |
|
apimon report <input> | Record a report entry (no args = show recent reports) |
|
apimon stats | Show summary statistics across all log files |
|
apimon export <fmt> | Export all data in json, csv, or txt format |
|
apimon search <term> | Search across all entries for a keyword |
|
apimon recent | Show the 20 most recent activity entries |
|
apimon status | Health check — version, data dir, entry count, disk usage |
|
apimon help | Show usage info and all available commands |
|
apimon version | Show version (v2.0.0) |
How It Works
Each command (check, validate, generate, format, etc.) works as a timestamped log recorder:
- - With arguments: saves the input to
~/.local/share/apimon/<command>.log with a timestamp, then confirms the entry count. - Without arguments: displays the 20 most recent entries from that command's log file.
All activity is also recorded in a central history.log for cross-command traceability.
Data Storage
- - Location: INLINECODE21
- Log files: One
.log file per command (e.g., check.log, validate.log, format.log) - History:
history.log — central activity log across all commands - Export:
export.json, export.csv, or export.txt generated on demand - Format: Each log line is INLINECODE30
Requirements
- - Bash (4.0+)
- Standard Unix utilities (
wc, du, grep, tail, head, date) - No external dependencies or API keys required
When to Use
- 1. API health monitoring — use
apimon check "GET /health returned 200 in 45ms" to log each endpoint check with response details - Schema validation tracking — run
apimon validate "OpenAPI spec v3.1 passed all rules" to record validation outcomes over time - Generating mock data records — use
apimon generate "Mock /users response with 50 entries" to log data generation tasks - Linting API definitions — run
apimon lint "spectral lint passed for orders.yaml" to track lint history - Uptime reporting — use
apimon report "Daily uptime: 99.97%" to log uptime metrics, then apimon export json to build dashboards
Examples
CODEBLOCK0
Output
Results go to stdout. Save with apimon export json > backup.json. All entries are persisted to the data directory for later retrieval and analysis.
Powered by BytesAgain | bytesagain.com | hello@bytesagain.com