The Forge Command Line Interface (CLI)

jamstack

#1

The Forge CLI is a powerful command line tool that enables you to perform many functions of the Forge service, direct from the developer’s favourite tool - the Terminal.

##Installation

Installing the CLI is easy, though not as easy as it will be in the future. From the command line.

$ git clone https://github.com/beachio/forge-cli.git

$ cd forge-cli

$ ruby install.rb

##Documentation & Options

Helpers

forge-cli -v
forge-cli --help

forge-cli <task> --help

Authentication
forge-cli login
will prompt for user email and password to authenticate

forge-cli login --email "[email protected]" --password "qwerty123"
login by passing your credentials

forge-cli logout
will logout and clear your session / stored credentials

Methods

forge-cli create
create a new forge site (subject to account limitations)

forge-cli create --name "hammer"
will create a site called

forge-cli create --name "hammerformac.com" --custom
create a custom domain (if allowed) with name hammerformac.com

forge-cli add hammerformac.com
will assign the remote site to the current directory

forge-cli deploy
deploy site to the linked remote destination (if present)

forge-cli deploy hammerformac.com
deploy the explicitly referenced site

forge-cli deploy -m "added new page"
deploy with version description message

forge-cli rollback
rollback related site to last version

forge-cli rollback --version "123"
rollback site to specified version (coming soon)

forge-cli versions
list all versions for the site (coming soon)

forge-cli sites
lists the sites available for current user

forge-cli init
create a hammer.json file in the project with forge configuration settings as needed…