Skip to main content

JSight CLI

Command line interface tool for working with the JSight API language.

JSight CLI is open source and 100% free.

Downloads
Release Notes
GitHub

Features

  • Parsing of JSight API files.
  • Checking JSight API syntax (with detailed messages in case of errors).
  • Generating one-file HTML API doc (example).
  • New! JSight to OpenAPI converter.

Install

Linux

Download the latest release of the jsight cli binary to the /usr/local/bin folder.

You can also install it with the following command:

wget https://jsight.io/downloads/jsight-cli/1.1.0/linux-x64/jsight && mv jsight /usr/local/bin && chmod +x /usr/local/bin/jsight

Check the installation:

jsight version

Mac OS

Download the latest release of the jsight cli binary to the /usr/local/bin folder.

You can also install it with the following command:

wget https://jsight.io/downloads/jsight-cli/1.1.0/macos-x64/jsight && mv jsight /usr/local/bin && chmod +x /usr/local/bin/jsight

Check the installation:

jsight version

Windows

Download the latest release of the jsight.exe cli binary.

You can also install it with the following command (PowerShell):

curl https://jsight.io/downloads/jsight-cli/1.1.0/windows-x64/jsight.exe -outfile jsight.exe

Check the installation:

./jsight.exe version

Usage

Use jsight with the following commands:

  • jsight version — outputs the current version of JSight CLI.
  • jsight help — outputs the manual for JSight CLI.
  • jsight doc html <jsight file> — parses the <jsight file> and outputs the corresponding HTML document (or a detailed error message in the case of a syntax error).
  • jsight convert openapi yaml <jsight file> — parses the <jsight file>, converts it to OpenAPI and outputs the OpenAPI definition in the YAML format.
  • jsight convert openapi json <jsight file> — parses the <jsight file>, converts it to OpenAPI and outputs the OpenAPI definition in the JSON format.

Examples

Creating HTML doc example:

jsight doc html my-api-spec.jst > my-api-spec.html

Generated HTML doc example.

Converting to OpenAPI example:

jsight convert openapi yaml my-api-spec.jst > my-api-spec.openapi

Error message example:

JSight API parsing error at `test04.jst` [1, 1]
Error message: incorrect parameter (Filename) "wrong_lib.jst": file does not exist.
Quote:
----> INCLUDE wrong_lib.jst

Manual Building

You can build jsight binary from the source code, see the manual on GitHub.