Skip to content

Edthing/restlens-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@restlens/cli

CLI for REST Lens API evaluation.

Installation

npx @restlens/cli@latest <command>

Or install globally:

npm install -g @restlens/cli

Usage

Authentication

# Opens browser for OAuth login
restlens auth

Credentials are stored in ~/.restlens/auth.json.

Evaluate a Specification

# Upload, wait for evaluation, and show violations
restlens eval ./openapi.yaml -p my-org/my-project

# With version tag
restlens eval ./openapi.yaml -p my-org/my-project --tag v1.0.0

Other Commands

# Just upload (don't wait for results)
restlens upload ./openapi.yaml -p my-org/my-project

# Get violations for latest spec
restlens violations -p my-org/my-project

# List your projects
restlens projects

# Check auth status
restlens status

# Logout
restlens logout

Options

All commands support:

Multi-Server Support

For non-production servers, set the RESTLENS_URL environment variable:

export RESTLENS_URL=https://staging.restlens.com
restlens auth
restlens eval ./openapi.yaml -p my-org/my-project

Alternatively, use the --server flag on each command:

restlens auth --server https://staging.restlens.com
restlens eval ./openapi.yaml -p my-org/my-project --server https://staging.restlens.com

Tokens are stored per-server in ~/.restlens/auth.json.

License

GPL-3.0-only

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors