Skip to content

Commit c5626c2

Browse files
author
Kira272921
committed
🚀 feat: publish to npmjs
1 parent 771e069 commit c5626c2

File tree

3 files changed

+278
-14
lines changed

3 files changed

+278
-14
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2019 Salesforce
3+
Copyright (c) 2022 Kira
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 275 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,24 @@ USAGE
2222
# Commands
2323

2424
<!-- commands -->
25-
26-
- [`snipli create`](#snipli-create)
27-
- [`snipli delete`](#snipli-delete)
28-
- [`snipli edit`](#snipli-edit)
29-
- [`snipli help [COMMAND]`](#snipli-help-command)
30-
- [`snipli id`](#snipli-id)
31-
- [`snipli login`](#snipli-login)
32-
- [`snipli logout`](#snipli-logout)
33-
- [`snipli plugins`](#snipli-plugins)
34-
- [`snipli read`](#snipli-read)
35-
- [`snipli whoami`](#snipli-whoami)
25+
* [`snipli create`](#snipli-create)
26+
* [`snipli delete`](#snipli-delete)
27+
* [`snipli edit`](#snipli-edit)
28+
* [`snipli help [COMMAND]`](#snipli-help-command)
29+
* [`snipli id`](#snipli-id)
30+
* [`snipli login`](#snipli-login)
31+
* [`snipli logout`](#snipli-logout)
32+
* [`snipli plugins`](#snipli-plugins)
33+
* [`snipli plugins:install PLUGIN...`](#snipli-pluginsinstall-plugin)
34+
* [`snipli plugins:inspect PLUGIN...`](#snipli-pluginsinspect-plugin)
35+
* [`snipli plugins:install PLUGIN...`](#snipli-pluginsinstall-plugin-1)
36+
* [`snipli plugins:link PLUGIN`](#snipli-pluginslink-plugin)
37+
* [`snipli plugins:uninstall PLUGIN...`](#snipli-pluginsuninstall-plugin)
38+
* [`snipli plugins:uninstall PLUGIN...`](#snipli-pluginsuninstall-plugin-1)
39+
* [`snipli plugins:uninstall PLUGIN...`](#snipli-pluginsuninstall-plugin-2)
40+
* [`snipli plugins:update`](#snipli-pluginsupdate)
41+
* [`snipli read`](#snipli-read)
42+
* [`snipli whoami`](#snipli-whoami)
3643

3744
## `snipli create`
3845

@@ -54,6 +61,8 @@ EXAMPLES
5461
$ snipli create --file=code.ts --description='Need help at line 59 of file code.ts' --public
5562
```
5663

64+
_See code: [dist/src/commands/create.ts](https://github.com/Kira272921/snipli/blob/v1.0.0/dist/src/commands/create.ts)_
65+
5766
## `snipli delete`
5867

5968
🚚 Delete a gist
@@ -72,6 +81,8 @@ EXAMPLES
7281
$ snipli delete --id=bfce776b3ad1145f764d89c296fec605
7382
```
7483

84+
_See code: [dist/src/commands/delete.ts](https://github.com/Kira272921/snipli/blob/v1.0.0/dist/src/commands/delete.ts)_
85+
7586
## `snipli edit`
7687

7788
✏ Edit an existing gist
@@ -93,6 +104,8 @@ EXAMPLES
93104
$ snipli edit --id=ca22a324f761cd241ace4c9a35286496 --file=updated-code.ts --description='Updated the code' --public
94105
```
95106

107+
_See code: [dist/src/commands/edit.ts](https://github.com/Kira272921/snipli/blob/v1.0.0/dist/src/commands/edit.ts)_
108+
96109
## `snipli help [COMMAND]`
97110

98111
Display help for snipli.
@@ -111,6 +124,8 @@ DESCRIPTION
111124
Display help for snipli.
112125
```
113126

127+
_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v5.1.12/src/commands/help.ts)_
128+
114129
## `snipli id`
115130

116131
💡 Get the ID of a gist from it's link
@@ -129,6 +144,8 @@ EXAMPLES
129144
$ snipli id --link=https://gist.github.com/Kira272921/bfce776b3ad1145f764d89c296fec605
130145
```
131146

147+
_See code: [dist/src/commands/id.ts](https://github.com/Kira272921/snipli/blob/v1.0.0/dist/src/commands/id.ts)_
148+
132149
## `snipli login`
133150

134151
🔑 Login into snipli via GitHub
@@ -144,6 +161,8 @@ EXAMPLES
144161
$ snipli login
145162
```
146163

164+
_See code: [dist/src/commands/login.ts](https://github.com/Kira272921/snipli/blob/v1.0.0/dist/src/commands/login.ts)_
165+
147166
## `snipli logout`
148167

149168
📤 Logout from snipli
@@ -159,6 +178,248 @@ EXAMPLES
159178
$ snipli logout
160179
```
161180

181+
_See code: [dist/src/commands/logout.ts](https://github.com/Kira272921/snipli/blob/v1.0.0/dist/src/commands/logout.ts)_
182+
183+
## `snipli plugins`
184+
185+
List installed plugins.
186+
187+
```
188+
USAGE
189+
$ snipli plugins [--core]
190+
191+
FLAGS
192+
--core Show core plugins.
193+
194+
DESCRIPTION
195+
List installed plugins.
196+
197+
EXAMPLES
198+
$ snipli plugins
199+
```
200+
201+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v2.1.0/src/commands/plugins/index.ts)_
202+
203+
## `snipli plugins:install PLUGIN...`
204+
205+
Installs a plugin into the CLI.
206+
207+
```
208+
USAGE
209+
$ snipli plugins:install PLUGIN...
210+
211+
ARGUMENTS
212+
PLUGIN Plugin to install.
213+
214+
FLAGS
215+
-f, --force Run yarn install with force flag.
216+
-h, --help Show CLI help.
217+
-v, --verbose
218+
219+
DESCRIPTION
220+
Installs a plugin into the CLI.
221+
222+
Can be installed from npm or a git url.
223+
224+
Installation of a user-installed plugin will override a core plugin.
225+
226+
e.g. If you have a core plugin that has a 'hello' command, installing a user-installed plugin with a 'hello' command
227+
will override the core plugin implementation. This is useful if a user needs to update core plugin functionality in
228+
the CLI without the need to patch and update the whole CLI.
229+
230+
ALIASES
231+
$ snipli plugins:add
232+
233+
EXAMPLES
234+
$ snipli plugins:install myplugin
235+
236+
$ snipli plugins:install https://github.com/someuser/someplugin
237+
238+
$ snipli plugins:install someuser/someplugin
239+
```
240+
241+
## `snipli plugins:inspect PLUGIN...`
242+
243+
Displays installation properties of a plugin.
244+
245+
```
246+
USAGE
247+
$ snipli plugins:inspect PLUGIN...
248+
249+
ARGUMENTS
250+
PLUGIN [default: .] Plugin to inspect.
251+
252+
FLAGS
253+
-h, --help Show CLI help.
254+
-v, --verbose
255+
256+
DESCRIPTION
257+
Displays installation properties of a plugin.
258+
259+
EXAMPLES
260+
$ snipli plugins:inspect myplugin
261+
```
262+
263+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v2.1.0/src/commands/plugins/inspect.ts)_
264+
265+
## `snipli plugins:install PLUGIN...`
266+
267+
Installs a plugin into the CLI.
268+
269+
```
270+
USAGE
271+
$ snipli plugins:install PLUGIN...
272+
273+
ARGUMENTS
274+
PLUGIN Plugin to install.
275+
276+
FLAGS
277+
-f, --force Run yarn install with force flag.
278+
-h, --help Show CLI help.
279+
-v, --verbose
280+
281+
DESCRIPTION
282+
Installs a plugin into the CLI.
283+
284+
Can be installed from npm or a git url.
285+
286+
Installation of a user-installed plugin will override a core plugin.
287+
288+
e.g. If you have a core plugin that has a 'hello' command, installing a user-installed plugin with a 'hello' command
289+
will override the core plugin implementation. This is useful if a user needs to update core plugin functionality in
290+
the CLI without the need to patch and update the whole CLI.
291+
292+
ALIASES
293+
$ snipli plugins:add
294+
295+
EXAMPLES
296+
$ snipli plugins:install myplugin
297+
298+
$ snipli plugins:install https://github.com/someuser/someplugin
299+
300+
$ snipli plugins:install someuser/someplugin
301+
```
302+
303+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v2.1.0/src/commands/plugins/install.ts)_
304+
305+
## `snipli plugins:link PLUGIN`
306+
307+
Links a plugin into the CLI for development.
308+
309+
```
310+
USAGE
311+
$ snipli plugins:link PLUGIN
312+
313+
ARGUMENTS
314+
PATH [default: .] path to plugin
315+
316+
FLAGS
317+
-h, --help Show CLI help.
318+
-v, --verbose
319+
320+
DESCRIPTION
321+
Links a plugin into the CLI for development.
322+
323+
Installation of a linked plugin will override a user-installed or core plugin.
324+
325+
e.g. If you have a user-installed or core plugin that has a 'hello' command, installing a linked plugin with a 'hello'
326+
command will override the user-installed or core plugin implementation. This is useful for development work.
327+
328+
EXAMPLES
329+
$ snipli plugins:link myplugin
330+
```
331+
332+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v2.1.0/src/commands/plugins/link.ts)_
333+
334+
## `snipli plugins:uninstall PLUGIN...`
335+
336+
Removes a plugin from the CLI.
337+
338+
```
339+
USAGE
340+
$ snipli plugins:uninstall PLUGIN...
341+
342+
ARGUMENTS
343+
PLUGIN plugin to uninstall
344+
345+
FLAGS
346+
-h, --help Show CLI help.
347+
-v, --verbose
348+
349+
DESCRIPTION
350+
Removes a plugin from the CLI.
351+
352+
ALIASES
353+
$ snipli plugins:unlink
354+
$ snipli plugins:remove
355+
```
356+
357+
## `snipli plugins:uninstall PLUGIN...`
358+
359+
Removes a plugin from the CLI.
360+
361+
```
362+
USAGE
363+
$ snipli plugins:uninstall PLUGIN...
364+
365+
ARGUMENTS
366+
PLUGIN plugin to uninstall
367+
368+
FLAGS
369+
-h, --help Show CLI help.
370+
-v, --verbose
371+
372+
DESCRIPTION
373+
Removes a plugin from the CLI.
374+
375+
ALIASES
376+
$ snipli plugins:unlink
377+
$ snipli plugins:remove
378+
```
379+
380+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v2.1.0/src/commands/plugins/uninstall.ts)_
381+
382+
## `snipli plugins:uninstall PLUGIN...`
383+
384+
Removes a plugin from the CLI.
385+
386+
```
387+
USAGE
388+
$ snipli plugins:uninstall PLUGIN...
389+
390+
ARGUMENTS
391+
PLUGIN plugin to uninstall
392+
393+
FLAGS
394+
-h, --help Show CLI help.
395+
-v, --verbose
396+
397+
DESCRIPTION
398+
Removes a plugin from the CLI.
399+
400+
ALIASES
401+
$ snipli plugins:unlink
402+
$ snipli plugins:remove
403+
```
404+
405+
## `snipli plugins:update`
406+
407+
Update installed plugins.
408+
409+
```
410+
USAGE
411+
$ snipli plugins:update [-h] [-v]
412+
413+
FLAGS
414+
-h, --help Show CLI help.
415+
-v, --verbose
416+
417+
DESCRIPTION
418+
Update installed plugins.
419+
```
420+
421+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v2.1.0/src/commands/plugins/update.ts)_
422+
162423
## `snipli read`
163424

164425
📖 Read a gist locally using vim
@@ -177,6 +438,8 @@ EXAMPLES
177438
$ snipli read --id=ca22a324f761cd241ace4c9a35286496
178439
```
179440

441+
_See code: [dist/src/commands/read.ts](https://github.com/Kira272921/snipli/blob/v1.0.0/dist/src/commands/read.ts)_
442+
180443
## `snipli whoami`
181444

182445
👀 Get the info about the logged in user
@@ -192,4 +455,5 @@ EXAMPLES
192455
$ snipli whoami
193456
```
194457

458+
_See code: [dist/src/commands/whoami.ts](https://github.com/Kira272921/snipli/blob/v1.0.0/dist/src/commands/whoami.ts)_
195459
<!-- commandsstop -->

src/constants/constants.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import os from "os";
22

33
const tokenConfigFileLocation = `${os.homedir()}/.snipli/config.json`;
4-
const apiUrl = "http://localhost:3000";
5-
const authSuccessRedirectUrl = "https://www.youtube.com/watch?v=dQw4w9WgXcQ";
4+
const apiUrl = "https://snipli-production.up.railway.app";
5+
const authSuccessRedirectUrl = "https://snipli.vercel.app/done";
66

77
export { tokenConfigFileLocation, apiUrl, authSuccessRedirectUrl };

0 commit comments

Comments
 (0)