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:
npm install -g @qelos/plugins-cliAfter installation, the CLI will be available as both qelos and qplay commands:
qelos --version
qplay --versionConfiguration
Environment Variables
The CLI requires the following environment variables to connect to your Qelos instance:
| Variable | Description | Default |
|---|---|---|
QELOS_URL | Your Qelos instance URL | http://localhost:3000 |
QELOS_USERNAME | Your Qelos username | test@test.com |
QELOS_PASSWORD | Your Qelos password | admin |
You can set these in your shell profile or use a .env file:
export QELOS_URL=https://your-qelos-instance.com
export QELOS_USERNAME=your-username
export QELOS_PASSWORD=your-passwordQuick Start
# 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-configsCommands
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
# 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-20241109Help
View all available commands and options:
qelos --help
qplay --helpView help for a specific command:
qelos create --help
qelos pull --help
qelos push --helpTroubleshooting
Authentication Issues
If you encounter authentication errors:
- Verify your environment variables are set correctly
- Ensure your credentials have the necessary permissions
- Check that your Qelos instance URL is accessible
Connection Issues
If the CLI cannot connect to your Qelos instance:
- Verify the
QELOS_URLis correct and accessible - Check your network connection
- Ensure your Qelos instance is running
File Permission Issues
If you encounter file permission errors:
- Ensure you have write permissions in the target directory
- Check that the directory path is valid
- Try using an absolute path instead of a relative path
Related Resources
- SDK Installation - Install the Qelos SDK for programmatic access
- Plugin Development - Learn how to create plugins
- Components - Learn about Qelos components