Skip to content

Commit 02331a5

Browse files
authored
Merge pull request #1 from skychatorg/dev/7ph
Add environment variable support & Persistent token & Linter
2 parents 096eb37 + bc36144 commit 02331a5

12 files changed

Lines changed: 2043 additions & 3218 deletions

.eslintrc.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
env:
2+
browser: true
3+
es2021: true
4+
extends:
5+
- eslint:recommended
6+
- plugin:@typescript-eslint/recommended
7+
- prettier
8+
parserOptions:
9+
ecmaVersion: latest
10+
parser: '@typescript-eslint/parser'
11+
sourceType: module
12+
plugins:
13+
- '@typescript-eslint'
14+
rules:
15+
indent:
16+
- error
17+
- 4
18+
- SwitchCase: 1
19+
linebreak-style:
20+
- error
21+
- unix
22+
quotes:
23+
- error
24+
- single
25+
semi:
26+
- error
27+
- always

.prettierrc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
singleQuote: true
2+
tabWidth: 4

README.md

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,29 @@
11
# SkyChatCLI
22

3-
Install
3+
## Install
44

55
```bash
66
npm i -g skychat-cli
77
```
88

9-
Launch
9+
## Launch
1010

1111
Logging as `user` with password `password` on instance `some-skychat.com`
12+
13+
```bash
14+
SKYCHAT_USER=user SKYCHAT_PASSWORD=password skychat-cli -h some-skychat.com
15+
```
16+
17+
All options can be passed either through environment or CLI args
18+
1219
```bash
13-
skychat-cli some-skychat.com user password
20+
skychat-cli -h some-skychat.com -u user -p password
21+
# or
22+
SKYCHAT_HOST=skych.at SKYCHAT_USER=user SKYCHAT_PASSWORD=password skychat-cli
1423
```
1524

16-
Logging as guest
25+
You can log in as guest by not specifying user/password
26+
1727
```bash
18-
skychat-cli some-skychat.com
28+
skychat-cli -h some-skychat.com
1929
```

0 commit comments

Comments
 (0)