New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

@aiherrera/devsnap

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aiherrera/devsnap

macOS CLI: scan your dev environment, annotate, diff locally; optional cloud sync to your own API.

latest
Source
npmnpm
Version
0.3.0
Version published
Maintainers
1
Created
Source

devsnap

Local-first macOS dev environment scanner: scan, annotate, diff—no account required.

npm version MIT License Node version

devsnap is a CLI-only project for macOS: it captures a structured snapshot of your machine (OS and hardware, Homebrew, Node, runtimes, Docker, databases, browsers, terminals, editors, LLM / AI CLIs, CLI tools), saves everything under ~/.devsnap, and diffs locally. Optional devsnap cloud commands can talk to your own HTTP API (for example a private dashboard backend you host separately)—this repository does not ship a server or web UI.

Built for developers who want one command instead of twenty screenshots.

Why devsnap?

You need…devsnap gives you…
A single inventory of “what’s on this Mac?”devsnap scan → terminal, Markdown, HTML, or JSON
To see what changed after an upgradedevsnap diff between two snapshots
Context for teammates or supportdevsnap share clipboard or gist (Markdown/HTML)
To remember why a tool is installeddevsnap annotate on tool keys
A starting point to reproduce a machinedevsnap export brewfile or bootstrap
Low-friction drift awarenessdevsnap schedule install — recurring launchd scans (presets + --time below; default 24h at 08:00 local)
A lightweight security passdevsnap audit (optional --html)
Optional upload to your own APIdevsnap cloud push (after cloud auth or cloud register)

Installation

Requirements: macOS · Node.js ≥ 22

npm install -g @aiherrera/devsnap

The devsnap command name is unchanged (see bin in package.json). Scoped packages are private on npm by default; the first publish must use npm publish --access public.

From source:

git clone https://github.com/aiherrera/devsnap.git
cd devsnap
npm install
npm run build
npm link   # or: node dist/cli.js

Quick start

# Full scan, print to terminal and save JSON snapshot under ~/.devsnap/snapshots/
devsnap scan

# Scan + write Markdown and HTML reports (HTML opens in browser by default)
devsnap scan --md --html

# Machine-readable output only (still can save with default behavior)
devsnap scan --json

# Compare the last two snapshots
devsnap diff

# Search the latest snapshot
devsnap search docker

# Optional (macOS): recurring scans via launchd
devsnap schedule install --interval 24h --time 08:00
devsnap schedule install --interval 1w
devsnap schedule status

Commands

CommandDescription
devsnap scanScan environment. Flags: --html, --md, --json, --no-save
devsnap listList saved snapshots
devsnap diff [id1] [id2]Diff two snapshots (defaults to latest pair)
devsnap openOpen the latest HTML report in your browser
devsnap annotateAdd or manage notes on tools (--list, --show, --remove)
devsnap search <query>Search latest snapshot; -s, --snapshot <id> for a specific one
devsnap export <format> [output]brewfile or bootstrap from latest snapshot
devsnap cleanDrop old snapshots; -k, --keep <n> (default 5)
devsnap schedule <action>install | uninstall | statuslaunchd job. -i, --interval: 1h, 8h, 24h (default), 1w, 1m. -t, --time HH:MM: local time for 24h (daily), 1w (Mondays), 1m (1st of each month); default 08:00. Ignored for 1h / 8h (StartInterval only).
devsnap share <target>clipboard | gist--format md|html (gist needs gh CLI; see Privacy below)
devsnap auditSecurity-oriented audit; --html for report
devsnap config showPrint config
devsnap config set <key> <value>Update ~/.devsnap/config.json (only documented keys are accepted)
devsnap cloud registerCreate an account on your API; saves API key to ~/.devsnap/cloud.json
devsnap cloud authSave API key, API base URL, optional dashboard URL (--key, --url, --dashboard)
devsnap cloud logoutRemove ~/.devsnap/cloud.json
devsnap cloud statusShow whether cloud credentials are configured
devsnap cloud pushPOST latest (or --id) snapshot JSON to your API; optional --tag, --note, --redacted
devsnap cloud listList snapshots from your API
devsnap cloud openOpen the saved dashboard URL in a browser

Run devsnap --help or devsnap <command> --help for details.

Environment: DEVSNAP_CLOUD_API overrides the API base URL when not passed via cloud auth --url (default for local development: http://localhost:3001).

Optional cloud API (your own backend)

This repo stays CLI-only. If you run a separate private service, implement endpoints compatible with the CLI:

MethodPathNotes
POST/api/auth/registerBody: { "email": string | null }. Response: { "apiKey": string } (plaintext key, show once).
POST/api/snapshotsHeader: Authorization: Bearer <apiKey>. Body: { "payload": <snapshot JSON>, "tag": string | null, "note": string | null }. Response: { "id": string, "localId": string }.
GET/api/snapshots?limit=50Same auth. Response: array of { id, localId, createdAt, tag, note }.
GET/api/snapshots/:idSame auth. Full row including payload.

snapshot objects are the same shape as devsnap scan --json (see What gets scanned). New scans include optional schemaVersion for forward compatibility.

What gets scanned

Snapshots include (when available on your system):

  • System — macOS version, architecture, chip, memory, disk
  • Homebrew — formulae and casks
  • Node — versions, package managers, global packages
  • Runtimes — e.g. Python, Ruby, Go, Rust (as detected)
  • Docker — version, images, running containers
  • Databases — common DB CLI presence / versions
  • Browsers — installed browsers
  • Terminals — terminal apps
  • Editors — VS Code, Cursor, JetBrains, etc.
  • LLMs — AI/LLM-related CLIs and tooling
  • CLI tools — curated list of developer utilities (configurable)

Exact coverage evolves with releases; use devsnap scan --json to inspect the schema.

--json output can include paths, tool names, and versions. Avoid piping it into shared logs or CI artifacts if that is sensitive for your environment.

Privacy

  • devsnap share gist uploads your Markdown report to GitHub Gists (public by default for anonymous gists, or per your gh account defaults). Treat it like publishing environment inventory.
  • Clipboard copies the report into the system pasteboard; anyone with access to the machine or universal clipboard may see it.

Configuration

Config lives at ~/.devsnap/config.json. You can edit it or use the CLI:

devsnap config show
devsnap config set autoOpenHtml false
devsnap config set staleDays 365
KeyPurpose
disabledScannersSkip categories: brew, node, runtimes, docker, databases, browsers, terminals, editors, llms, cliTools, system (case-insensitive)
extraCliToolsExtra binary names to probe (letters, digits, ., _, - only; no paths). Duplicates of built-in tools are ignored.
staleDaysDays before a tool is treated as stale (default 180)
cleanKeepDefault keep count for devsnap clean (default 5)
autoOpenHtmlOpen browser after devsnap scan --html (default true)

Data on disk

PathContents
~/.devsnap/snapshots/Snapshot JSON files (timestamp-style ids; devsnap list shows valid ids for diff)
~/.devsnap/reports/Generated .html and .md reports
~/.devsnap/config.jsonUser configuration
~/.devsnap/annotations.jsonTool annotations
~/.devsnap/cloud.jsonOptional cloud API key + URLs (mode 600; created by devsnap cloud auth / register)
~/.devsnap/schedule.logStdout from scheduled devsnap scan (when using schedule install)
~/.devsnap/schedule.errStderr from scheduled runs

Development

npm install
npm run dev -- --help    # tsx src/cli.ts
npm run build            # tsc → dist/
npm run typecheck

CI (.github/workflows/ci.yml) runs typecheck, tests, and a pack dry-run on pushes and PRs. It does not publish to npm.

Automated versioning and releases (Release Please)

This repo uses Release Please (.github/workflows/release-please.yml):

  • Use Conventional Commits on main, for example:
    • fix: … → patch bump
    • feat: … → minor bump
    • feat!: … or BREAKING CHANGE: in the body → major bump
    • chore:, docs:, etc. usually do not trigger a release by themselves (see Release Please rules).
  • On each push to main, the workflow opens or updates a Release PR that bumps package.json, updates CHANGELOG.md, and prepares the next version.
  • When you merge that Release PR, Release Please creates the GitHub release and tag, then npm publish --access public runs in the same job (so you do not depend on a second workflow).

Setup

  • Add the NPM_TOKEN Actions secret (npm automation/publish token), same as below.
  • Under Settings → Actions → General, allow “Read and write permissions” for the workflow token and (if prompted) allow workflows to create pull requests.

Other tools people use: semantic-release (fully automated from commits, no merge step), Changesets (human-written changeset files). Release Please fits GitHub-centric teams who like a visible Release PR.

Manual npm publish (optional)

Actions → Publish to npm (manual) → Run workflow publishes whatever version is on main today. Use for hotfixes or if you skip Release Please. Still requires NPM_TOKEN.

npm token

  • Create an automation (or publish) token at npmjs.comAccess Tokens.
  • Repo Settings → Secrets and variables → ActionsNPM_TOKEN.

Scoped packages need npm publish --access public; the workflows already pass that. Your npm user must be allowed to publish @aiherrera/*.

License

MIT © aiherrera

If devsnap saves you time, a ⭐ on GitHub helps others find it.

Keywords

devtools

FAQs

Package last updated on 09 Apr 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts