Bump CLI

How to use the bump command line interface.

Installing Bump CLI

Bump CLI is a Ruby gem, which means that you need to have the Ruby interpreter installed on your computer and servers.

Global installation

To install it globally, run the following command:

gem install bump-cli

Add Bump CLI to your Ruby project

As our CLI is a gem, you can easily embed it to your project by adding the gem to your GemFile :

gem 'bump-cli'

How should I do if I'm not using Ruby ?

Unfortunately, at the moment we only support the Ruby environments. We are working on an universal CLI tool, but in the meantime, you can push your documentations using our open API.

Using Bump CLI

To list all the available commands, just type bump in your command line environment. You can get some help anytime by using --help on any command. Example: bump deploy --help .

Preview a file

When writing a documentation, you'll want to preview how it renders on Bump. This is exactly the goal of the preview command: it will create a temporary documentation with a unique URL, which will be available for 30 minutes.

Usage: bump preview path/to/file --specification [specification]

You can create as many previews as you like, without being authenticated. This is a free and unlimited service.

Validate a file

This is mainly used when you integrate Bump with your CI: it will validate your documentation file against its specification, and return the errors list. This is used to ensure that future file deployment won't break.

Usage: bump validate path/to/file --specification [specification]

Deploy a file

Once your documentation has been updated and merged, you want it to be live for your API users. This is what the deploy command is for. When deploying the new version, Bump will analyse your API structure and will generate a changelog item if the API structure has changed.

Usage: bump deploy path/to/file --specification [specification]

The specification attribute

The specification attribute indicates to our server the parser it should use to parse your documentation file.

Currently available specifications:

  • openapi/v2/yaml : OpenApi 2 (Swagger) in a YAML format

  • openapi/v2/json : OpenApi 2 (Swagger) in a JSON format

  • openapi/v3/yaml : OpenApi 3 in a YAML format

  • openapi/v3/json : OpenApi 3 in a JSON format