@restlens/cli
v0.2.0
Published
CLI for REST Lens API evaluation
Maintainers
Readme
@restlens/cli
CLI for REST Lens API evaluation.
Installation
npx @restlens/cli@latest <command>Or install globally:
npm install -g @restlens/cliUsage
Authentication
# Opens browser for OAuth login
restlens authCredentials 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.0Other 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 logoutOptions
All commands support:
--server <url>- Use a different REST Lens server (default: https://restlens.com)
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-projectAlternatively, 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.comTokens are stored per-server in ~/.restlens/auth.json.
License
GPL-3.0-only
