You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+8-9Lines changed: 8 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -44,20 +44,20 @@ Access token should be set before using `hackmd-cli`. It can be created by landi
44
44
45
45
#### Example:
46
46
47
-
Set environment variable by command:
47
+
Set the access token by `login`command. By doing so, the access token will be saved in `~/.hackmd/config.json`.
48
48
49
49
```sh-session
50
50
$ hackmd-cli login
51
51
Enter your access token: My_ACCESS_TOKEN
52
52
```
53
53
54
-
Or in your shell profile:
54
+
Or you don't want to keep the credentials in one file, you can set it through environment variable:
55
55
56
56
```bash
57
57
export HMD_API_ACCESS_TOKEN=MY_ACCESS_TOKEN
58
58
```
59
59
60
-
Or in JSON file (`~/.hackmd/config.json`):
60
+
Or you can write the configuration file manually. Edit `~/.hackmd/config.json` with the following content:
61
61
62
62
```json
63
63
{
@@ -67,7 +67,7 @@ Or in JSON file (`~/.hackmd/config.json`):
67
67
68
68
### Specify HackMD API endpoint manually (optional)
69
69
70
-
`hackmd-cli` operates on official HackMD API endpoint (`https://api.hackmd.io/v1`) by default. If you want to use cli with a self-hosted[HackMD EE](https://hackmd.io/pricing) instance and API endpoint, you will need to configure `hackmd-cli`by either environment variable or JSON configuration.
70
+
`hackmd-cli` operates on the official HackMD API endpoint (`https://api.hackmd.io/v1`) by default. If you want to use `hackmd-cli` with a custom[HackMD EE](https://hackmd.io/enterprise) instance, you will need to configure the API endpoint by either environment variable or JSON configuration manually.
71
71
72
72
#### Example:
73
73
@@ -89,11 +89,10 @@ Or in JSON file (`~/.hackmd/config.json`):
89
89
90
90
All available configurations are listed in the table below.
91
91
92
-
| Config key | Environment Variable | Data Type | Example Value | Description |
0 commit comments