Ready to turn your terminal into a mission control center? Skyversal CLI is designed so you never have to take your hands off the keyboard while deploying code or managing your servers. Fasten your seatbelts for a faster, safer, and fully automated developer experience.
🚀 What is Skyversal CLI and Why Use It?
As developers, we spend most of our time in the terminal. So why switch to a browser tab for server management or deployments? That's where Skyversal CLI shines. Whether you are configuring projects, tailing server logs, backing up databases, or pushing a new release to production; everything is just a few keystrokes away.
Why Skyversal CLI?
- ✓ Zero Downtime: Easily integrates into your CI/CD pipelines.
- ✓ Speed: Do in 10 seconds from the terminal what takes 10 minutes in a UI.
- ✓ Advanced Control: Direct access to server logs, artisan commands, and PM2 processes.
🛠️ Installation and First Steps
Skyversal CLI works as a universal package on your system. You can use your favorite package manager to install it:
npm install -g @skyversal/cli
# Or if you use yarn:
yarn global add @skyversal/cli
Once the installation is complete, you need to connect to your Skyversal account from your terminal. Run the following command to generate a secure token:
skyversal login
Note: This command will open your browser and allow you to securely log in. Once done, your authorization key (token) is automatically assigned to your terminal.
⚡ Basic and Advanced Commands
Initializing a Project (Init)
To prepare a new project for the Skyversal infrastructure, run the init command in your project directory. This will generate a skyversal.json file, allowing you to customize your deployment settings.
skyversal init
The Magic Word: Deploy
Your project is ready and the code is tested. It's time to go live! All you need to do is:
skyversal deploy
This command packages your project, transfers it to the server, installs dependencies (vendor/node_modules), and goes live with zero downtime. If you want to deploy to a specific environment: skyversal deploy --env production
Watchtower (Logs)
Are things going wrong on your server? No need to leave the terminal to monitor your logs in real-time.
skyversal logs --tail 100
Rewinding Time (Rollback)
Sometimes a deployed code can cause issues. Don't panic, you can turn back time in seconds:
skyversal rollback
⚠️ Bug Hunting: Common Situations
1. "Unauthorized: Token Expired"
Your developer key may have expired. The solution is simple: First type skyversal logout to delete the old key, then reconnect with skyversal login.
2. "skyversal.json Not Found"
Your configuration file is missing in the folder you are trying to deploy. Make sure you are in the root directory or reconfigure it with skyversal init.