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 |
apimon check <input> |
Record a check entry (no args = show recent checks) |
apimon validate <input> |
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:
~/.local/share/apimon/
- 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
YYYY-MM-DD HH:MM|<input>
Requirements
- Bash (4.0+)
- Standard Unix utilities (
wc, du, grep, tail, head, date)
- No external dependencies or API keys required
When to Use
- 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
# Check an API endpoint
apimon check "GET [Technical Reference] — 200 OK, 32ms"
# Validate a response schema
apimon validate "POST /orders response matches OrderSchema v2"
# Generate mock data
apimon generate "10 sample user objects for /api/users"
# Format an API response
apimon format "pretty-print JSON response from /api/products"
# Lint an API spec
apimon lint "openapi-lint passed for petstore.yaml"
# Explain an HTTP status
apimon explain "502 Bad Gateway — upstream server not responding"
# Convert request format
apimon convert "curl command to Python requests"
# Create a request template
apimon template "GET with auth headers and pagination"
# Diff two API versions
apimon diff "v1 vs v2 breaking changes in /users endpoint"
# Preview a request
apimon preview "GET /api/search?q=test&limit=20"
# Record a fix
apimon fix "resolved timeout issue on /api/export endpoint"
# Generate a report entry
apimon report "Weekly API health summary: 99.9% uptime"
# View summary statistics
apimon stats
# Export all data as CSV
apimon export csv
# Search for keywords
apimon search "timeout"
# View recent activity
apimon recent
# Health check
apimon status
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
1---2name: apimon3description: Monitor API endpoints and track response times to catch outages. Use when checking uptime, validating schemas, or generating status reports.4---5
6# APIMon
7
8Apimon 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.
9
10## Commands
11
12| Command | Description |
13|---------|-------------|
14| `apimon check <input>` | Record a check entry (no args = show recent checks) |
15| `apimon validate <input>` | Record a validation entry (no args = show recent validations) |
16| `apimon generate <input>` | Record a generation entry (no args = show recent generations) |
17| `apimon format <input>` | Record a format entry (no args = show recent formats) |
18| `apimon lint <input>` | Record a lint entry (no args = show recent lints) |
19| `apimon explain <input>` | Record an explain entry (no args = show recent explains) |
20| `apimon convert <input>` | Record a conversion entry (no args = show recent conversions) |
21| `apimon template <input>` | Record a template entry (no args = show recent templates) |
22| `apimon diff <input>` | Record a diff entry (no args = show recent diffs) |
23| `apimon preview <input>` | Record a preview entry (no args = show recent previews) |
24| `apimon fix <input>` | Record a fix entry (no args = show recent fixes) |
25| `apimon report <input>` | Record a report entry (no args = show recent reports) |
26| `apimon stats` | Show summary statistics across all log files |
27| `apimon export <fmt>` | Export all data in json, csv, or txt format |
28| `apimon search <term>` | Search across all entries for a keyword |
29| `apimon recent` | Show the 20 most recent activity entries |
30| `apimon status` | Health check — version, data dir, entry count, disk usage |
31| `apimon help` | Show usage info and all available commands |
32| `apimon version` | Show version (v2.0.0) |
33
34## How It Works
35
36Each command (check, validate, generate, format, etc.) works as a timestamped log recorder:
37
38- **With arguments**: saves the input to `~/.local/share/apimon/<command>.log` with a timestamp, then confirms the entry count.
39- **Without arguments**: displays the 20 most recent entries from that command's log file.
40
41All activity is also recorded in a central `history.log` for cross-command traceability.
42
43## Data Storage
44
45- **Location**: `~/.local/share/apimon/`
46- **Log files**: One `.log` file per command (e.g., `check.log`, `validate.log`, `format.log`)
47- **History**: `history.log` — central activity log across all commands
48- **Export**: `export.json`, `export.csv`, or `export.txt` generated on demand
49- **Format**: Each log line is `YYYY-MM-DD HH:MM|<input>`
50
51## Requirements
52
53- Bash (4.0+)
54- Standard Unix utilities (`wc`, `du`, `grep`, `tail`, `head`, `date`)
55- No external dependencies or API keys required
56
57## When to Use
58
591. **API health monitoring** — use `apimon check "GET /health returned 200 in 45ms"` to log each endpoint check with response details
602. **Schema validation tracking** — run `apimon validate "OpenAPI spec v3.1 passed all rules"` to record validation outcomes over time
613. **Generating mock data records** — use `apimon generate "Mock /users response with 50 entries"` to log data generation tasks
624. **Linting API definitions** — run `apimon lint "spectral lint passed for orders.yaml"` to track lint history
635. **Uptime reporting** — use `apimon report "Daily uptime: 99.97%"` to log uptime metrics, then `apimon export json` to build dashboards
64
65## Examples
66
67```bash
68# Check an API endpoint
69apimon check "GET [Technical Reference] — 200 OK, 32ms"
70
71# Validate a response schema
72apimon validate "POST /orders response matches OrderSchema v2"
73
74# Generate mock data
75apimon generate "10 sample user objects for /api/users"
76
77# Format an API response
78apimon format "pretty-print JSON response from /api/products"
79
80# Lint an API spec
81apimon lint "openapi-lint passed for petstore.yaml"
82
83# Explain an HTTP status
84apimon explain "502 Bad Gateway — upstream server not responding"
85
86# Convert request format
87apimon convert "curl command to Python requests"
88
89# Create a request template
90apimon template "GET with auth headers and pagination"
91
92# Diff two API versions
93apimon diff "v1 vs v2 breaking changes in /users endpoint"
94
95# Preview a request
96apimon preview "GET /api/search?q=test&limit=20"
97
98# Record a fix
99apimon fix "resolved timeout issue on /api/export endpoint"
100
101# Generate a report entry
102apimon report "Weekly API health summary: 99.9% uptime"
103
104# View summary statistics
105apimon stats
106
107# Export all data as CSV
108apimon export csv
109
110# Search for keywords
111apimon search "timeout"
112
113# View recent activity
114apimon recent
115
116# Health check
117apimon status
118```
119
120## Output
121
122Results go to stdout. Save with `apimon export json > backup.json`. All entries are persisted to the data directory for later retrieval and analysis.
123
124---
125
126Powered by BytesAgain | bytesagain.com | hello@bytesagain.com