https://github.com/oclif/plugin-command-snapshot
generates and compares OCLIF plugins snapshot files
https://github.com/oclif/plugin-command-snapshot
Last synced: about 2 months ago
JSON representation
generates and compares OCLIF plugins snapshot files
- Host: GitHub
- URL: https://github.com/oclif/plugin-command-snapshot
- Owner: oclif
- License: mit
- Created: 2020-03-02T19:15:11.000Z (over 6 years ago)
- Default Branch: main
- Last Pushed: 2026-05-24T06:23:25.000Z (2 months ago)
- Last Synced: 2026-05-24T08:26:07.956Z (2 months ago)
- Language: TypeScript
- Size: 4.46 MB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# @oclif/plugin-command-snapshot
Generates and compares OCLIF plugins snapshot files
[](https://oclif.io)
[](https://npmjs.org/package/@oclif/plugin-command-snapshot)
[](https://npmjs.org/package/@oclif/plugin-command-snapshot)
[](https://github.com/nramyasri-sf/@oclif/plugin-command-snapshot/blob/main/package.json)
- [@oclif/plugin-command-snapshot](#oclifplugin-command-snapshot)
- [Usage](#usage)
- [generates a snapshot file that has a list or commands and flags in the current CLI or plugin](#generates-a-snapshot-file-that-has-a-list-or-commands-and-flags-in-the-current-cli-or-plugin)
- [compare the current CLI or plugin commands and flags with a snapshot file to identify changes](#compare-the-current-cli-or-plugin-commands-and-flags-with-a-snapshot-file-to-identify-changes)
- [Contributing](#contributing)
# Usage
This plugin is used to take snapshot of commands and flags in OCLIF plugins. These snapshots can be used to enforce a deprecation policy or to keep track of changes.
To include it in your plugin, add it to the `devPlugins` section in your package.json.
```json
"oclif": {
...
"devPlugins": [
"@oclif/plugin-command-snapshot"
...
]
```
Use the `snapshot:generate` command in your development process.
```sh-session
# generates a snapshot file that has a list or commands and flags in the current CLI or plugin
$ ./bin/run.js snapshot:generate
```
Use the `snapshot:compare` command in your continuos integration. This command will fail if changes are detected. The snapshot file should be updated and committed to the repository when legitimate changes are made.
```sh-session
# compare the current CLI or plugin commands and flags with a snapshot file to identify changes
$ ./bin/run.js snapshot:compare
```
# Contributing
See [contributing guide](./CONRTIBUTING.md)