{"id":50595878,"url":"https://github.com/rogerchappel/clisnapshot","last_synced_at":"2026-06-05T14:01:34.956Z","repository":{"id":360535748,"uuid":"1240158936","full_name":"rogerchappel/clisnapshot","owner":"rogerchappel","description":"Stable snapshots for terminal output without the confetti drift","archived":false,"fork":false,"pushed_at":"2026-05-26T19:53:16.000Z","size":46,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-26T21:24:06.167Z","etag":null,"topics":["cli","fixtures","snapshot-testing","terminal","testing","typescript"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rogerchappel.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":"ROADMAP.md","authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-05-15T20:38:53.000Z","updated_at":"2026-05-26T19:53:28.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/rogerchappel/clisnapshot","commit_stats":null,"previous_names":["rogerchappel/clisnapshot"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/rogerchappel/clisnapshot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rogerchappel%2Fclisnapshot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rogerchappel%2Fclisnapshot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rogerchappel%2Fclisnapshot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rogerchappel%2Fclisnapshot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rogerchappel","download_url":"https://codeload.github.com/rogerchappel/clisnapshot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rogerchappel%2Fclisnapshot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33944671,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-05T02:00:06.157Z","response_time":120,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","fixtures","snapshot-testing","terminal","testing","typescript"],"created_at":"2026-06-05T14:01:33.847Z","updated_at":"2026-06-05T14:01:34.948Z","avatar_url":"https://github.com/rogerchappel.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# clisnapshot\n\nStable snapshots for terminal output without the confetti drift 📸\n\n`clisnapshot` is a local-first CLI snapshot runner for people who build command-line tools. It runs named fixture commands, scrubs noisy output, and compares stdout, stderr, and exit codes against plain text snapshots you can review in git.\n\n## Why it exists\n\nCLI output drifts for boring reasons: ANSI color, UUIDs, dates, temp paths, home directories, durations, and platform-specific paths. `clisnapshot` keeps the useful signal while sanding down the confetti.\n\n## Install\n\n```sh\nnpm install --save-dev clisnapshot\n```\n\nOr try the repo locally:\n\n```sh\nnpm install\nnpm run build\nnode dist/cli.js --help\n```\n\n## Quick start\n\n```sh\nnpx clisnapshot init\nnpx clisnapshot run --update\nnpx clisnapshot run\n```\n\nA minimal `clisnapshot.config.json`:\n\n```json\n{\n  \"snapshotDir\": \"__snapshots__\",\n  \"cases\": {\n    \"help-output\": {\n      \"command\": \"node\",\n      \"args\": [\"fixtures/bin/example-cli.mjs\", \"--help\"],\n      \"snapshot\": \"help-output.snap\"\n    }\n  }\n}\n```\n\n## Commands\n\n- `clisnapshot init [dir]` — create a starter config, fixture CLI, and snapshot directory.\n- `clisnapshot run [--update] [--case name]` — compare configured cases or intentionally rewrite snapshots.\n- `clisnapshot list` — print configured case names.\n- `clisnapshot inspect` — show resolved config metadata as JSON.\n- `clisnapshot scrub [text]` — normalize noisy terminal text from an argument or stdin.\n\n## Scrubbing\n\nBuilt-in scrubbers normalize:\n\n- ANSI escape codes\n- CRLF line endings\n- home and current working directories\n- temp paths\n- ISO-like dates/timestamps\n- UUIDs\n- common durations such as `42ms` or `1.2s`\n\nAdd project-specific scrubbers:\n\n```json\n{\n  \"scrubbers\": [\n    { \"pattern\": \"api_[A-Za-z0-9]+\", \"replacement\": \"api_\u003cTOKEN\u003e\" }\n  ],\n  \"cases\": {}\n}\n```\n\n## Local-first safety\n\n`clisnapshot run` is read-only unless you pass `--update`. Snapshot writes are constrained to the configured snapshot directory, and unsafe path traversal is rejected. There is no hosted service, telemetry, or account requirement.\n\nAvoid snapshotting secrets. Scrubbers are a guardrail, not a vault.\n\n## Developer workflow\n\n```sh\nnpm test\nnpm run check\nnpm run build\nnpm run smoke\nbash scripts/validate.sh\n```\n\nFor a real fixture smoke:\n\n```sh\nnode dist/cli.js run --update --case help-output\nnode dist/cli.js run --case help-output\n```\n\n## Examples\n\nSee [`examples/clisnapshot.config.json`](examples/clisnapshot.config.json) and [`fixtures/bin/example-cli.mjs`](fixtures/bin/example-cli.mjs).\n\nFor a focused noisy-output walkthrough, see [`docs/tutorials/stabilize-noisy-cli-output.md`](docs/tutorials/stabilize-noisy-cli-output.md) and the runnable config in [`examples/noisy-demo.config.json`](examples/noisy-demo.config.json).\n\n## Contributing and security\n\nSmall, atomic PRs are welcome. See [CONTRIBUTING.md](CONTRIBUTING.md), [SECURITY.md](SECURITY.md), and [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md).\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frogerchappel%2Fclisnapshot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frogerchappel%2Fclisnapshot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frogerchappel%2Fclisnapshot/lists"}