UNPKG

7.79 kBMarkdownView Raw
1# @bearer/cli
2
3Bearer CLI
4
5[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)
6[![Version](https://img.shields.io/npm/v/@bearer/cli.svg)](https://npmjs.org/package/@bearer/cli)
7![node (scoped)](https://img.shields.io/node/v/@bearer/cli.svg)
8![npm bundle size (scoped)](https://img.shields.io/bundlephobia/minzip/@bearer/cli.svg)
9[![Downloads/week](https://img.shields.io/npm/dw/@bearer/cli.svg)](https://npmjs.org/package/@bearer/cli)
10[![License](https://img.shields.io/npm/l/@bearer/cli.svg)](https://github.com/Bearer/bearer/packages/cli/blob/master/package.json)
11
12<!-- toc -->
13* [@bearer/cli](#bearercli)
14* [Usage](#usage)
15* [Commands](#commands)
16<!-- tocstop -->
17
18# Usage
19
20<!-- usage -->
21```sh-session
22$ npm install -g @bearer/cli
23$ bearer COMMAND
24running command...
25$ bearer (-v|--version|version)
26@bearer/cli/1.3.0-alpha.36+5e4d1746 darwin-x64 node-v10.15.2
27$ bearer --help [COMMAND]
28USAGE
29 $ bearer COMMAND
30...
31```
32<!-- usagestop -->
33
34# Commands
35
36<!-- commands -->
37* [`bearer autocomplete [SHELL]`](#bearer-autocomplete-shell)
38* [`bearer generate`](#bearer-generate)
39* [`bearer generate:component [NAME]`](#bearer-generatecomponent-name)
40* [`bearer generate:function [NAME]`](#bearer-generatefunction-name)
41* [`bearer help [COMMAND]`](#bearer-help-command)
42* [`bearer integrations`](#bearer-integrations)
43* [`bearer integrations:create`](#bearer-integrationscreate)
44* [`bearer invoke FUNCTION_NAME`](#bearer-invoke-function_name)
45* [`bearer link [INTEGRATION_IDENTIFIER]`](#bearer-link-integration_identifier)
46* [`bearer login`](#bearer-login)
47* [`bearer new [INTEGRATIONNAME]`](#bearer-new-integrationname)
48* [`bearer push`](#bearer-push)
49* [`bearer setup:auth [CREDENTIALS]`](#bearer-setupauth-credentials)
50* [`bearer start`](#bearer-start)
51
52## `bearer autocomplete [SHELL]`
53
54display autocomplete installation instructions
55
56```
57USAGE
58 $ bearer autocomplete [SHELL]
59
60ARGUMENTS
61 SHELL shell type
62
63OPTIONS
64 -r, --refresh-cache Refresh cache (ignores displaying instructions)
65
66EXAMPLES
67 $ bearer autocomplete
68 $ bearer autocomplete bash
69 $ bearer autocomplete zsh
70 $ bearer autocomplete --refresh-cache
71```
72
73_See code: [@oclif/plugin-autocomplete](https://github.com/oclif/plugin-autocomplete/blob/v0.1.0/src/commands/autocomplete/index.ts)_
74
75## `bearer generate`
76
77generate function
78
79```
80USAGE
81 $ bearer generate
82
83OPTIONS
84 -h, --help show CLI help
85 --path=path
86 --silent
87
88ALIASES
89 $ bearer g
90```
91
92_See code: [src/commands/generate/index.ts](https://github.com/Bearer/bearer/blob/v1.3.0-alpha.36+5e4d1746/src/commands/generate/index.ts)_
93
94## `bearer generate:component [NAME]`
95
96Generate a Bearer component
97
98```
99USAGE
100 $ bearer generate:component [NAME]
101
102OPTIONS
103 -h, --help show CLI help
104 -t, --type=blank|collection|root
105 --path=path
106 --silent
107
108ALIASES
109 $ bearer g:c
110```
111
112_See code: [src/commands/generate/component.ts](https://github.com/Bearer/bearer/blob/v1.3.0-alpha.36+5e4d1746/src/commands/generate/component.ts)_
113
114## `bearer generate:function [NAME]`
115
116Generate a Bearer Function
117
118```
119USAGE
120 $ bearer generate:function [NAME]
121
122OPTIONS
123 -h, --help show CLI help
124 --path=path
125 --silent
126
127ALIASES
128 $ bearer g:f
129```
130
131_See code: [src/commands/generate/function.ts](https://github.com/Bearer/bearer/blob/v1.3.0-alpha.36+5e4d1746/src/commands/generate/function.ts)_
132
133## `bearer help [COMMAND]`
134
135display help for bearer
136
137```
138USAGE
139 $ bearer help [COMMAND]
140
141ARGUMENTS
142 COMMAND command to show help for
143
144OPTIONS
145 --all see all commands in CLI
146```
147
148_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v2.1.6/src/commands/help.ts)_
149
150## `bearer integrations`
151
152list deployed integrations
153
154```
155USAGE
156 $ bearer integrations
157
158OPTIONS
159 -h, --help show CLI help
160 --path=path
161 --silent
162```
163
164_See code: [src/commands/integrations/index.ts](https://github.com/Bearer/bearer/blob/v1.3.0-alpha.36+5e4d1746/src/commands/integrations/index.ts)_
165
166## `bearer integrations:create`
167
168create a new Integration
169
170```
171USAGE
172 $ bearer integrations:create
173
174OPTIONS
175 -d, --description=description
176 -h, --help show CLI help
177 -l, --skipLink
178 -n, --name=name
179 --path=path
180 --silent
181```
182
183_See code: [src/commands/integrations/create.ts](https://github.com/Bearer/bearer/blob/v1.3.0-alpha.36+5e4d1746/src/commands/integrations/create.ts)_
184
185## `bearer invoke FUNCTION_NAME`
186
187invoke function locally
188
189```
190USAGE
191 $ bearer invoke FUNCTION_NAME
192
193OPTIONS
194 -d, --data=data
195 -f, --file=file
196 -h, --help show CLI help
197 --path=path
198 --silent
199```
200
201_See code: [src/commands/invoke.ts](https://github.com/Bearer/bearer/blob/v1.3.0-alpha.36+5e4d1746/src/commands/invoke.ts)_
202
203## `bearer link [INTEGRATION_IDENTIFIER]`
204
205link to remote Bearer integration
206
207```
208USAGE
209 $ bearer link [INTEGRATION_IDENTIFIER]
210
211OPTIONS
212 -h, --help show CLI help
213 --path=path
214 --silent
215```
216
217_See code: [src/commands/link.ts](https://github.com/Bearer/bearer/blob/v1.3.0-alpha.36+5e4d1746/src/commands/link.ts)_
218
219## `bearer login`
220
221login using Bearer credentials
222
223```
224USAGE
225 $ bearer login
226
227OPTIONS
228 -h, --help show CLI help
229 --path=path
230 --silent
231```
232
233_See code: [src/commands/login.ts](https://github.com/Bearer/bearer/blob/v1.3.0-alpha.36+5e4d1746/src/commands/login.ts)_
234
235## `bearer new [INTEGRATIONNAME]`
236
237generate integration boilerplate
238
239```
240USAGE
241 $ bearer new [INTEGRATIONNAME]
242
243OPTIONS
244 -a, --authType=OAUTH1|OAUTH2|BASIC|APIKEY|NONE|CUSTOM Authorization type
245 -d, --directory=directory Select a directory as source of the integration
246 -f, --force Force copying files
247 -h, --help show CLI help
248 -t, --template=template Generate an integration from a template (git url)
249 --path=path
250 --silent
251 --withViews Experimental - generate views
252```
253
254_See code: [src/commands/new.ts](https://github.com/Bearer/bearer/blob/v1.3.0-alpha.36+5e4d1746/src/commands/new.ts)_
255
256## `bearer push`
257
258deploy integration to Bearer
259
260```
261USAGE
262 $ bearer push
263
264OPTIONS
265 -h, --help show CLI help
266 --path=path
267 --silent
268```
269
270_See code: [src/commands/push.ts](https://github.com/Bearer/bearer/blob/v1.3.0-alpha.36+5e4d1746/src/commands/push.ts)_
271
272## `bearer setup:auth [CREDENTIALS]`
273
274setup API credentials for local development.
275
276```
277USAGE
278 $ bearer setup:auth [CREDENTIALS]
279
280ARGUMENTS
281 CREDENTIALS Provide inline credentials
282
283OPTIONS
284 -h, --help show CLI help
285 --path=path
286 --silent
287
288DESCRIPTION
289 If you would like to bypass the prompt, you can either:
290 * pass credentials as argument (see description later)
291 * use environment variables
292 see examples
293
294EXAMPLES
295 With argument
296 bearer setup:auth CLIENT_ID:CLIENT_SECRET
297 bearer setup:auth CONSUMER_KEY:CONSUMER_SECRET
298 bearer setup:auth USERNAME:PASSWORD
299 bearer setup:auth APIKEY
300 With environment variables
301 BEARER_AUTH_CLIENT_ID=CLIENT_ID BEARER_AUTH_CLIENT_SECRET=CLIENT_SECRET bearer setup:auth
302 BEARER_AUTH_CONSUMER_KEY=CONSUMER_KEY BEARER_AUTH_CONSUMER_SECRET=CONSUMER_SECRET bearer setup:auth
303 BEARER_AUTH_USERNAME=USERNAME BEARER_AUTH_CONSUMER_SECRET=PASSWORD bearer setup:auth
304 BEARER_AUTH_APIKEY=APIKEY bearer setup:auth
305```
306
307_See code: [src/commands/setup/auth.ts](https://github.com/Bearer/bearer/blob/v1.3.0-alpha.36+5e4d1746/src/commands/setup/auth.ts)_
308
309## `bearer start`
310
311start local development environment
312
313```
314USAGE
315 $ bearer start
316
317OPTIONS
318 -f, --force Start using random available port
319 -h, --help show CLI help
320 --no-install
321 --no-open
322```
323
324_See code: [src/commands/start.ts](https://github.com/Bearer/bearer/blob/v1.3.0-alpha.36+5e4d1746/src/commands/start.ts)_
325<!-- commandsstop -->