@relesio/cli
v0.2.6
Published
CLI tool for Relesio - Modern Micro-Frontend Hosting
Readme
Relesio CLI
Command-line tool for Relesio — modern micro-frontend hosting. Upload versions, deploy to environments, and manage projects from the terminal.
Requirements
- Node.js >= 18
- Bun (recommended) or npm / pnpm
Installation
From npm
npm install -g @relesio/cli
# or
bun add -g @relesio/cliFrom source (monorepo)
cd api
bun install
bun run build --filter=@relesio/cliLink locally:
cd apps/cli
bun linkQuick Start
Authenticate with your API token:
relesio auth login --token rls_your_token_hereOr use the
RELESIO_API_TOKENenvironment variable.Upload a built frontend:
relesio upload ./dist --project my-app --version 1.0.0Deploy to an environment:
relesio deploy my-app 1.0.0 --env production --yes
Commands
Authentication
| Command | Description |
| --------------------- | ------------------------ |
| relesio auth login | Authenticate with token |
| relesio auth status | Show current auth state |
| relesio auth logout | Clear stored credentials |
| relesio whoami | Show current user info |
Organizations & Projects
| Command | Description |
| ------------------------------------ | ------------------------------------ |
| relesio organizations list | List organizations |
| relesio organizations set <org-id> | Set active organization |
| relesio projects list | List projects in active organization |
| relesio team list | List teams |
| relesio team get <teamId> | Get team details |
Versions & Deployment
| Command | Description |
| -------------------------------- | -------------------------------------------- |
| relesio versions list <project>| List versions for a project |
| relesio status <project> | Show deployment status across environments |
| relesio upload [dir] | Upload a new version |
| relesio deploy [project] [ver] | Deploy a version to an environment |
| relesio rollback <project> | Rollback to the previous version |
Usage Examples
Authentication
# Interactive login (prompts for token)
relesio auth login
# With token flag
relesio auth login --token rls_...
# Via environment variable
export RELESIO_API_TOKEN=rls_...
relesio auth statusUpload
# Basic upload (default dir: dist, uses package.json for project/version)
relesio upload
# Specify directory, project, and version
relesio upload ./build --project my-app --version 1.2.0
# Require clean git working directory
relesio upload ./dist -p my-app -v 1.0.1 --require-clean
# Non-interactive (skip prompts)
relesio upload ./dist -p my-app -v 1.0.0 -yDeploy
# Deploy specific version to production
relesio deploy my-app 1.0.0 --env production --yes
# Deploy latest version
relesio deploy my-app --latest --env staging
# Use project from package.json
relesio deploy --env productionRollback
relesio rollback my-app --env production --yesConfiguration
Environment Variables
| Variable | Description | Default |
| ------------------ | --------------------------------------- | -------------------------- |
| RELESIO_API_TOKEN| API token (starts with rls_) | — |
| RELESIO_API_URL | API base URL | https://api.relesio.com |
| RELESIO_ORG_ID | Override active organization | — |
| DEBUG | Enable debug output | — |
Organization Context
Order of precedence:
--org <org-id>flagRELESIO_ORG_IDenvironment variable- Active organization from session
Output Options
--json— Output as JSON (machine-readable)--no-color— Disable colored output
Project & Version Inference
The CLI infers values from package.json when possible:
- Project slug — from
name(slugified: lowercase, hyphens) - Version — from
version(semver)
Example: package.json with "name": "@myorg/my-app" and "version": "1.0.0" allows:
relesio upload ./dist
relesio deploy --env stagingFile Structure
api/apps/cli/
├── bin/relesio.js # Entry shim
├── src/
│ ├── index.ts # CLI root
│ ├── commands/ # Command implementations
│ └── lib/ # API client, config, utilities
└── dist/ # Compiled outputDevelopment
# Install dependencies
bun install
# Run in development mode
bun run dev
# Build
bun run build
# Type check
bun run type-check
# Lint & format
bun run lint
bun run formatExit Codes
| Code | Meaning | | ---- | ----------------- | | 0 | Success | | 1 | General error |
Links
License
MIT
