Here at Pagely, we fully embrace developer workflows and want to help you get things done as quickly as possible. In many cases, making changes from within a command line environment can be much faster than clicking through a GUI.
For those who prefer a command line interface for managing your sites at Pagely, we have the Atomic client, which offers many of the same functions as the Atomic control panel.
This guide serves as a quick overview of how you can get started with the Atomic client.
- PHP 7.1+
Downloading and Installing the Atomic Client
The Atomic client is available on GitHub and can be cloned by running the following:
git clone email@example.com:pagely/atomic-client.git
After the repository has been cloned, switch to the directory it was cloned into like this:
Then install the dependencies by running the following:
- (Optional) If you would like to enable auto-completion and add the Atomic client to your $PATH variables so that you can access it from anywhere, copy and paste the following:
./bin/atomic _completion --generate-hook --program atomic >> ~/.bashrc && echo "PATH=$PWD/bin:\$PATH" >> ~/.bashrc
Exploring the Atomic Client
As we mentioned earlier in the article, this article is intended to get you started quickly, without going over all of the details. Here's a few commands to get you started.
Listing Available Commands
To find a listing of the available actions that you can perform inside the Atomic client, just use the
list command like this:
Here's a quick look at the output of the
Usage: command [options] [arguments] Options: -h, --help Display this help message -q, --quiet Do not output any message -V, --version Display this application version --ansi Force ANSI output --no-ansi Disable ANSI output -n, --no-interaction Do not ask any interactive question --no-time-limit Prevent the command from ending at the regular time limit -v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug Available commands: _completion BASH completion hook. help Displays help for a command list Lists commands account account:ssh:add Add a ssh key for an account - feed ssh key in via stdin apps apps:alias:search Find aliases apps:create Create new app apps:disable Disable/Deactivate App apps:domain:add Add a domain name to an app apps:domain:make-primary Set the primary alias for an app apps:domain:remove Remove a domain name from an app apps:get Get specific app by ID apps:git-integration:create Create new git integration apps:git-integration:delete Delete git integration apps:git-integration:get Get a git integration for a specific app apps:ls List Apps for an account apps:remove Remove App (must be disabled first) auth auth:client-login Login using client id & secret and save access token auth:login Login and get save access token auth:logout ssl ssl:cert Get certificate & linked apps (aliases) ssl:cert:activate Marks a certificate as active for a specific app ssl:cert:add Import a cert with an existing CSR ssl:cert:import Import a new SSL cert ssl:cert:link Link certificate to domain ssl:cert:linked List certificates linked to apps ssl:cert:ls List certificates for account and/or app ssl:cert:update Update cert config for a app/alias ssl:csr:create Generate a CSR ssl:csr:ls List CSRs for an account ssl:le:cert Generates letsencrypt certificate ssl:le:register Begins certificate registration process for domain via letsencrypt ssl:le:renew Renew single LE Cert for a domain
Getting More Information On a Command
If you want more information about a particular command that's available, you can use the
help command like this:
atomic help apps:get
Running this example will provide you with more information on the command, such as usage information, arguments, and available options.
Here's what the output would look like if we ran the example that we mentioned above:
Usage: apps:get [options] [--] Arguments: appId App ID Options: --ips Return array of custom IPs & cnames --authToken=AUTHTOKEN Access Token --authClientId=AUTHCLIENTID OAuth Client ID [default: 2] --authClientSecret=AUTHCLIENTSECRET Client Secret --authUsername=AUTHUSERNAME Username --authPassword=AUTHPASSWORD Password --authMfa=AUTHMFA MFA Code --authScope=AUTHSCOPE Scopes (multiple values allowed) -h, --help Display this help message -q, --quiet Do not output any message -V, --version Display this application version --ansi Force ANSI output --no-ansi Disable ANSI output -n, --no-interaction Do not ask any interactive question --no-time-limit Prevent the command from ending at the regular time limit -v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug Help: Get specific app by ID