Permalink
Fetching contributors…
Cannot retrieve contributors at this time
240 lines (150 sloc) 4.4 KB
title description headerTitle layout weight
Using the Command-line
The WeDeploy Command-Line Interface is a tool for helping you to use the WeDeploy platform by providing support for things like creating, managing, and scaling applications.
Intro
guide
4

Using the CLI

{$page.description}

Install

If you use a Unix-like system such as macOS or Linux, open your terminal and run:

curl https://cdn.wedeploy.com/cli/latest/wedeploy.sh -fsSL | bash

Then try running we. You should be able to see the help.

In case of error, try to install it using sudo:

curl https://cdn.wedeploy.com/cli/latest/wedeploy.sh -fsSL | sudo bash

If you use Windows, check the Windows amd64 installer. For other systems, see a list of all builds available.

For deploying services you must have Git installed on your system (download).

Check for new releases to our CLI on our Updates page.

Create projects or services

To create a new project or service on your account:

we new

You can follow the prompts to choose whether you want to create a service or project, or simply add a flag:

Create new service

we new service

Create new project

we new project

Deploy projects or services

To deploy a folder using a random project ID, type:

we deploy

Deploy a folder to a specific project:

we deploy --project <projectID>

Deploy to a specific service inside of a project:

we deploy --project <projectID> --service <serviceID>

Alternatively, you can deploy to a service by passing the full URL:

we deploy --url <serviceID>-<projectID>.wedeploy.io

Show logs of the services

You can check the logs of an entire project:

we log --project <projectID>

Or you can see the logs of a specific service inside of a project:

we log --project <projectID> --service <serviceID>

Alternatively, you can see the logs of a service by passing the full URL:

we log --url <serviceID>-<projectID>.wedeploy.io

Manage custom domains

Get the list of custom domains for a particular service:

we domain --project <projectID> --service <serviceID>

Add a custom domain to a service:

we domain add example.com --project <projectID> --service <serviceID>

Remove custom domain from a service:

we domain rm example.com --project <projectID> --service <serviceID>

Alternatively, you can run those same commands by passing the full URL:

we domain --url <serviceID>-<projectID>.wedeploy.io

Manage environment variables

Get the list of environment variables for a particular service:

we env --project <projectID> --service <serviceID>

Add an environment variable to a service:

we env set SOME_KEY somevalue --project <projectID> --service <serviceID>

Remove environment variable from a service:

we env rm SOME_KEY --project <projectID> --service <serviceID>

Alternatively, you can run those same commands by passing the full URL:

we env --url <serviceID>-<projectID>.wedeploy.io

List projects or services

See the full list of projects and services you own or participate with:

we list

List the services that are contained on a project:

we list --project <projectID>

Check a specific service inside of a project:

we list --project <projectID> --service <serviceID>

Alternatively, check a specific service by passing the full URL:

we list --url <serviceID>-<projectID>.wedeploy.io

Delete projects or services

You can delete an entire project:

we delete --project <projectID>

Or you can delete a specific service inside of a project:

we delete --project <projectID> --service <serviceID>

Alternatively, you can delete a service by passing the full URL:

we delete --url <serviceID>-<projectID>.wedeploy.io

What's next?