{"by":"skeptrune","descendants":8,"id":44309891,"kids":[44311390,44313852,44312324],"score":35,"text":"Hi HN,<p>I built a CLI for uploading documents and querying them with an LLM agent that uses search tools rather than stuffing everything into the context window. I recorded a demo using the CrossFit 2025 rulebook that shows how this approach compares to traditional RAG and direct context injection[1].<p>The core insight is that LLMs running in loops with tool access are unreasonably effective at this kind of knowledge retrieval task[2]. Instead of hoping the right chunks make it into your context, the agent can iteratively search, refine queries, and reason about what it finds.<p>The CLI handles the full workflow:<p>```bash<p>trieve upload .&#x2F;document.pdf<p>trieve ask &quot;What are the key findings?&quot;<p>```<p>You can customize the RAG behavior, check upload status, and the responses stream back with expandable source references. I really enjoy having this workflow available in the terminal and I&#x27;m curious if others find this paradigm as compelling as I do.<p>Considering adding more commands and customization options if there&#x27;s interest. The tool is free for up to 1k document chunks.<p>Source code is on GitHub[3] and available via npm[4].<p>Would love any feedback on the approach or CLI design!<p>[1]: <a href=\"https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=SAV-esDsRUk\" rel=\"nofollow\">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=SAV-esDsRUk</a>\n[2]: <a href=\"https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=43998472\">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=43998472</a>  \n[3]: <a href=\"https:&#x2F;&#x2F;github.com&#x2F;devflowinc&#x2F;trieve&#x2F;blob&#x2F;main&#x2F;clients&#x2F;cli&#x2F;index.ts\">https:&#x2F;&#x2F;github.com&#x2F;devflowinc&#x2F;trieve&#x2F;blob&#x2F;main&#x2F;clients&#x2F;cli&#x2F;i...</a>\n[4]: <a href=\"https:&#x2F;&#x2F;www.npmjs.com&#x2F;package&#x2F;trieve-cli\" rel=\"nofollow\">https:&#x2F;&#x2F;www.npmjs.com&#x2F;package&#x2F;trieve-cli</a>","time":1750254735,"title":"Show HN: Trieve CLI – Terminal-based LLM agent loop with search tool for PDFs","type":"story","url":"https://github.com/devflowinc/trieve/tree/main/clients/cli"}