1 | # FAB Command Line Interface
|
2 |
|
3 | `fab`: the CLI entry-point for the FAB ecosystem
|
4 |
|
5 | [![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)
|
6 | [![Version](https://img.shields.io/npm/v/@fab/cli.svg)](https://npmjs.org/package/@fab/cli)
|
7 | [![Downloads/week](https://img.shields.io/npm/dw/@fab/cli.svg)](https://npmjs.org/package/@fab/cli)
|
8 | [![License](https://img.shields.io/npm/l/@fab/cli.svg)](https://github.com/fab-spec/fab/blob/master/package.json)
|
9 |
|
10 |
|
11 | * [FAB Command Line Interface](#fab-command-line-interface)
|
12 |
|
13 |
|
14 | ## Usage
|
15 |
|
16 |
|
17 | ```sh-session
|
18 | $ npm install -g @fab/cli
|
19 | $ fab COMMAND
|
20 | running command...
|
21 | $ fab (-v|--version|version)
|
22 | @fab/cli/0.1.2 darwin-x64 node-v13.12.0
|
23 | $ fab --help [COMMAND]
|
24 | USAGE
|
25 | $ fab COMMAND
|
26 | ...
|
27 | ```
|
28 |
|
29 |
|
30 | ## Commands
|
31 |
|
32 |
|
33 | * [`fab build`](#fab-build)
|
34 | * [`fab deploy [FILE]`](#fab-deploy-file)
|
35 | * [`fab help [COMMAND]`](#fab-help-command)
|
36 | * [`fab init`](#fab-init)
|
37 | * [`fab package [FILE]`](#fab-package-file)
|
38 | * [`fab serve [FILE]`](#fab-serve-file)
|
39 |
|
40 | ## `fab build`
|
41 |
|
42 | Generate a FAB given the config (usually in fab.config.json5)
|
43 |
|
44 | ```
|
45 | USAGE
|
46 | $ fab build
|
47 |
|
48 | OPTIONS
|
49 | -c, --config=config [default: fab.config.json5] Path to config file
|
50 | -h, --help show CLI help
|
51 | --skip-cache Skip any caching of intermediate build artifacts
|
52 |
|
53 | EXAMPLES
|
54 | $ fab build
|
55 | $ fab build --config=fab.config.json5
|
56 | ```
|
57 |
|
58 | _See code: [lib/commands/build.js](https://github.com/fab-spec/fab/blob/v0.1.2/lib/commands/build.js)_
|
59 |
|
60 | ## `fab deploy [FILE]`
|
61 |
|
62 | Deploy a FAB to a hosting provider
|
63 |
|
64 | ```
|
65 | USAGE
|
66 | $ fab deploy [FILE]
|
67 |
|
68 | OPTIONS
|
69 | -c, --config=config [default: fab.config.json5] Path to config file
|
70 | -h, --help show CLI help
|
71 |
|
72 | --assets-already-deployed-at=assets-already-deployed-at Skip asset deploys and only deploy the server component
|
73 | pointing at this URL for assets
|
74 |
|
75 | --assets-host=(cf-workers|aws-lambda-edge|aws-s3) If you have multiple potential hosts for the assets defined
|
76 | in your fab.config.json5, which one to deploy to.
|
77 |
|
78 | --assets-only Skip server deploy, just upload assets
|
79 |
|
80 | --env=env Override production settings with a different environment
|
81 | defined in your FAB config file.
|
82 |
|
83 | --package-dir=package-dir Where to save the packaged FAB files (default .fab/deploy)
|
84 |
|
85 | --server-host=(cf-workers|aws-lambda-edge|aws-s3) If you have multiple potential hosts for the server defined
|
86 | in your fab.config.json5, which one to deploy to.
|
87 |
|
88 | EXAMPLE
|
89 | $ fab deploy fab.zip
|
90 | ```
|
91 |
|
92 | _See code: [lib/commands/deploy.js](https://github.com/fab-spec/fab/blob/v0.1.2/lib/commands/deploy.js)_
|
93 |
|
94 | ## `fab help [COMMAND]`
|
95 |
|
96 | display help for fab
|
97 |
|
98 | ```
|
99 | USAGE
|
100 | $ fab help [COMMAND]
|
101 |
|
102 | ARGUMENTS
|
103 | COMMAND command to show help for
|
104 |
|
105 | OPTIONS
|
106 | --all see all commands in CLI
|
107 | ```
|
108 |
|
109 | _See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v2.2.1/src/commands/help.ts)_
|
110 |
|
111 | ## `fab init`
|
112 |
|
113 | Auto-configure a repo for generating FABs
|
114 |
|
115 | ```
|
116 | USAGE
|
117 | $ fab init
|
118 |
|
119 | OPTIONS
|
120 | -c, --config=config [default: fab.config.json5] Config filename
|
121 | -h, --help show CLI help
|
122 | -y, --yes Assume yes to all prompts (must be in the root directory of a project)
|
123 | --skip-framework-detection Don't try to auto-detect framework, set up manually.
|
124 | --skip-install Do not attempt to npm install anything
|
125 | --version=version What NPM version or dist-tag to use for installing FAB packages
|
126 |
|
127 | EXAMPLES
|
128 | $ fab init
|
129 | $ fab init --config=fab.config.json5
|
130 | ```
|
131 |
|
132 | _See code: [lib/commands/init.js](https://github.com/fab-spec/fab/blob/v0.1.2/lib/commands/init.js)_
|
133 |
|
134 | ## `fab package [FILE]`
|
135 |
|
136 | Package a FAB to be uploaded to a hosting provider manually
|
137 |
|
138 | ```
|
139 | USAGE
|
140 | $ fab package [FILE]
|
141 |
|
142 | OPTIONS
|
143 | -c, --config=config [default: fab.config.json5] Path to config file
|
144 | -h, --help show CLI help
|
145 |
|
146 | -t, --target=(cf-workers|aws-lambda-edge|aws-s3) Hosting provider (must be one of: cf-workers, aws-lambda-edge,
|
147 | aws-s3)
|
148 |
|
149 | --assets-url=assets-url A URL for where the assets can be accessed, for server deployers
|
150 | that need it
|
151 |
|
152 | --env=env Override production settings with a different environment defined in
|
153 | your FAB config file.
|
154 |
|
155 | --output-path=output-path Where to save the packaged FAB (default .fab/deploy/[target].zip)
|
156 |
|
157 | EXAMPLE
|
158 | $ fab package --target=aws-lambda-edge fab.zip
|
159 | ```
|
160 |
|
161 | _See code: [lib/commands/package.js](https://github.com/fab-spec/fab/blob/v0.1.2/lib/commands/package.js)_
|
162 |
|
163 | ## `fab serve [FILE]`
|
164 |
|
165 | fab serve: Serve a FAB in a local NodeJS Express server
|
166 |
|
167 | ```
|
168 | USAGE
|
169 | $ fab serve [FILE]
|
170 |
|
171 | OPTIONS
|
172 | -c, --config=config [default: fab.config.json5] Path to config file. Only used for SETTINGS in conjunction with
|
173 | --env.
|
174 |
|
175 | -h, --help show CLI help
|
176 |
|
177 | --cert=cert SSL certificate to use
|
178 |
|
179 | --env=env Override production settings with a different environment defined in your FAB config file.
|
180 |
|
181 | --experimental-v8-sandbox Enable experimental V8::Isolate Runtime (in development, currently non-functional)
|
182 |
|
183 | --key=key Key for the SSL Certificate
|
184 |
|
185 | --port=port (required) [default: 3000] Port to use
|
186 |
|
187 | EXAMPLES
|
188 | $ fab serve fab.zip
|
189 | $ fab serve --port=3001 fab.zip
|
190 | $ fab serve --cert=local-ssl.cert --key=local-ssl.key fab.zip
|
191 | $ fab serve --env=staging fab.zip
|
192 | ```
|
193 |
|
194 | _See code: [lib/commands/serve.js](https://github.com/fab-spec/fab/blob/v0.1.2/lib/commands/serve.js)_
|
195 |
|