Dogstudio CLI
The Dogstudio CLI is developed to optimize and automate Dogstudio processes.
This is an example of the scaffold
command.
Table of Contents
Requirements
-
Node -
>= 12.0.0
Installation
$ npm i -g @dogstudio/cli
Install CLI...
$ npm upgrade -g @dogstudio/cli
Upgrade CLI to the latest version...
Authentication
The Dogstudio CLI commands perform tasks on services such as Github or Amazon Web Services.
The access to the services might require authentication. Follow the instructions to authenticate.
Github
The Dogstudio CLI commands perform tasks on Github to create repositories, create releases, and more...
You have to provide a valid Personal Access Token to be able to run commands.
- Follow the Github instructions to create a new Personal Access Token
- Make sure to select No expiration
- Make sure to check repo and admin:org
- Run the
dogstudio login
command- Select Github
- Provide your Github username
- Provide your Github email
- Provide your Github Personal Access Token
- Done!
The command will save the Github information in a ~/.dogstudio.json
file.
The file can be edited manually with an IDE or with the dogstudio login
command.
Amazon Web Services
The Dogstudio CLI commands perform tasks on Amazon Web Services – or AWS – to create buckets, and more...
You have to provide active Access Key ID and Secret Access Key to be able to run commands.
- Follow the Amazon Web Services instructions to generate a pair of Access Keys
- An active Access Key ID should have been shared with you
- An active Secret Access Key should has been shared with you
- But... You can create a new pair of Access Keys when needed
- Run the
dogstudio login
command- Select Amazon Web Services
- Provide a profile name or use the
default
name - Provide your Access Key ID
- Provide your Secret Access Key
- Done!
You now have everything setup and all Dogstudio CLI commands should perform as expected.
You can share authentication issues with devops@dogstudio.be.
Getting Started
$ dogstudio [COMMAND]
Run command...
$ dogstudio --version
Return CLI version...
$ dogstudio --help [COMMAND]
Return command instructions...
Commands
dogstudio host
Create a new environment on AWS. Only supports Vue project for now.
Documentation
USAGE
$ dogstudio host
DESCRIPTION
Create a new environment on AWS
COMMANDS
host set-aws-auth Secure an AWS CloudFront distribution
host set-aws-bucket Create a new AWS S3 bucket
host set-aws-distribution Create / Edit an AWS CloudFront distribution
host set-aws-record Create / Edit an AWS Route 53 record
host set-aws-workflow Create an AWS Github workflow
Questions
- What AWS bucket name do you want to use? - Provide the name of the AWS S3 bucket to create
-
What AWS distribution alias domain do you want to use? - Provide a
*.dogstudio-dev.co
alias domain name - What AWS workflow do you need? - Select the Github workflow to use to deploy to the AWS S3 bucket
- Do you want to enable authentication? - Choose to enable basic user / pass authentication
dogstudio host set-aws-auth
Secure an AWS CloudFront distribution
Documentation
USAGE
$ dogstudio host set-aws-auth
DESCRIPTION
Secure an AWS CloudFront distribution
Questions
- What AWS distribution do you want to secure? - Provide the ID of the AWS CloudFront distribution to secure
- What AWS function name do you want to use? - Provide the name of the AWS Lambda function to use / create
dogstudio host set-aws-bucket
Create a new AWS S3 bucket
Documentation
USAGE
$ dogstudio host set-aws-bucket
DESCRIPTION
Create a new AWS S3 bucket
Questions
- What AWS bucket name do you want to use? - Provide the name of the AWS S3 bucket to create
dogstudio host set-aws-distribution
Create / Edit an AWS CloudFront distribution
Documentation
USAGE
$ dogstudio host set-aws-distribution
DESCRIPTION
Create / Edit an AWS CloudFront distribution
Questions
- Do you want to create a new AWS distribution? - Choose to edit an existing AWS CloudFront distribution
- What AWS distribution do you want to use? - Provide the ID of an existing AWS CloudFront distribution to use
- What AWS bucket name do you want to use? - Provide the name of an existing AWS S3 bucket to use
-
What AWS distribution alias domain do you want to use? - Provide a
*.dogstudio-dev.co
alias domain name
dogstudio host set-aws-record
Create / Edit an AWS Route 53 record
Documentation
USAGE
$ dogstudio host set-aws-record
DESCRIPTION
Create / Edit an AWS Route 53 record
Questions
-
What AWS distribution alias domain do you want to use? - Provide a
*.dogstudio-dev.co
alias domain name - What AWS distribution domain name do you want to use? - Provide the domain name of an AWS distribution
dogstudio host set-aws-workflow
Create an AWS Github workflow
Documentation
USAGE
$ dogstudio host set-aws-workflow
DESCRIPTION
Create an AWS Github workflow
Questions
- What AWS distribution do you want to use? - Provide the ID of an existing AWS CloudFront distribution to use
- What AWS bucket name do you want to use? - Provide the name of an existing AWS S3 bucket to use
- What AWS workflow do you need? - Select the Github workflow to use to deploy to the AWS S3 bucket
dogstudio login
Create CLI services credentials
Documentation
USAGE
$ dogstudio login
DESCRIPTION
Create CLI services credentials
Questions
-
Github
- What is your Github user? - Provide a valid Github username
- What is your Github email? - Provide a valid Github email address
- What is your Github token? - Provide a valid Github Personal Access Token
-
Amazon Web Services
- What is your AWS profile name? - Provide a credentials profile name
- What is your AWS access key ID? - Provide an active Access Key ID
- What is your AWS secret access key? - Provide an active Secret Access Key
dogstudio addon
Install add-ons in a Dogstudio project
Documentation
USAGE
$ dogstudio addon
DESCRIPTION
Install add-ons in a Dogstudio project
Questions
- What add-ons do you want to install? - Select one or multiple available add-ons to install
dogstudio release
Create a new Dogstudio project release on Github
Documentation
USAGE
$ dogstudio release
DESCRIPTION
Create a new Dogstudio project release
Questions
- What branch do you want to release? - Select the branch to deploy
- What version do you want to release? - Select the type of version to deploy
dogstudio scaffold
Scaffold a new Dogstudio project
Documentation
USAGE
$ dogstudio scaffold
DESCRIPTION
Scaffold a new Dogstudio project
Questions
- What is the name of the project? - Provide the name of the project
- What is the description of the project? - Provide the description of the project
- What is the type of the project? - Select the type of the project
- What add-ons do you want to install? - Select one or multiple available add-ons to install
- Do you want to create a Github repository? - Choose to create a new Github repository
Contributing
Please submit issues, pull requests or contact us. We are open to all kind of contributions.
License
The dogstudio-cli
repository is MIT licensed.