Skip to content

Latest commit

 

History

History
 
 

cli

Zally Command Line Interface

This is Zally's cli tool: it reads a swagger file locally and lints it by requesting violations check at a given Zally server.

Building from Sources

  1. Clone Zally repository

    git clone [email protected]:zalando-incubator/zally.git zally
  2. Switch to cli folder:

    cd zally/cli
  3. Build JAR package:

    ./gradlew clean build
  4. Check that zally command is working

    ./bin/zally
  5. Add ./bin directory to PATH

Installing from Binaries

  1. Download latest zally-cli JAR file from the releases page

  2. Create a zally start script in your /usr/local/bin:

    #!/usr/bin/env bash
    function zally {
        java -Done-jar.silent=true -jar /PATH/TO/zally-1.0.0.jar "$@"
    }
    zally $@

Usage

Basic example

To launch zally-cli, run the following command:

zally swagger_definition.yml

By default zally-cli uses API located at http://localhost:8080/ and no security token. You can provide alternative settings using either environment variables ZALLY_URL and TOKEN:

export ZALLY_URL="http://zally.example.com/"
export TOKEN="f123-4567-890a-bcde"
zally swagger_definition.yml

or --linter-service and --token command-line arguments:

zally swagger_definition.yml --linter-service "http://zally.example.com/" --token "f123-4567-890a-bcde"

Getting help message

To get commands help message, simply type:

zally --help

Building next release

  1. Make sure that the current state of the Git repository is clean:

    git stash -a
  2. Create a release:

    ./gradlew clean build -Pversion=1.0.0
  3. Unstash the changes:

    git stash pop
  4. You can find the release JAR file in releases folder.