https://orbiter.host/orbiter.pngOfficial documentation for Orbiter Skip to content

CLI

A CLI for creating and managing static sites on Orbiter

Before installing make sure you already have an account; sign up at app.orbiter.host.

Installation

The orbiter-cli is an NPM package you can download with manager of choice.

Terminal window
npm i -g orbiter-cli

Confirm that it was installed successfully by running the main command

Terminal window
orbiter

Usage

Running the orbiter command will reveal the available subcommands

Terminal window
orbiter <subcommand>
> Upload and deploy static sites with Orbiter.host
where <subcommand> can be one of:
- login - Login with OAuth
- create - Upload and create a new site on Orbiter
- list - List existing sites for your account
- update - Update a site with a new file or folder
- delete - Delete an existing site
For more help, try running `orbiter <subcommand> --help`

login

Start by running login including your --provider (shorthand -p) of choice (google or github)

Terminal window
orbiter login --provider google

create

Uploads and create a new site on Orbiter. Must include the --domain or -d for the default subdomain of the site. After providing a name give the path to the file or folder of the website you are creating, must contain an index.html file.

Terminal window
orbiter create --domain mysite ./dist

After sucessfull creation the CLI will return the URL of the new site.

Site created: https://mysite.orbiter.website

list

List all sites currently on your Orbiter account. You can filter by domain with -d followed by the subdomain of the site.

Terminal window
orbiter list

This will return the following JSON response from the API:

{
data: [
{
id: 'string',
created_at: 'string',
organization_id: 'string',
cid: 'string',
domain: 'string',
site_contract: 'string',
updated_at: 'string',
deployed_by: 'string',
custom_domain: 'string',
domain_ownership_verified: boolean,
ssl_issued: boolean
}
]
}

update

Update an existing site with a file or folder. You can target a site with either the --siteId | -s or the --domain | -d (subdomain) followed by the updated folder or file. Both the subdomain and site ID can be found by using orbiter list.

Terminal window
orbiter update --siteId a5dae6af-ad43-4bb3-bdab-3a4d41b573cc ./new-dist
orbiter update --domain astro-demo ./new-dist

versions

List previous versions of a site for a given subdomain, ie <subdomain>.orbiter.website. the cid listed in the response can be used in rollback to rollback a site to a previous version.

orbiter versions <subdomain>

This will return the following object

{
data: [
{
id: 'string',
site_id: 'string',
created_at: 'string',
organization_id: 'string',
cid: 'string',
domain: 'string',
site_contract: 'string',
version_number: number,
deployed_by: 'string'
},
]
}

rollback

Rollback a site to a previous version using the subdomain and the cid of the previous version to update it. Use versions to get the previous versions for a site.

orbiter rollback <subdomain> <cid>

delete

Delete an existing site using the site ID which can be obtained by using orbiter list

Terminal window
orbiter delete bac0b100-1f5f-4c64-8cfa-a8ae9b22671

Contact

If you have any issues or questions feel free to reach out!

[email protected]