@@ -17,15 +17,18 @@ Operator-focused guide for managing KafClaw from CLI and runtime endpoints.
1717| ` kafclaw doctor ` | Run setup/config diagnostics including skills readiness checks |
1818| ` kafclaw security ` | Unified security checks/audit/fix (` check ` , ` audit --deep ` , ` fix --yes ` ) |
1919| ` kafclaw config ` | Low-level dotted-path config read/write/unset |
20- | ` kafclaw configure ` | Guided/non-interactive config updates (subagents + skills toggles ) |
21- | ` kafclaw skills ` | Skills lifecycle (` enable/disable/list/status/verify/install/update/auth/prereq ` ) |
20+ | ` kafclaw configure ` | Guided/non-interactive config updates (subagents, skills, Kafka group security ) |
21+ | ` kafclaw skills ` | Skills lifecycle (` enable/disable/list/status/enable-skill/disable-skill/ verify/install/update/exec /auth/prereq ` ) |
2222| ` kafclaw group ` | Join/leave/status/members for Kafka collaboration group |
2323| ` kafclaw kshark ` | Kafka connectivity and protocol diagnostics |
2424| ` kafclaw agent -m ` | Single-shot direct CLI interaction with agent loop |
2525| ` kafclaw pairing ` | Approve/deny pending Slack/Teams sender pairings |
2626| ` kafclaw whatsapp-setup ` | Configure WhatsApp auth and initial lists |
2727| ` kafclaw whatsapp-auth ` | Approve/deny/list WhatsApp JIDs |
28- | ` kafclaw install ` | Install binary to ` /usr/local/bin ` |
28+ | ` kafclaw install ` | Install local binary (` /usr/local/bin ` as root, ` ~/.local/bin ` as non-root) |
29+ | ` kafclaw daemon ` | Manage systemd service lifecycle (` install ` , ` uninstall ` , ` start ` , ` stop ` , ` restart ` , ` status ` ) |
30+ | ` kafclaw update ` | Update lifecycle (` plan ` , ` apply ` , ` backup ` , ` rollback ` ) |
31+ | ` kafclaw completion ` | Generate shell completion scripts (`bash| zsh| fish| powershell`) |
2932| ` kafclaw version ` | Print build version |
3033
3134## 2. First-Time Operator Runbook
@@ -42,7 +45,119 @@ Then verify:
4245- API: ` http://127.0.0.1:18790 `
4346- Dashboard: ` http://127.0.0.1:18791 `
4447
45- ## 3. Onboarding and Modes
48+ ## 3. Release Installer (Recommended for Operators)
49+
50+ Install via release script (host OS/arch auto-detected):
51+
52+ ``` bash
53+ curl --fail --show-error --silent --location \
54+ https://raw.githubusercontent.com/kafclaw/kafclaw/main/scripts/install.sh \
55+ | bash -s -- --latest
56+ ```
57+
58+ List available versions:
59+
60+ ``` bash
61+ curl --fail --show-error --silent --location \
62+ https://raw.githubusercontent.com/kafclaw/kafclaw/main/scripts/install.sh \
63+ | bash -s -- --list-releases
64+ ```
65+
66+ Pinned install:
67+
68+ ``` bash
69+ curl --fail --show-error --silent --location \
70+ https://raw.githubusercontent.com/kafclaw/kafclaw/main/scripts/install.sh \
71+ | bash -s -- --version v2.6.3
72+ ```
73+
74+ Unattended/headless install requires explicit version selection:
75+
76+ ``` bash
77+ # Latest channel
78+ curl --fail --show-error --silent --location \
79+ https://raw.githubusercontent.com/kafclaw/kafclaw/main/scripts/install.sh \
80+ | bash -s -- --unattended --latest
81+
82+ # Pinned version
83+ curl --fail --show-error --silent --location \
84+ https://raw.githubusercontent.com/kafclaw/kafclaw/main/scripts/install.sh \
85+ | bash -s -- --unattended --version v2.6.3
86+ ```
87+
88+ Security behavior:
89+
90+ - Checksum verification (` SHA256SUMS ` ) is always required.
91+ - Signature verification (` cosign ` ) is enabled by default.
92+ - Use ` --no-signature-verify ` only in constrained environments where ` cosign ` is unavailable.
93+ - Installer failures use structured error codes (for example ` INSTALL_PREREQ_MISSING ` , ` INSTALL_DOWNLOAD_FAILED ` ) and include remediation text.
94+
95+ Root install behavior:
96+
97+ - Installer warns that root service install is a security risk.
98+ - If accepted, it creates non-root user ` kafclaw ` (Linux) for service runtime.
99+ - If declined (` n ` ), installer continues with root runtime and prints ` Installing as root service. `
100+
101+ Install verification path (automatic at end of install):
102+
103+ - version check (` kafclaw version ` / ` kafclaw --version ` )
104+ - PATH check (whether ` kafclaw ` resolves from current shell)
105+ - status check when config exists (` ~/.kafclaw/config.json ` ), otherwise prints onboarding reminder
106+
107+ ## 3.1 Update / Rollback Lifecycle
108+
109+ Plan the flow:
110+
111+ ``` bash
112+ ./kafclaw update plan
113+ ```
114+
115+ Create backup snapshot only:
116+
117+ ``` bash
118+ ./kafclaw update backup
119+ ```
120+
121+ Apply binary update:
122+
123+ ``` bash
124+ ./kafclaw update apply --latest
125+ ./kafclaw update apply --version v2.6.3
126+ ```
127+
128+ Apply source update:
129+
130+ ``` bash
131+ ./kafclaw update apply --source --repo-path /path/to/KafClaw
132+ ```
133+
134+ Rollback state from latest snapshot:
135+
136+ ``` bash
137+ ./kafclaw update rollback
138+ ```
139+
140+ Rollback state from specific snapshot:
141+
142+ ``` bash
143+ ./kafclaw update rollback --backup-path ~ /.kafclaw/backups/update-YYYYMMDD-HHMMSSZ
144+ ```
145+
146+ ` update apply ` runs:
147+
148+ - preflight compatibility checks (config + timeline migration readiness)
149+ - pre-update backup snapshot
150+ - update apply (binary/source path)
151+ - post-update health gates (` doctor ` , security check)
152+ - config drift report
153+
154+ Lifecycle event logs:
155+
156+ - Critical onboarding/update/rollback phases append JSONL events to:
157+ - ` ~/.kafclaw/lifecycle-events.jsonl `
158+ - Use this for troubleshooting automation/non-interactive lifecycle runs.
159+
160+ ## 4. Onboarding and Modes
46161
47162### Interactive
48163
@@ -77,7 +192,42 @@ Onboarding also scaffolds workspace files:
77192
78193Use ` --force ` to overwrite existing config and scaffold files.
79194
80- ## 4. Daily Health Checks
195+ Lifecycle flags (operator-focused):
196+
197+ ``` bash
198+ ./kafclaw onboard --reset-scope config --non-interactive --accept-risk --profile local --llm skip
199+ ./kafclaw onboard --wait-for-gateway --health-timeout 20s
200+ ./kafclaw onboard --skip-healthcheck
201+ ./kafclaw onboard --daemon-runtime native
202+ ```
203+
204+ If onboarding installs systemd (` --systemd ` ), service activation is automatic by default.
205+ Disable auto-activation with ` --systemd-activate=false ` .
206+
207+ ## 4.1 Daemon / Service Lifecycle (Linux systemd)
208+
209+ Install service and activate immediately:
210+
211+ ``` bash
212+ sudo ./kafclaw daemon install --activate
213+ ```
214+
215+ Service operations:
216+
217+ ``` bash
218+ sudo ./kafclaw daemon status
219+ sudo ./kafclaw daemon restart
220+ sudo ./kafclaw daemon stop
221+ sudo ./kafclaw daemon start
222+ ```
223+
224+ Uninstall service:
225+
226+ ``` bash
227+ sudo ./kafclaw daemon uninstall
228+ ```
229+
230+ ## 5. Daily Health Checks
81231
82232### Status snapshot
83233
@@ -104,7 +254,7 @@ Highlights include:
104254When skills are enabled, doctor also checks ` node ` , ` clawhub ` (if external installs are enabled), runtime dir permissions, and channel-onboarding readiness.
105255Use ` kafclaw security ` for consolidated security posture and deep skill audits.
106256
107- ## 5 . Config Management
257+ ## 6 . Config Management
108258
109259### Low-level config edits
110260
@@ -123,6 +273,7 @@ Use `kafclaw security` for consolidated security posture and deep skill audits.
123273./kafclaw configure --non-interactive --skills-enabled-set --skills-enabled=true --skills-node-manager npm
124274./kafclaw configure --non-interactive --skills-scope selected
125275./kafclaw configure --non-interactive --enable-skill github --disable-skill weather
276+ ./kafclaw configure --non-interactive --kafka-brokers " broker1:9092,broker2:9092" --kafka-security-protocol SASL_SSL --kafka-sasl-mechanism SCRAM-SHA-512 --kafka-sasl-username " <username>" --kafka-sasl-password " <password>" --kafka-tls-ca-file " /path/to/ca.pem"
126277```
127278
128279Skills policy defaults:
@@ -155,7 +306,7 @@ Direct config edits:
155306./kafclaw config set model.name " anthropic/claude-sonnet-4-5"
156307```
157308
158- ## 6 . Group Collaboration Operations
309+ ## 7 . Group Collaboration Operations
159310
160311``` bash
161312./kafclaw group join mygroup
@@ -178,6 +329,18 @@ Using onboarding profile:
178329./kafclaw onboard --non-interactive --profile local-kafka --kafka-brokers " broker1:9092,broker2:9092" --group-name kafclaw --agent-id agent-ops --role worker --llm skip
179330```
180331
332+ Using onboarding profile with broker security:
333+
334+ ``` bash
335+ ./kafclaw onboard --non-interactive --profile local-kafka --llm skip \
336+ --kafka-brokers " broker1:9092,broker2:9092" \
337+ --kafka-security-protocol SASL_SSL \
338+ --kafka-sasl-mechanism SCRAM-SHA-512 \
339+ --kafka-sasl-username " <username>" \
340+ --kafka-sasl-password " <password>" \
341+ --kafka-tls-ca-file " /path/to/ca.pem"
342+ ```
343+
181344Using direct config commands:
182345
183346``` bash
@@ -188,6 +351,27 @@ Using direct config commands:
188351./kafclaw config set group.agentId " agent-ops"
189352```
190353
354+ Kafka security options are optional. Plaintext/non-mTLS installs continue to work by default.
355+
356+ Direct broker security (Confluent/Redpanda-style SASL/SSL):
357+
358+ ``` bash
359+ ./kafclaw config set group.kafkaSecurityProtocol " SASL_SSL"
360+ ./kafclaw config set group.kafkaSaslMechanism " PLAIN"
361+ ./kafclaw config set group.kafkaSaslUsername " <username>"
362+ ./kafclaw config set group.kafkaSaslPassword " <password>"
363+ ./kafclaw config set group.kafkaTlsCAFile " /path/to/ca.pem"
364+ ```
365+
366+ Mutual TLS (when required by cluster policy):
367+
368+ ``` bash
369+ ./kafclaw config set group.kafkaSecurityProtocol " SSL"
370+ ./kafclaw config set group.kafkaTlsCAFile " /path/to/ca.pem"
371+ ./kafclaw config set group.kafkaTlsCertFile " /path/to/client-cert.pem"
372+ ./kafclaw config set group.kafkaTlsKeyFile " /path/to/client-key.pem"
373+ ```
374+
191375Using KafScale proxy style settings:
192376
193377``` bash
@@ -203,7 +387,9 @@ Verification:
203387./kafclaw kshark --auto --yes
204388```
205389
206- ## 7. Kafka Diagnostics with KShark
390+ ` kshark --auto ` now reads the same group Kafka security settings used by runtime group consumers.
391+
392+ ## 8. Kafka Diagnostics with KShark
207393
208394Auto-config from current KafClaw group config:
209395
@@ -223,7 +409,7 @@ Useful options:
223409- ` --diag ` include traceroute/MTU diagnostics
224410- ` --preset ` for predefined connection templates
225411
226- ## 8 . Channel Auth and Pairing
412+ ## 9 . Channel Auth and Pairing
227413
228414### Pairing queue (Slack/Teams)
229415
@@ -242,7 +428,7 @@ Useful options:
242428./kafclaw whatsapp-auth --deny " +123456789@s.whatsapp.net"
243429```
244430
245- ## 9 . Channel Bridge (` cmd/channelbridge ` )
431+ ## 10 . Channel Bridge (` cmd/channelbridge ` )
246432
247433Build and run:
248434
0 commit comments