Skip to content

Commit 38fa50c

Browse files
committed
Finish initial setup & NPM binary
1 parent 9016022 commit 38fa50c

6 files changed

Lines changed: 142 additions & 210 deletions

File tree

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# SkyChatCLI
2+
3+
Install
4+
5+
```bash
6+
npm i -g skychat-cli
7+
```
8+
9+
Launch
10+
11+
Logging as `user` with password `password` on instance `some-skychat.com`
12+
```bash
13+
skychat-cli some-skychat.com user password
14+
```
15+
16+
Logging as guest
17+
```bash
18+
skychat-cli some-skychat.com
19+
```

package-lock.json

Lines changed: 11 additions & 170 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,27 @@
11
{
2-
"name": "skychat-node",
3-
"version": "1.0.0",
4-
"description": "",
5-
"main": "index.js",
2+
"name": "skychat-cli",
3+
"version": "0.0.6",
4+
"description": "Connect to a SkyChat instance using CLI",
5+
"main": "lib/index.js",
6+
"files": [
7+
"bin/**",
8+
"lib/**",
9+
"README.md"
10+
],
611
"scripts": {
12+
"build": "tsc",
713
"test": "echo \"Error: no test specified\" && exit 1"
814
},
9-
"author": "",
15+
"bin": "./skychat-cli",
16+
"author": "7PH <b.raymond@protonmail.com>",
1017
"license": "ISC",
1118
"dependencies": {
1219
"blessed": "^0.1.81",
13-
"skychat": "^1.0.3"
20+
"skychat": "^1.0.4"
1421
},
1522
"devDependencies": {
1623
"@types/blessed": "^0.1.22",
1724
"nodemon": "^3.0.1",
18-
"ts-node": "^10.9.1",
1925
"typescript": "^5.1.6"
2026
}
2127
}

skychat-cli

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/usr/bin/env node
2+
3+
const SkyChatCLI = require('./lib/SkyChatCLI').SkyChatCLI;
4+
5+
const [ , , HOST, USER, PASS] = process.argv;
6+
7+
(async () => {
8+
await new SkyChatCLI(`wss://${HOST}/ws`)
9+
.connect({ username: USER, password: PASS })
10+
})();

0 commit comments

Comments
 (0)