Skip to content

Commit d96bf4e

Browse files
committed
docs(ui): talk about pico.sh cli
1 parent 4ae4a5a commit d96bf4e

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

posts/ui.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,49 @@ ssh pico.sh
1919
Some of our services have a built-in cli with our `ssh` service:
2020

2121
```bash
22+
ssh pico.sh help
2223
ssh pgs.sh help
2324
ssh feeds.pico.sh help
2425
ssh pipe.pico.sh help
2526
```
27+
28+
# pico.sh CLI
29+
30+
The TUI also comes with a CLI for some commands where it makes sense to print to
31+
stdout.
32+
33+
```
34+
Commands: [help, user, logs, chat]
35+
help - this message
36+
user - display user information (returns name, id, account created, pico+ expiration)
37+
logs - stream user logs
38+
chat - IRC chat (must enable pty with `-t` to the SSH command)
39+
not-found - return all status 404 requests for a host (hostname.com [year|month])
40+
```
41+
42+
For example, if you want to drop directly into our chat app without going
43+
through the tui:
44+
45+
```
46+
ssh pico.sh -t chat
47+
```
48+
49+
> Note: the `-t` is important since you need to provide pty
50+
51+
Or if you want to stream user logs so you can grep or use other pipe tools:
52+
53+
```
54+
ssh pico.sh logs
55+
```
56+
57+
Want to programmatically print your user information?
58+
59+
```
60+
ssh pico.sh user
61+
```
62+
63+
Want to print all the status 404s for your sites?
64+
65+
```
66+
ssh pico.sh not-found bower.sh month # just last month or `year` for the entire year
67+
```

0 commit comments

Comments
 (0)