UNPKG

772 BMarkdownView Raw
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
5A tiny little tool only 33K install size, that allow you generate mongo ObjectId direct in you terminal.
6
7## Installation
8```console
9yarn global add oid-cli
10```
11
12## usage
13```console
14oid
15# outputs
165ac177bf70d53847e8785eac
17```
18
19with arguments
20```console
21oid -n5
22# outputs
235ac177f250dbba4954955bb9
245ac177f250dbba4954955bba
255ac177f250dbba4954955bbb
265ac177f250dbba4954955bbc
275ac177f250dbba4954955bbd
28
29```
30
31## Usage with VIM + UltiSnips
32with single quotes
33```text
34snippet /[']oid/ "MongoDB ObjectId" r
35'`oid`'
36endsnippet
37```
38whitout quotes
39```text
40snippet /[.]oid/ "MongoDB ObjectId" r
41`oid`
42endsnippet
43```
44
45![Demo VIM](./images/vim_demo.gif)