UNPKG

1.8 kBMarkdownView Raw
1# gig-cli
2
3Gig CLI creates a command called `gig` which allows you to `init`, `generate`, and `deploy` applications.
4
5## Commands
6
7Command | Description
8-----------|------------
9`config` | Prompts the user to configure the CLI.
10`deploy` | Deploys a gig to an environment.
11`init` | Initializes a project config in the current directory.
12`generate` | Generates a project from a configuration.
13`update` | Checks if there is an update for the CLI and installs it.
14
15### `config`
16
17Usage:
18
19```shell
20$ gig config
21```
22
23Options:
24 * `--only-new` (default false): When provided, will only prompt the user for new entries in the config.
25
26Examples:
27
28```shell
29$ gig config
30? autoupdate: true
31? packageManager: yarn
32? gitProtocol: ssh
33Successfully updated the global config.
34
35$ gig config --only-new
36```
37
38### `deploy`
39
40To deploy a service, just specify the service name and environment. For example:
41``` shell
42$ gig deploy api staging
43```
44
45You will be expected to have a Dockerfile in the root directory. To create a simple one, in the project folder, run:
46```shell
47$ echo "FROM nginx:1.13.5-alpine" > ./Dockerfile
48```
49
50### `init`
51
52Initializes a project `config` in the current directory.
53
54Usage:
55
56```shell
57$ gig init
58```
59
60Examples:
61
62```shell
63# Initializes a project with the latest `blank` template.
64$ gig init
65```
66
67### `generate`
68
69Generates either an entire project or a specific block.
70
71Usage:
72
73```shell
74$ gig generate <block>
75```
76
77Options:
78 * `block` (optional): When provided, will generate only a specific block. Otherwise, it generates the entire project.
79
80Examples:
81
82```shell
83# Generates the entire project.
84$ gig generate
85
86# Generates only the `api` block.
87$ gig generate api
88
89# Generates only the `deployment`.
90$ gig generate deployment
91```
92
93### `update`
94
95Usage:
96
97```shell
98$ gig update
99```