Skip to content

feat: add query command for raw SQL#19

Merged
spences10 merged 7 commits intomainfrom
feat/query-command
Feb 2, 2026
Merged

feat: add query command for raw SQL#19
spences10 merged 7 commits intomainfrom
feat/query-command

Conversation

@spences10
Copy link
Owner

Summary

  • Adds query command to run arbitrary SQL against the ccrecall database
  • Supports table (default), JSON, and CSV output formats
  • Includes --limit flag to cap results
  • Opens database in readonly mode for safety

Usage

ccrecall query "SELECT * FROM sessions LIMIT 5"
ccrecall query "SELECT COUNT(*) FROM messages" --format json
ccrecall query "SELECT id, project_path FROM sessions" --format csv --limit 10

Closes #8

Test plan

  • Tested table format output
  • Tested JSON format output
  • Tested CSV format output
  • Tested --limit flag

🤖 Generated with Claude Code

@spences10 spences10 force-pushed the feat/query-command branch 4 times, most recently from b4839b8 to 56ef3ea Compare February 2, 2026 21:53
spences10 and others added 6 commits February 2, 2026 22:01
Adds a query command to run arbitrary SQL against the ccrecall database.

Features:
- Positional sql argument for the query
- --format flag (table/json/csv, default table)
- --limit flag to cap results
- Opens database in readonly mode for safety

Closes #8

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@spences10 spences10 merged commit fe16672 into main Feb 2, 2026
1 check passed
@spences10 spences10 deleted the feat/query-command branch February 2, 2026 22:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CLI: Add query command for raw SQL

1 participant