Skip to content

CLI Tool

The Qelos CLI (@qelos/plugins-cli) is a command-line interface tool that helps developers manage and synchronize Qelos resources between their local development environment and their Qelos instance.

Overview

The CLI provides powerful commands to:

  • Create new plugin projects with scaffolding
  • Pull resources from your Qelos instance to work locally
  • Push local changes back to your Qelos instance
  • Manage components, blueprints, and configurations

Installation

Global Installation

Install the CLI globally using npm:

bash
npm install -g @qelos/plugins-cli

After installation, the CLI will be available as both qelos and qplay commands:

bash
qelos --version
qplay --version

Configuration

Environment Variables

The CLI requires the following environment variables to connect to your Qelos instance:

VariableDescriptionDefault
QELOS_URLYour Qelos instance URLhttp://localhost:3000
QELOS_USERNAMEYour Qelos usernametest@test.com
QELOS_PASSWORDYour Qelos passwordadmin

You can set these in your shell profile or use a .env file:

bash
export QELOS_URL=https://your-qelos-instance.com
export QELOS_USERNAME=your-username
export QELOS_PASSWORD=your-password

Quick Start

bash
# Install the CLI
npm install -g @qelos/plugins-cli

# Create a new plugin
qplay create my-plugin

# Pull components from your Qelos instance
qelos pull components ./my-components

# Pull blueprints
qelos pull blueprints ./my-blueprints

# Pull configurations
qelos pull config ./my-configs

# Make changes locally

# Push changes back to Qelos
qelos push components ./my-components
qelos push blueprints ./my-blueprints
qelos push config ./my-configs

Commands

Create

Create a new plugin project with all necessary scaffolding and configuration files.

Pull

Pull resources from your Qelos instance to your local filesystem for development.

Push

Push local resources back to your Qelos instance to update or create new items.

Use Cases

Local Development

The CLI enables you to:

  • Work on components locally with your preferred IDE and tools
  • Use version control (Git) for your components
  • Collaborate with team members on component development
  • Test components locally before deploying to production

Backup and Migration

bash
# Backup all resources from production
qelos pull components ./backups/components-$(date +%Y%m%d)
qelos pull blueprints ./backups/blueprints-$(date +%Y%m%d)
qelos pull config ./backups/configs-$(date +%Y%m%d)

# Migrate to a new instance
export QELOS_URL=https://new-instance.com
qelos push components ./backups/components-20241109
qelos push blueprints ./backups/blueprints-20241109
qelos push config ./backups/configs-20241109

Help

View all available commands and options:

bash
qelos --help
qplay --help

View help for a specific command:

bash
qelos create --help
qelos pull --help
qelos push --help

Troubleshooting

Authentication Issues

If you encounter authentication errors:

  1. Verify your environment variables are set correctly
  2. Ensure your credentials have the necessary permissions
  3. Check that your Qelos instance URL is accessible

Connection Issues

If the CLI cannot connect to your Qelos instance:

  1. Verify the QELOS_URL is correct and accessible
  2. Check your network connection
  3. Ensure your Qelos instance is running

File Permission Issues

If you encounter file permission errors:

  1. Ensure you have write permissions in the target directory
  2. Check that the directory path is valid
  3. Try using an absolute path instead of a relative path

Released under the Apache License 2.0.