1 | # @bearer/cli
|
2 |
|
3 | Bearer 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 |
|
13 | * [@bearer/cli](#bearercli)
|
14 | * [Usage](#usage)
|
15 | * [Commands](#commands)
|
16 |
|
17 |
|
18 | # Usage
|
19 |
|
20 |
|
21 | ```sh-session
|
22 | $ npm install -g @bearer/cli
|
23 | $ bearer COMMAND
|
24 | running 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]
|
28 | USAGE
|
29 | $ bearer COMMAND
|
30 | ...
|
31 | ```
|
32 |
|
33 |
|
34 | # Commands
|
35 |
|
36 |
|
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 |
|
54 | display autocomplete installation instructions
|
55 |
|
56 | ```
|
57 | USAGE
|
58 | $ bearer autocomplete [SHELL]
|
59 |
|
60 | ARGUMENTS
|
61 | SHELL shell type
|
62 |
|
63 | OPTIONS
|
64 | -r, --refresh-cache Refresh cache (ignores displaying instructions)
|
65 |
|
66 | EXAMPLES
|
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 |
|
77 | generate function
|
78 |
|
79 | ```
|
80 | USAGE
|
81 | $ bearer generate
|
82 |
|
83 | OPTIONS
|
84 | -h, --help show CLI help
|
85 | --path=path
|
86 | --silent
|
87 |
|
88 | ALIASES
|
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 |
|
96 | Generate a Bearer component
|
97 |
|
98 | ```
|
99 | USAGE
|
100 | $ bearer generate:component [NAME]
|
101 |
|
102 | OPTIONS
|
103 | -h, --help show CLI help
|
104 | -t, --type=blank|collection|root
|
105 | --path=path
|
106 | --silent
|
107 |
|
108 | ALIASES
|
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 |
|
116 | Generate a Bearer Function
|
117 |
|
118 | ```
|
119 | USAGE
|
120 | $ bearer generate:function [NAME]
|
121 |
|
122 | OPTIONS
|
123 | -h, --help show CLI help
|
124 | --path=path
|
125 | --silent
|
126 |
|
127 | ALIASES
|
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 |
|
135 | display help for bearer
|
136 |
|
137 | ```
|
138 | USAGE
|
139 | $ bearer help [COMMAND]
|
140 |
|
141 | ARGUMENTS
|
142 | COMMAND command to show help for
|
143 |
|
144 | OPTIONS
|
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 |
|
152 | list deployed integrations
|
153 |
|
154 | ```
|
155 | USAGE
|
156 | $ bearer integrations
|
157 |
|
158 | OPTIONS
|
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 |
|
168 | create a new Integration
|
169 |
|
170 | ```
|
171 | USAGE
|
172 | $ bearer integrations:create
|
173 |
|
174 | OPTIONS
|
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 |
|
187 | invoke function locally
|
188 |
|
189 | ```
|
190 | USAGE
|
191 | $ bearer invoke FUNCTION_NAME
|
192 |
|
193 | OPTIONS
|
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 |
|
205 | link to remote Bearer integration
|
206 |
|
207 | ```
|
208 | USAGE
|
209 | $ bearer link [INTEGRATION_IDENTIFIER]
|
210 |
|
211 | OPTIONS
|
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 |
|
221 | login using Bearer credentials
|
222 |
|
223 | ```
|
224 | USAGE
|
225 | $ bearer login
|
226 |
|
227 | OPTIONS
|
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 |
|
237 | generate integration boilerplate
|
238 |
|
239 | ```
|
240 | USAGE
|
241 | $ bearer new [INTEGRATIONNAME]
|
242 |
|
243 | OPTIONS
|
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 |
|
258 | deploy integration to Bearer
|
259 |
|
260 | ```
|
261 | USAGE
|
262 | $ bearer push
|
263 |
|
264 | OPTIONS
|
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 |
|
274 | setup API credentials for local development.
|
275 |
|
276 | ```
|
277 | USAGE
|
278 | $ bearer setup:auth [CREDENTIALS]
|
279 |
|
280 | ARGUMENTS
|
281 | CREDENTIALS Provide inline credentials
|
282 |
|
283 | OPTIONS
|
284 | -h, --help show CLI help
|
285 | --path=path
|
286 | --silent
|
287 |
|
288 | DESCRIPTION
|
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 |
|
294 | EXAMPLES
|
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 |
|
311 | start local development environment
|
312 |
|
313 | ```
|
314 | USAGE
|
315 | $ bearer start
|
316 |
|
317 | OPTIONS
|
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 |
|