1 | # oid-cli
|
2 |
|
3 | [![install size](https://packagephobia.now.sh/badge?p=oid-cli@1.0.3)](https://packagephobia.now.sh/result?p=oid-cli@1.0.3)
|
4 |
|
5 | A tiny little tool only 33K install size, that allow you generate mongo ObjectId direct in you terminal.
|
6 |
|
7 | ## Installation
|
8 | ```console
|
9 | yarn global add oid-cli
|
10 | ```
|
11 |
|
12 | ## usage
|
13 | ```console
|
14 | oid
|
15 | # outputs
|
16 | 5ac177bf70d53847e8785eac
|
17 | ```
|
18 |
|
19 | with arguments
|
20 | ```console
|
21 | oid -n5
|
22 | # outputs
|
23 | 5ac177f250dbba4954955bb9
|
24 | 5ac177f250dbba4954955bba
|
25 | 5ac177f250dbba4954955bbb
|
26 | 5ac177f250dbba4954955bbc
|
27 | 5ac177f250dbba4954955bbd
|
28 |
|
29 | ```
|
30 |
|
31 | ## Usage with VIM + UltiSnips
|
32 | with single quotes
|
33 | ```text
|
34 | snippet /[']oid/ "MongoDB ObjectId" r
|
35 | '`oid`'
|
36 | endsnippet
|
37 | ```
|
38 | whitout quotes
|
39 | ```text
|
40 | snippet /[.]oid/ "MongoDB ObjectId" r
|
41 | `oid`
|
42 | endsnippet
|
43 | ```
|
44 |
|
45 | ![Demo VIM](./images/vim_demo.gif)
|