bom-exchange-cli
v0.0.2
Published
CLI to interact with BOM Exchange APIs
Downloads
6
Maintainers
Readme
BOM Exchange CLI
CLI to interact with a BOM Exchange API
This is still beta software.
Install
Install globally if you want to use the CLI.
yarn global add bom-exchange-cli
# or
npm i -g bom-exchange-cli
Install locally if you want to use it as a library.
yarn add bom-exchange-cli
# or
npm i --save bom-exchange-cli
Usage
Expects a BOM generated by @cyclonedx/bom, e.g.
$ cyclonedx-bom -o bom.json --include-dev
CLI
$ bom-exchange-cli --help
Commands:
bom-exchange-cli get Get BOM
bom-exchange-cli submit Submit BOM
Options:
--version Show version number [boolean]
-a, --auth Authorization [string]
-u, --url URL to interact with, BOM Exchange API endpoint
[string] [required]
-t, --type BOM file content-type
[string] [default: "application/vnd.cyclonedx+json; version=1.3"]
--help Show help [boolean]
# For more help on commands
$ bom-exchange-cli submit --help
$ bom-exchange-cli get --help
$ bom-exchange-cli submit -f my-bom.json -u url [-a auth]
$ bom-exchange-cli get -i identifier -u url [-a auth]
As a library
import { bomExchangeGet, bomExchangeSubmit } from 'bom-exchange-cli'
bomExchangeSubmit(bomAsString, {url})
bomExchangeGet({url, identifier})
Developing
- Clone the repo
- Run
yarn install
- Run
yarn test-watch
to run the tests while deving - Run
git add . && git commit -m some-message
to commit changes - Run
yarn release
to create a new version using standard-version
Lint checks and tests are run automatically on commit and built by the pipeline on push.
License
bom-exchange-cli is licensed under the terms of the MIT license.