feat: add traul get command for thread retrieval#14
Merged
Conversation
Adds a new `get` command that retrieves complete conversation threads by thread_id, plus a --date option to list all threads from a given day. Also exposes thread_id in search results (text and JSON output) so users can copy it for use with `traul get`. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
traul get <thread-id>command to retrieve full conversation threads chronologicallytraul get --date 2026-03-10to list all threads from a given day[thread:abc123...]in text output andthread_idin JSON outputChanges
src/commands/get.ts— new command implementation (~54 lines)src/db/queries.ts—GET_THREADandGET_THREADS_BY_DATEqueriessrc/db/database.ts—getThread()andgetThreadsByDate()methodssrc/index.ts— registergetcommandsrc/lib/formatter.ts— show thread_id in text outputsrc/commands/search.ts— include thread_id in JSON outputTest plan
traul get <known-thread-id>returns full conversationtraul get --date 2026-03-18returns threads from todaytraul get --json <thread-id>returns valid JSONtraul search "query"shows thread IDs in outputtraul search --json "query"includes thread_id fieldtraul getwith no args shows usage error🤖 Generated with Claude Code