Skip to content
GEX: Global & Local Dependency Auditing CLI

00Case file

A JavaScript dependency inventory CLI that separates package-manager collection from shared reports, helping developers compare environments before and after a migration.

Year2026
Stacktypescript · nodejs · bunjs
StatusLive
OutcomeShipped · live

The problem: environment state is easy to lose

Changing machines or switching JavaScript runtimes can leave a developer with an incomplete picture of the tools that were installed. A project's manifest describes its declared dependencies, but the working environment also includes global command-line tools and the versions actually present on disk.

GEX addresses that inventory problem with reports that can be saved and compared. The project is a CLI for inspecting JavaScript dependencies; this case study explains its design and boundaries. The GEX open-source page provides the repository overview and README, while the upstream repository holds the current command reference.

Separate collection from the report format

The source tree provides entry points for npm, Bun, Yarn and pnpm, with shared code for report handling. That division keeps package-manager-specific collection close to its runtime while giving downstream consumers a common structure. Feature coverage varies by runtime, so the command reference remains the authority for supported operations. See the runtime implementations.

The shared report type separates global packages, local dependencies and development dependencies. It records package names, versions and resolved paths, plus report metadata such as generation time and tool version. Optional fields hold additional information when available. This makes the inventory useful both to a person reviewing an environment and to tooling that needs structured input. The contract is visible in the report types.

Compare dependency changes, not just file changes

A saved report creates a useful checkpoint before an environment migration. Generate another report after the move, then inspect which packages were added, removed or changed version. Global tools and project dependencies remain separate, which helps locate the source of a mismatch.

GEX's report comparison implementation matches packages by name within each section and groups changes into additions, removals, upgrades and downgrades. It sorts the resulting lists for review. When versions cannot be compared as semantic versions, it falls back to string ordering; that label should not be treated as proof of compatibility.

This comparison focuses on package identity and version. A report still contains timestamps and machine-specific paths, so two inventories need not be byte-for-byte identical even when their dependency versions match.

Keep the inventory's limits visible

The design tradeoff is scope. An inventory helps explain what is installed, but it does not reproduce every part of a machine. Runtime versions, operating-system packages, environment variables and external services may still require separate records. A clean dependency comparison alone cannot establish that an application behaves correctly.

A useful migration workflow is to save the source inventory, compare the destination inventory, investigate unexpected differences and run the application's own checks. Review resolved paths before sharing reports publicly because they may contain local directory names.

What this project demonstrates

GEX illustrates a focused architecture: runtime-specific collection, a shared report contract and comparison logic that extracts meaningful changes from saved state. These choices make dependency inspection easier to incorporate into a handover or migration review without turning the project page into a second command manual.

The implementation links above identify the source revision examined for this case study. For releases, installation and supported flags, use the repository documentation.