@specverse/reg
v3.3.2
Published
Official CLI for SpecVerse Registry - Lightweight, standalone tool for publishing and managing SpecVerse libraries
Downloads
5
Readme
@specverse/reg
The official CLI for the SpecVerse Registry - Publish, discover, and manage SpecVerse libraries.
Installation
# Install globally
npm install -g @specverse/reg
# Or use with npx
npx @specverse/reg --helpQuick Start
# Search for libraries
specverse-reg search healthcare
# Get library information
specverse-reg info domains-healthcare-patient-yaml-patientlibrary
# Login to publish libraries
specverse-reg login
# Publish a library (requires login)
specverse-reg publish ./my-library.specly
# Check who you're logged in as
specverse-reg whoamiCommands
Authentication
specverse-reg login- Login to the registry (supports GitHub OAuth, API tokens, or email/password)specverse-reg whoami- Display the currently logged in user
Publishing
specverse-reg publish [path]- Publish a library to the registry--tag <tag>- Publish with a specific tag (default: latest)--access <access>- Set access level (public or private, default: public)--dry-run- Perform a dry run without publishing
Discovery
specverse-reg search [query]- Search for libraries--type <type>- Filter by type (component, deployment, manifest)--category <category>- Filter by category--tags <tags>- Filter by tags (comma-separated)--limit <number>- Limit number of results (default: 20)
specverse-reg info <library>- Show detailed information about a library--json- Output as JSON
Library Management
specverse-reg star <library>- Star a libraryspecverse-reg unstar <library>- Unstar a libraryspecverse-reg unpublish <library>- Remove a library from the registry--force- Force unpublish without confirmation
Publishing Libraries
To publish a library to the SpecVerse Registry:
- Login:
specverse-reg login - Create or prepare your SpecVerse library file (
.specly) - Publish:
specverse-reg publish
The CLI uploads your .specly file directly to the registry API, where it's validated using the SpecVerse Language CLI before storage. This ensures all published libraries are valid SpecVerse specifications.
How It Works
- File Upload: The CLI sends your
.speclyfile to the registry API - Server Validation: The API validates the file using the SpecVerse Language CLI
- Metadata Extraction: The API extracts name, version, and other metadata from the validated specification
- Storage: Valid specifications are stored in the registry database
- Response: The CLI displays success or error messages
This architecture keeps the CLI package lightweight and standalone while ensuring consistent validation across all publishing methods.
Configuration
The CLI respects the following environment variables:
SPECVERSE_REGISTRY- Registry URL (default: https://specverse-lang-registry-api.vercel.app)
Aliases
For convenience, you can also use the shorter svreg command:
svreg search healthcare
svreg publish my-library.speclyExamples
Publishing a Component Library
# Navigate to your project directory
cd my-specverse-project/
# Preview what would be published (dry run)
specverse-reg publish --dry-run
# Publish to the registry
specverse-reg publishSearching for Libraries
# Search all libraries
specverse-reg search
# Search for healthcare-related libraries
specverse-reg search healthcare
# Search for authentication components
specverse-reg search --type component --tags authentication
# Search for deployment manifests
specverse-reg search --type deployment --category cloudGetting Library Information
# Get basic info about a library
specverse-reg info @specverse/auth-library
# Get full JSON output
specverse-reg info @specverse/auth-library --jsonDevelopment
This CLI is part of the SpecVerse ecosystem. For more information:
License
MIT © SpecVerse Team
