CLI Tool
The Piora CLI is the official command-line tool that lets you manage servers, applications, and deployments directly from the terminal.
Installation
Section titled “Installation”Via npm
Section titled “Via npm”npm install -g @piora/cliVia Homebrew (macOS)
Section titled “Via Homebrew (macOS)”brew install piora-dev/tap/pioraVerify Installation
Section titled “Verify Installation”piora --version# piora/1.0.0 darwin-arm64Initial Setup
Section titled “Initial Setup”piora loginThis opens your browser for OAuth authorization. Once authorized, the CLI automatically obtains and stores the token.
Login with API Token
Section titled “Login with API Token”For CI/CD environments, you can directly set the token:
piora login --token piora_token_xxxxxxxxxxxx
# Or use an environment variableexport PIORA_API_TOKEN=piora_token_xxxxxxxxxxxxCommon Commands
Section titled “Common Commands”Server Management
Section titled “Server Management”# List all serverspiora servers list
# View server detailspiora servers info <server-id>
# View server statspiora servers stats <server-id>Application Management
Section titled “Application Management”# List all applicationspiora apps list
# View application detailspiora apps info <app-id>
# Create a new applicationpiora apps create --name my-app --server <server-id>
# Delete an applicationpiora apps delete <app-id>Deployment
Section titled “Deployment”# Trigger deploymentpiora deploy <app-id>
# Trigger deployment (specific branch)piora deploy <app-id> --branch main
# View deployment statuspiora deploy status <app-id>
# View deployment logspiora deploy logs <app-id>
# Rollback to previous versionpiora deploy rollback <app-id># View application logs in real timepiora logs <app-id>
# Stream logspiora logs <app-id> --follow
# View last 100 linespiora logs <app-id> --lines 100Environment Variables
Section titled “Environment Variables”# List environment variablespiora env list <app-id>
# Set an environment variablepiora env set <app-id> KEY=value
# Set multiple environment variablespiora env set <app-id> KEY1=value1 KEY2=value2
# Remove an environment variablepiora env unset <app-id> KEY
# Import from .env filepiora env import <app-id> .envCI/CD Integration
Section titled “CI/CD Integration”GitHub Actions
Section titled “GitHub Actions”name: Deploy to Pioraon: push: branches: [main]
jobs: deploy: runs-on: ubuntu-latest steps: - name: Install Piora CLI run: npm install -g @piora/cli
- name: Deploy run: piora deploy ${{ secrets.PIORA_APP_ID }} env: PIORA_API_TOKEN: ${{ secrets.PIORA_API_TOKEN }}GitLab CI
Section titled “GitLab CI”deploy: stage: deploy image: node:20 script: - npm install -g @piora/cli - piora deploy $PIORA_APP_ID variables: PIORA_API_TOKEN: $PIORA_API_TOKEN only: - mainConfiguration File
Section titled “Configuration File”CLI settings are stored in ~/.piora/config.json:
{ "token": "piora_token_xxxxxxxxxxxx", "default_server": "server-id", "output": "table"}Output Formats
Section titled “Output Formats”# Table format (default)piora servers list --output table
# JSON formatpiora servers list --output json
# Compact formatpiora servers list --output compactAll Commands
Section titled “All Commands”# View all available commandspiora help
# View help for a specific commandpiora help deploypiora deploy --help