insomnia-plugin-env-diff
v1.1.0
Published
Desktop-validated local-only Insomnia environment diff reports with Markdown plus JSON sidecar exports, paste-JSON fallback, export diagnostics, key matrix, URL drift, and secret hygiene.
Maintainers
Readme
insomnia-plugin-env-diff
Local-only environment comparison for Insomnia. v1.1.0 writes a redacted JSON sidecar next to every Markdown report for saved audits, diffing, and automation.
Env Diff exports a redacted Markdown report showing environment drift: missing keys, prod/dev URL mismatches, duplicate environment names, empty or short secret-like values, and suspicious same values across environments.
Why
API teams often keep Base, Dev, Staging, and Production environments in one workspace. Over time those environments drift: keys go missing, staging points to prod, prod points to sandbox, and copied secrets leak into the wrong place.
Features
- Adds a key matrix across all exposed environments
- Adds desktop export diagnostics and paste-JSON fallback
- Writes a redacted JSON sidecar next to every Markdown report
- Compares all Insomnia environments in the workspace
- Flags keys missing from one or more environments
- Flags dev/staging environments pointing at production-like hosts
- Flags production environments pointing at dev/test hosts
- Flags empty or suspiciously short secret-like values
- Flags same non-secret values across environments
- Flags duplicate environment names
- Exports a local redacted Markdown report
- No cloud, no telemetry, no backend, no dependencies
Install
From Insomnia:
- Open Preferences → Plugins
- Enter
insomnia-plugin-env-diff - Click Install Plugin
Manual macOS install:
cd "$HOME/Library/Application Support/Insomnia/plugins"
npm install insomnia-plugin-env-diffUsage
Run:
Env Diff: Export ReportThe action is exposed through workspaceActions, requestGroupActions, and requestActions. In Insomnia 13 it may appear in the New Request dropdown.
Each export writes two local files:
insomnia-env-diff.md
insomnia-env-diff.jsonThe JSON sidecar uses schema insomnia-env-diff/v1 and includes:
{
"schema": "insomnia-env-diff/v1",
"generatedAt": "...",
"summary": {
"environmentsCompared": 2,
"keysCompared": 5,
"totalFindings": 3,
"high": 1,
"medium": 1,
"low": 1
},
"matrix": [],
"findings": []
}Example report
# Insomnia Env Diff Report
## Summary
- High: 1
- Medium: 2
- Low: 3
| Severity | Type | Location | Message | Preview |
|---|---|---|---|---|
| high | dev-points-to-prod | Dev.base_url | Development/staging environment points at production-like host | Dev: api.production.example.com |Desktop validation notes
In some Insomnia Desktop menu contexts, context.data.export.insomnia() may expose zero environment resources. Env Diff now reports env-export-empty and prompts for pasted environment JSON when Insomnia does not expose environments. Paste either a single environment object or { "Dev": {...}, "Prod": {...} } to run full pairwise diff locally.
Privacy
- Local-only
- No network calls
- No analytics
- No account required
- Exports with
includePrivate: false - Secret-like values are redacted in reports
Development
git clone https://github.com/oliviajohns5/insomnia-plugin-env-diff.git
cd insomnia-plugin-env-diff
npm test
npm run test:hard
npm run test:packaged
npm pack --dry-runVerified QA
node --check main.jsnode --check test.jsnode --check hard-qa.jsnode --check real-insomnia-packaged-test.jsnode --check qa-packaged.jsnpm testnpm run test:hardnpm run test:packagednpm pack --dry-run- isolated tarball install
- package metadata validation
- credential literal scan
Requirements
- Insomnia
- Node.js/npm only for development or publishing
License
MIT
