Skip to content

feat: add search command for querying indexed documentation#2

Merged
vildanbina merged 9 commits intomainfrom
issue-152-cli-search
Mar 22, 2026
Merged

feat: add search command for querying indexed documentation#2
vildanbina merged 9 commits intomainfrom
issue-152-cli-search

Conversation

@vildanbina
Copy link
Copy Markdown
Member

Summary

Adds yavy search command so developers can query their indexed documentation directly from the terminal, without needing the MCP server.

  • New search() method on YavyApiClient calling GET /api/v1/search
  • New yavy search "query" command with --project, --limit, --json flags
  • Updated program description to "Search and manage your AI-ready documentation"
  • Lean, LLM-optimized output (title, url, content, project slug only)

Related: vildanbina/yavy.dev#152, vildanbina/yavy.dev#168

Test plan

  • 7 new search command tests (formatted output, empty results, JSON mode, project/limit passthrough, error handling, truncation)
  • 3 new API client tests (URL construction, project param encoding, limit param)
  • All 96 existing tests continue to pass

- Add yavy init for configuring AI tools with skills + MCP config
- Move tests from src/ to tests/ mirroring source structure
- Adopt @/ path aliases across all source and test files
- Fix vitest 4 compat, markdown escaping, JSON error handling

Confidence: high
Scope-risk: broad
- make SKILL.md a lean index with links to project files instead of inlining details
- remove hand-rolled .env parser from config.ts, use native process.env
- add ProjectContext type to api client
- remove skill-creator callout from generated files
- update tests for new skill structure
vildanbina

This comment was marked as resolved.

- use null check instead of truthy for limit param (fixes limit=0 bug)
- encode url path segments to prevent path injection
- fix mcp config read/write key mismatch when both servers and mcpServers exist
- escape backslashes and newlines in yaml frontmatter

Constraint: all fixes are at API/output boundaries, no internal logic changes
Confidence: high
Scope-risk: narrow
vitest 4 depends on rolldown which requires node:util.styleText
(added in node 21). node 18 is EOL since april 2025 and
package.json already declares engines >= 20.

Confidence: high
Scope-risk: narrow
@vildanbina vildanbina merged commit 7538d5f into main Mar 22, 2026
3 checks passed
@vildanbina vildanbina deleted the issue-152-cli-search branch March 22, 2026 09:35
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.

1 participant