5
5
[ ![ Downloads/week] ( https://img.shields.io/npm/dw/@hackmd/codimd-cli.svg )] ( https://npmjs.org/package/@hackmd/codimd-cli )
6
6
[ ![ License] ( https://img.shields.io/npm/l/@hackmd/codimd-cli.svg )] ( https://github.com/hackmdio/codimd-cli/blob/master/package.json )
7
7
8
- <!-- toc -->
9
8
* [ codimd-cli - The CodiMD Command Line Tool] ( #codimd-cli---the-codimd-command-line-tool )
10
- <!-- tocstop -->
11
9
* [ Usage] ( #usage )
12
10
* [ Commands] ( #commands )
13
11
* [ Configuration] ( #configuration )
@@ -20,7 +18,7 @@ $ npm install -g @hackmd/codimd-cli
20
18
$ codimd-cli COMMAND
21
19
running command...
22
20
$ codimd-cli (-v| --version| version)
23
- @hackmd/codimd-cli/1.0.1 linux-x64 node-v8.17.0
21
+ @hackmd/codimd-cli/1.0.2 linux-x64 node-v8.17.0
24
22
$ codimd-cli --help [COMMAND]
25
23
USAGE
26
24
$ codimd-cli COMMAND
@@ -45,15 +43,15 @@ Change the serverUrl value to your hosted CodiMD instance URL.
45
43
You can also speicify config as environment variable. For example, append this line to your ` .bashrc ` :
46
44
47
45
``` bash
48
- export CMD_CLI_SERVER_URL=my.codimd-domain.dev
46
+ export CMD_CLI_SERVER_URL=https:// my.codimd-domain.dev
49
47
```
50
48
51
49
All available configurations are listed in the table below.
52
50
53
- | Config key | Environment Variable | Data Type | Example Value | Description |
54
- | ------------ | :--------------------- | ---------- | ------------------------ | ------------------------------------ |
55
- | ` serverUrl ` | ` CMD_CLI_SERVER_URL ` | * ` string ` * | ` https://my.codimd-domain.dev ` | The CodiMD instance URL |
56
- | ` cookiePath ` | ` CMD_CLI_COOKIE_PATH ` | * ` string ` * | ` ~/.codimd/cookies.json ` | File for storing login cookie states |
51
+ | Config key | Environment Variable | Data Type | Example Value | Description |
52
+ | ------------ | :--------------------- | ---------- | ------------------------------ | ------------------------------------ |
53
+ | ` serverUrl ` | ` CMD_CLI_SERVER_URL ` | * ` string ` * | ` https://my.codimd-domain.dev ` | The CodiMD instance URL |
54
+ | ` cookiePath ` | ` CMD_CLI_COOKIE_PATH ` | * ` string ` * | ` ~/.codimd/cookies.json ` | File for storing login cookie states |
57
55
58
56
## Commands
59
57
@@ -84,7 +82,7 @@ EXAMPLE
84
82
$ codimd-cli export [--pdf|--md|--html] <note_id> <output_file>
85
83
```
86
84
87
- _ See code: [ src/commands/export.ts] ( https://github.com/hackmdio/codimd-cli/blob/v1.0.1 /src/commands/export.ts ) _
85
+ _ See code: [ src/commands/export.ts] ( https://github.com/hackmdio/codimd-cli/blob/v1.0.2 /src/commands/export.ts ) _
88
86
89
87
### ` codimd-cli help [COMMAND] `
90
88
@@ -130,7 +128,7 @@ EXAMPLE
130
128
EeNHDGocSTi70ytMMGQaaQ Note2
131
129
```
132
130
133
- _ See code: [ src/commands/history.ts] ( https://github.com/hackmdio/codimd-cli/blob/v1.0.1 /src/commands/history.ts ) _
131
+ _ See code: [ src/commands/history.ts] ( https://github.com/hackmdio/codimd-cli/blob/v1.0.2 /src/commands/history.ts ) _
134
132
135
133
### ` codimd-cli import [FILE] `
136
134
@@ -149,7 +147,7 @@ EXAMPLE
149
147
Your note is available at https://codimd.domain/note-url
150
148
```
151
149
152
- _ See code: [ src/commands/import.ts] ( https://github.com/hackmdio/codimd-cli/blob/v1.0.1 /src/commands/import.ts ) _
150
+ _ See code: [ src/commands/import.ts] ( https://github.com/hackmdio/codimd-cli/blob/v1.0.2 /src/commands/import.ts ) _
153
151
154
152
### ` codimd-cli login `
155
153
@@ -172,7 +170,7 @@ EXAMPLE
172
170
Login as HMD successfully!
173
171
```
174
172
175
- _ See code: [ src/commands/login.ts] ( https://github.com/hackmdio/codimd-cli/blob/v1.0.1 /src/commands/login.ts ) _
173
+ _ See code: [ src/commands/login.ts] ( https://github.com/hackmdio/codimd-cli/blob/v1.0.2 /src/commands/login.ts ) _
176
174
177
175
### ` codimd-cli logout `
178
176
@@ -191,7 +189,7 @@ EXAMPLE
191
189
You've logged out successfully
192
190
```
193
191
194
- _ See code: [ src/commands/logout.ts] ( https://github.com/hackmdio/codimd-cli/blob/v1.0.1 /src/commands/logout.ts ) _
192
+ _ See code: [ src/commands/logout.ts] ( https://github.com/hackmdio/codimd-cli/blob/v1.0.2 /src/commands/logout.ts ) _
195
193
196
194
### ` codimd-cli whoami `
197
195
@@ -210,10 +208,10 @@ EXAMPLE
210
208
You are logged in codimd.domain as {YOUR NAME} [user-id]
211
209
```
212
210
213
- _ See code: [ src/commands/whoami.ts] ( https://github.com/hackmdio/codimd-cli/blob/v1.0.1 /src/commands/whoami.ts ) _
211
+ _ See code: [ src/commands/whoami.ts] ( https://github.com/hackmdio/codimd-cli/blob/v1.0.2 /src/commands/whoami.ts ) _
214
212
<!-- commandsstop -->
215
213
216
- #### ` codimd-cli ` piping mode
214
+ ### ` codimd-cli ` piping mode
217
215
218
216
You can create a note by piping text stream to codimd-cli
219
217
0 commit comments