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

1

Open PowerShell as Administrator.

2

Run the following command.

Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
3

Confirm the change by typing Y and pressing Enter.

4

Restart PowerShell and try running Discloud CLI commands again.


🔧 Installing the Discloud CLI

1

Prerequisite.

Ensure you have NodeJS installed on your system.

2

Install the CLI.

npm install -g discloud.app
3

Reopen the terminal to apply the changes.

4

Verify Installation.

After installation, run the following command to verify if the CLI was installed correctly:

discloud --version

CLI Update

To update the CLI, run the following command:

npm update -g discloud-cli
5

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

Official CLI Repository

The NodeJS CLI is an open-source project. You can contribute, report bugs, and suggest improvements in the official repository.


🚀 Deploying Your Application

Once installed and configured, you can deploy your application in just a few steps.

1

Preparing your project.

2

Uploading your application.

To deploy your project, navigate to your application folder and run:

discloud up
  • The CLI will automatically compress your project and upload it.

  • Once completed, your application will start running on Discloud.

To check your app status, use:

discloud status

📌 Tips & Tricks

Using discloud init to Auto-Generate Configuration

Instead of manually creating the discloud.config file, you can generate it automatically using:

discloud init
  • This command prompts you to enter basic configuration details (e.g., name, main file, RAM, etc).

  • It then generates the discloud.config file 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