Summary
Consolidate list and search commands into a single list [term] command with --all flag for pagination control.
Parent: #668 (ls-prompt-ux milestone)
Phase: 3 of 4 (Breaking Change)
Design: docs/implementation/ls-prompt-ux-command-redesign.md (section: Phase 3)
Depends on: #727 (Phase 1), #728 (Phase 2)
Goals
Eliminate the duplicate functionality between list and search by:
- Making
list accept optional search term: list [term]
- Adding
--all flag to control pagination (default: first page only)
- Deprecating
search command with clear migration path
Current Problem
Users are confused about when to use list vs search:
langstar prompt list # Lists all prompts
langstar prompt search rag # Searches for prompts
Both do essentially the same thing (query the LangSmith API), but with different pagination defaults.
Proposed Solution
Single command with optional search:
langstar prompt list # First page of all prompts
langstar prompt list rag # First page of "rag" search results
langstar prompt list --all # All prompts (paginate till end)
langstar prompt list "structured output" --all # All search results
Implementation Tasks
1. Update list command
2. Deprecate search command
3. Update documentation
Example Usage
List all prompts (first page):
List all prompts (all pages):
langstar prompt list --all
Search prompts (first page):
langstar prompt list rag
langstar prompt list "structured output"
Search prompts (all results):
langstar prompt list rag --all
langstar prompt list "structured output" --all
Migration Path
Document how to migrate from search to list:
# Old: langstar prompt search "term"
# New: langstar prompt list "term"
# Old: langstar prompt search "term" --limit 100
# New: langstar prompt list "term" --all
# Old: langstar prompt list
# New: langstar prompt list (unchanged)
Testing Requirements
Integration Tests
Deprecation Tests
Output Tests
Success Criteria
Breaking Change Notice
This is a breaking change because it changes the default pagination behavior:
Before:
list - First page only
search <term> - All results (paginate till end)
After:
list - First page only (unchanged)
list --all - All pages (new flag required)
list <term> - First page of search results (changed default)
list <term> --all - All search results (new flag required)
Users who relied on search fetching all results by default will need to add --all flag.
Version Planning
This should be released as a minor version (not major) because:
search command is deprecated but not removed (backward compatible)
list behavior without arguments is unchanged
- New functionality (
--all flag) is additive
Actual removal of search will happen in Phase 4 (major version).
References
Summary
Consolidate
listandsearchcommands into a singlelist [term]command with--allflag for pagination control.Parent: #668 (ls-prompt-ux milestone)
Phase: 3 of 4 (Breaking Change)
Design: docs/implementation/ls-prompt-ux-command-redesign.md (section: Phase 3)
Depends on: #727 (Phase 1), #728 (Phase 2)
Goals
Eliminate the duplicate functionality between
listandsearchby:listaccept optional search term:list [term]--allflag to control pagination (default: first page only)searchcommand with clear migration pathCurrent Problem
Users are confused about when to use
listvssearch:Both do essentially the same thing (query the LangSmith API), but with different pagination defaults.
Proposed Solution
Single command with optional search:
Implementation Tasks
1. Update
listcommand[search-term]positional argument--allflag for pagination control--all: Paginate until no more results2. Deprecate
searchcommandsearchcommandsearchis deprecated. Uselist [term]instead."searchfrom main help outputsearchfunctional for backward compatibility3. Update documentation
listusagelistcommandsearchtolistExample Usage
List all prompts (first page):
List all prompts (all pages):
Search prompts (first page):
langstar prompt list rag langstar prompt list "structured output"Search prompts (all results):
langstar prompt list rag --all langstar prompt list "structured output" --allMigration Path
Document how to migrate from
searchtolist:Testing Requirements
Integration Tests
listwithout arguments (first page, no search)list --all(all pages, no search)list <term>(first page, with search)list <term> --all(all pages, with search)Deprecation Tests
searchshows deprecation warningsearchstill works functionallysearchis hidden from main helpOutput Tests
--output json)--output text)Success Criteria
listcommand accepts optional search termlist --allpaginates until exhaustionsearchcommand is deprecated but functionalBreaking Change Notice
This is a breaking change because it changes the default pagination behavior:
Before:
list- First page onlysearch <term>- All results (paginate till end)After:
list- First page only (unchanged)list --all- All pages (new flag required)list <term>- First page of search results (changed default)list <term> --all- All search results (new flag required)Users who relied on
searchfetching all results by default will need to add--allflag.Version Planning
This should be released as a minor version (not major) because:
searchcommand is deprecated but not removed (backward compatible)listbehavior without arguments is unchanged--allflag) is additiveActual removal of
searchwill happen in Phase 4 (major version).References