srvgov-cli 0.1.1 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -23,9 +23,12 @@ checksums by default.
|
|
|
23
23
|
```bash
|
|
24
24
|
srvgov ctx set dev --server ssh://alice@example.com:22 --identity-file ~/.ssh/id_ed25519 -o json
|
|
25
25
|
srvgov ctx use dev -o json
|
|
26
|
+
srvgov status -o json
|
|
27
|
+
srvgov ports -o json
|
|
28
|
+
srvgov logs --unit sshd --since "1 hour ago" --lines 50 -o json
|
|
26
29
|
srvgov exec --dry-run "uptime" -o json
|
|
27
30
|
srvgov exec "uptime" -o json
|
|
28
|
-
srvgov audit --limit 20 -o json
|
|
31
|
+
srvgov audit query --limit 20 -o json
|
|
29
32
|
```
|
|
30
33
|
|
|
31
34
|
Use `-o json` for automation and AI agents.
|
|
@@ -72,6 +75,24 @@ Portable context export uses `srvgov.io/ctx-export/v1`. Literal password and
|
|
|
72
75
|
SSH identity passphrase values are redacted by default; credstore references are
|
|
73
76
|
preserved. `--include-credentials` is limited to plain-yaml contexts.
|
|
74
77
|
|
|
78
|
+
## Observe Before Acting
|
|
79
|
+
|
|
80
|
+
The observation commands turn common read-only SSH output into stable JSON:
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
srvgov status -o json
|
|
84
|
+
srvgov ports -o json
|
|
85
|
+
srvgov logs --unit nginx --since "30 minutes ago" --priority warning --lines 100 -o json
|
|
86
|
+
srvgov logs --file /var/log/nginx/error.log --grep "upstream" --lines 100 -o json
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Each underlying remote command is independently classified and authorized
|
|
90
|
+
through the same governance path as `exec`; probes are never joined with shell
|
|
91
|
+
operators. `ports` falls back from `ss` to `netstat`. Unit logs fall back from
|
|
92
|
+
`journalctl` to `systemctl status` when journalctl is unavailable. No command
|
|
93
|
+
adds `sudo`; unavailable PID/process fields remain empty. Log text, process
|
|
94
|
+
names, generated command text, caller output, and audit records are redacted.
|
|
95
|
+
|
|
75
96
|
## Governed Execution
|
|
76
97
|
|
|
77
98
|
Preview without connecting or executing:
|