|
|
│ { │ │ “key”: “value” │ │ } │
Users are forced to manually delete all pipe characters before the JSON can be used.
## Root Cause Analysis
The CLI rendering code uses box-drawing characters (vertical pipes) to frame the JSON manifest output for visual aesthetics in the terminal. While this improves readability when viewing the manifest on-screen, it renders the output invalid for programmatic use.
The issue stems from the output formatting layer that wraps content with decorative borders for terminal presentation. This design choice prioritizes visual formatting over usability for automation workflows and copy-paste scenarios.
Key affected code path:
1. User executes `openclaw channels add`
2. CLI prompts for Slack channel configuration
3. JSON manifest is generated and wrapped with pipe-framed formatting
4. Output is displayed but cannot be directly consumed
## Solution
To resolve this issue, users have the following workarounds:
### Workaround 1: Use the Raw Output Flag
If available, use the `--raw` or `--json` flag to output clean JSON without formatting:
```bash
openclaw channels add --type slack --raw
Workaround 2: Extract JSON Programmatically
Pipe the output through sed or grep to extract just the JSON lines:
|
|
Or use the following to remove all pipe characters:
|
|
Workaround 3: Manual Cleanup
Copy the displayed JSON and manually remove all vertical pipe characters before pasting.
Prevention
To prevent this issue in future development:
-
Provide a raw output mode: The CLI should offer a
--no-formator--rawflag that outputs clean JSON without decorative characters. -
Separate display from data: JSON manifests should be output in their raw form by default, with formatting applied only when explicitly requested (e.g.,
--pretty). -
Add copy-paste testing: Include automated tests that verify CLI output can be parsed as valid JSON when the manifest is piped to
jqor similar tools. -
Consider STDERR vs STDOUT: Send formatted display output to STDERR and pure data output to STDOUT, allowing users to redirect appropriately.
Additional Information
- OpenClaw Version: 2026.3.1
- Operating System: macOS 26.3
- Install Method: curl command
- Severity: High - This completely breaks the advertised “faster setup” workflow by preventing direct JSON manifest copying
- Related Commands:
openclaw channels add
This behavior affects any user attempting to use the CLI for automated or scripted channel setup workflows, significantly impacting the intended user experience of the JSON manifest feature.