UNPKG

6.53 kBMarkdownView Raw
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<!-- toc -->
11* [FAB Command Line Interface](#fab-command-line-interface)
12<!-- tocstop -->
13
14## Usage
15
16<!-- usage -->
17```sh-session
18$ npm install -g @fab/cli
19$ fab COMMAND
20running command...
21$ fab (-v|--version|version)
22@fab/cli/0.2.1 darwin-x64 node-v13.12.0
23$ fab --help [COMMAND]
24USAGE
25 $ fab COMMAND
26...
27```
28<!-- usagestop -->
29
30## Commands
31
32<!-- commands -->
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
42Generate a FAB given the config (usually in fab.config.json5)
43
44```
45USAGE
46 $ fab build
47
48OPTIONS
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
53EXAMPLES
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.2.1/lib/commands/build.js)_
59
60## `fab deploy [FILE]`
61
62Deploy a FAB to a hosting provider
63
64```
65USAGE
66 $ fab deploy [FILE]
67
68OPTIONS
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 --auto-install If you need dependent packages (e.g. @fab/deploy-*), install
81 them without prompting
82
83 --env=env Override production settings with a different environment
84 defined in your FAB config file.
85
86 --package-dir=package-dir Where to save the packaged FAB files (default .fab/deploy)
87
88 --server-host=(cf-workers|aws-lambda-edge|aws-s3) If you have multiple potential hosts for the server defined
89 in your fab.config.json5, which one to deploy to.
90
91EXAMPLE
92 $ fab deploy fab.zip
93```
94
95_See code: [lib/commands/deploy.js](https://github.com/fab-spec/fab/blob/v0.2.1/lib/commands/deploy.js)_
96
97## `fab help [COMMAND]`
98
99display help for fab
100
101```
102USAGE
103 $ fab help [COMMAND]
104
105ARGUMENTS
106 COMMAND command to show help for
107
108OPTIONS
109 --all see all commands in CLI
110```
111
112_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v2.2.1/src/commands/help.ts)_
113
114## `fab init`
115
116Auto-configure a repo for generating FABs
117
118```
119USAGE
120 $ fab init
121
122OPTIONS
123 -c, --config=config [default: fab.config.json5] Config filename
124 -h, --help show CLI help
125 -y, --yes Assume yes to all prompts (must be in the root directory of a project)
126 --skip-framework-detection Don't try to auto-detect framework, set up manually.
127 --skip-install Do not attempt to npm install anything
128 --version=version What NPM version or dist-tag to use for installing FAB packages
129
130EXAMPLES
131 $ fab init
132 $ fab init --config=fab.config.json5
133```
134
135_See code: [lib/commands/init.js](https://github.com/fab-spec/fab/blob/v0.2.1/lib/commands/init.js)_
136
137## `fab package [FILE]`
138
139Package a FAB to be uploaded to a hosting provider manually
140
141```
142USAGE
143 $ fab package [FILE]
144
145OPTIONS
146 -c, --config=config [default: fab.config.json5] Path to config file
147 -h, --help show CLI help
148
149 -t, --target=(cf-workers|aws-lambda-edge|aws-s3) Hosting provider (must be one of: cf-workers, aws-lambda-edge,
150 aws-s3)
151
152 --assets-url=assets-url A URL for where the assets can be accessed, for server deployers
153 that need it
154
155 --env=env Override production settings with a different environment defined in
156 your FAB config file.
157
158 --output-path=output-path Where to save the packaged FAB (default .fab/deploy/[target].zip)
159
160EXAMPLE
161 $ fab package --target=aws-lambda-edge fab.zip
162```
163
164_See code: [lib/commands/package.js](https://github.com/fab-spec/fab/blob/v0.2.1/lib/commands/package.js)_
165
166## `fab serve [FILE]`
167
168fab serve: Serve a FAB in a local NodeJS Express server
169
170```
171USAGE
172 $ fab serve [FILE]
173
174OPTIONS
175 -c, --config=config [default: fab.config.json5] Path to config file. Only used for SETTINGS in conjunction with
176 --env.
177
178 -h, --help show CLI help
179
180 --auto-install If you need dependent packages (e.g. @fab/serve), install them without prompting
181
182 --cert=cert SSL certificate to use
183
184 --env=env Override production settings with a different environment defined in your FAB config file.
185
186 --experimental-v8-sandbox Enable experimental V8::Isolate Runtime (in development, currently non-functional)
187
188 --key=key Key for the SSL Certificate
189
190 --port=port (required) [default: 3000] Port to use
191
192EXAMPLES
193 $ fab serve fab.zip
194 $ fab serve --port=3001 fab.zip
195 $ fab serve --cert=local-ssl.cert --key=local-ssl.key fab.zip
196 $ fab serve --env=staging fab.zip
197```
198
199_See code: [lib/commands/serve.js](https://github.com/fab-spec/fab/blob/v0.2.1/lib/commands/serve.js)_
200<!-- commandsstop -->