Files
basicmachines-co-basic-memory/src/basic_memory
claude[bot] 2c4d923ec1 feat: add --format json support to CLI tool commands
Addresses issue #553 - CLI JSON improvements for OpenClaw plugin integration

Changes:
- Added --format json flag to write-note, read-note, recent-activity
- Added --page and --page-size options to recent-activity (fixes hardcoded pagination)
- Added --project parameter to recent-activity
- Added --format json to build-context for CLI consistency
- Implemented JSON helpers that call API directly to avoid double round-trips
- _write_note_json() returns entity metadata without second lookup
- _read_note_json() handles titles, permalinks, and memory:// URLs correctly
- _recent_activity_json() supports pagination parameters

Tests:
- Comprehensive test coverage in tests/cli/test_cli_json_format.py
- Tests for JSON format output
- Tests for pagination parameters
- Tests for identifier handling (titles, permalinks, URLs)
- Tests for project parameter interaction

Resolves: #553

Co-authored-by: bm-clawd <bm-clawd@users.noreply.github.com>
Signed-off-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
2026-02-08 16:14:01 +00:00
..