CLI
Learn how to host your applications quickly and easily using one of our CLIs.
The Discloud CLI allows you to deploy and manage your applications directly from the command line, providing a fast and efficient way to interact with your app.
🔑 Windows Execution Policy (Only for Windows Users)
🛠️ What is Execution Policy?
The Execution Policy protects your system by limiting the execution of unsigned scripts. The RemoteSigned mode allows local scripts to run without signatures but requires a signature for scripts downloaded from the internet.
❓ How to Enable Script Execution
Open PowerShell as Administrator.
Run the following command.
Set-ExecutionPolicy RemoteSigned -Scope CurrentUserConfirm the change by typing Y and pressing Enter.
Restart PowerShell and try running Discloud CLI commands again.
🔧 Installing the Discloud CLI
Prerequisite.
Ensure you have Node.js installed on your system.
Install the CLI.
npm install -g discloud-cliReopen the terminal to apply the changes.
Login.
To access CLI functionalities, you need to log in with your Discloud credentials. Run the following command and paste your Discloud API Token:
discloud login🚀 Deploying Your Application
Once installed and configured, you can deploy your application in just a few steps.
Preparing your project.
Ensure your project contains all required files:
discloud.config(configuration file).Necessary dependencies for your programming language (e.g.,
package.jsonfor Node.js,requirements.txtfor Python).
Check the Languages Guide to make sure your project is properly structured.
🧰 Other useful commands
discloud app info
Shows information about your applications.
discloud app logs <APPLICATION_ID>
Shows the application logs.
discloud app commit <APPLICATION_ID>
Updates the application files. See How to commit?
discloud app restart <APPLICATION_ID>
Restarts the application.
discloud app stop <APPLICATION_ID>
Stops the application.
discloud app start <APPLICATION_ID>
Starts the application.
discloud --help
Lists all CLI commands.
📌 Tips & Tricks
✨ Using discloud init to Auto-Generate Configuration
Instead of manually creating the discloud.config file, you can generate it automatically using:
This command prompts you to enter basic configuration details (e.g., name, main file, RAM, etc).
It then generates the
discloud.configfile for you, making deployment easier.
📂 Using .discloudignore to Exclude Files
If you want to exclude certain files or directories from being uploaded, you can create a .discloudignore file in the root of your project.
❓ Still need help?
Check the FAQ Section or join our Discord Server for support.
Last updated