Skip to content

Commit 2ba632e

Browse files
authoredMar 20, 2025··
Merge pull request #678 from bump-sh/adapt-readme-to-run-cli-in-local-environment
Readme: Add instructions to run CLI in local environment
2 parents 1ea8e03 + 41ef6b6 commit 2ba632e

File tree

1 file changed

+27
-2
lines changed

1 file changed

+27
-2
lines changed
 

‎README.md

+27-2
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ $ bump --help
8888
The Bump.sh CLI is used to interact with your API documentation hosted on Bump.sh by using the API of developers.bump.sh
8989

9090
VERSION
91-
bump-cli/2.9.2 linux-x64 node-v20.18.1
91+
bump-cli/2.9.3 linux-x64 node-v20.18.1
9292

9393
USAGE
9494
$ bump [COMMAND]
@@ -325,12 +325,37 @@ Make sure to have Node.js (At least v20) installed on your machine.
325325
```
326326

327327
- Run the test suites
328-
328+
329329
```shell
330330
npm run test
331331
npm run test-coverage # Run tests with coverage
332332
```
333333

334+
### Use package in local environment
335+
336+
You can run the package by executing the file `bin/run.js` locally:
337+
338+
```shell
339+
bin/run.js
340+
```
341+
342+
For example to generate a preview:
343+
344+
```shell
345+
./bin/run.js preview path/to/file.json
346+
> Your preview is visible at: https://bump.sh/preview/42
347+
```
348+
349+
Please note that even if CLI is running locally, by default requests are sent to [Bump.sh API](https://developers.bump.sh/).
350+
351+
If you have a local version of the Bump.sh API, you can run CLI 100% in local environment
352+
by setting the environment variable `BUMP_HOST`:
353+
354+
```shell
355+
BUMP_HOST="http://localhost:3000" ./bin/run.js preview path/to/file.json
356+
> Your preview is visible at: http://localhost:3000/preview/42
357+
```
358+
334359
## License
335360

336361
The Bump CLI project is released under the [MIT License](http://opensource.org/licenses/MIT).

0 commit comments

Comments
 (0)
Please sign in to comment.