# I am the Watcher. I am your guide through this vast new twtiverse.
# 
# Usage:
#     https://watcher.sour.is/api/plain/users              View list of users and latest twt date.
#     https://watcher.sour.is/api/plain/twt                View all twts.
#     https://watcher.sour.is/api/plain/mentions?uri=:uri  View all mentions for uri.
#     https://watcher.sour.is/api/plain/conv/:hash         View all twts for a conversation subject.
# 
# Options:
#     uri     Filter to show a specific users twts.
#     offset  Start index for quey.
#     limit   Count of items to return (going back in time).
# 
# twt range = 1 12
# self = https://watcher.sour.is/conv/yo2ndha
Initial proof-of-concept:


(⎈ |local:default)
prologic@Jamess-iMac
Sat Feb 20 12:24:53
~/Projects/shops
 (master) 0
$ ./shops -f ./test.yml 10.0.0.50
10.0.0.50:22:
 Ensure /root/foo exists ✅ -> /root/foo
 Check Uptime ✅ -> 02:24:56 up 18 days, 42 min,  0 users,  load average: 0.00, 0.00, 0.00
Initial proof-of-concept:


(⎈ |local:default)
prologic@Jamess-iMac
Sat Feb 20 12:24:53
~/Projects/shops
 (master) 0
$ ./shops -f ./test.yml 10.0.0.50
10.0.0.50:22:
 Ensure /root/foo exists ✅ -> /root/foo
 Check Uptime ✅ -> 02:24:56 up 18 days, 42 min,  0 users,  load average: 0.00, 0.00, 0.00
The test.yml config looks like this:


---
version: 1

items:
  - name: Ensure /root/foo exists
    check: ls /root/foo
    action: touch /root/foo
  - name: Check Uptime
    check: false
    action: uptime
The test.yml config looks like this:


---
version: 1

items:
  - name: Ensure /root/foo exists
    check: ls /root/foo
    action: touch /root/foo
  - name: Check Uptime
    check: false
    action: uptime
The test.yml config looks like this:\n\n
\n---\nversion: 1\n\nitems:\n  - name: Ensure /root/foo exists\n    check: ls /root/foo\n    action: touch /root/foo\n  - name: Check Uptime\n    check: false\n    action: uptime\n
The test.yml config looks like this:\n\n
\n---\nversion: 1\n\nitems:\n  - name: Ensure /root/foo exists\n    check: ls /root/foo\n    action: touch /root/foo\n  - name: Check Uptime\n    check: false\n    action: uptime\n
What else do we need? 🤔 It uses your local SSH agent for authentication. Only opens a single SSH connection per host. Is serial right now, but plan to make per-host operations concurrent, i.e: all config is applied to all hosts concurrently in one go.
What else do we need? 🤔 It uses your local SSH agent for authentication. Only opens a single SSH connection per host. Is serial right now, but plan to make per-host operations concurrent, i.e: all config is applied to all hosts concurrently in one go.
What else do we need? 🤔 It uses your local SSH agent for authentication. Only opens a single SSH connection per host. Is serial right now, but plan to make per-host operations concurrent, i.e: all config is applied to all hosts concurrently in one go.
At only ~260 lines of Go code, this is already pretty useful and very powerful. You just write checks and actions in regular shell. You use checks to verify and validate state, and actions to correct failed state.~
At only ~260 lines of Go code, this is already pretty useful and very powerful. You just write checks and actions in regular shell. You use checks to verify and validate state, and actions to correct failed state.~
At only ~260 lines of Go code, this is already pretty useful and very powerful. You just write checks and actions in regular shell. You use checks to verify and validate state, and actions to correct failed state.~