orbiter-cli v0.5.1
orbiter-cli
A CLI for creating and managing static sites on Orbiter
!WARNING README is still a work in progress
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.
npm i -g orbiter-cli
Confirm that it was installed successfully by running the main command
orbiter
Usage
Running the orbiter
command will reveal the available subcommands
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
)
orbiter login --provider google
auth
An alternative way to authenticate the CLI is with an Orbiter API key. This can be obtained at app.orbiter.host/api-keys. You can either just run orbiter auth
and it will prompt you for the key and not display it visibly, or if you're using the CLI in an automation you can use the --key
flag.
orbiter auth # Will prompt you for the key
orbiter auth --key <YOUR_API_KEY> # Will bypass the prompt and authorize
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.
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.
!TIP Use this command to get the site ID for a site you want to update
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
.
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
orbiter delete bac0b100-1f5f-4c64-8cfa-a8ae9b22671
Contact
If you have any issues or questions feel free to reach out!
3 months ago
4 months ago
4 months ago
4 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago