You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Lets people evaluate the framework in 60 seconds without writing Python, and gives maintainers a quick smoke test. Depends on retriever persistence for --index to be meaningful; until then the CLI can run ingest + query in one invocation.
Acceptance criteria
ragframework/cli.py with main(argv=None); [project.scripts] ragframework = "ragframework.cli:main" in pyproject.toml
Component selection by name with a small registry: --loader {auto,text,markdown,pdf,directory}, --chunker {fixed,recursive,sentence}, --embedder {random,huggingface}, --retriever {memory,faiss,chroma}, --generator {echo}; missing optional deps produce the standard install hint, exit code 1
Description
Add a small CLI (stdlib
argparse, no new required deps) exposed as a console script:ragframework ingest ./docs --index ./index --embedder huggingface --retriever faiss ragframework query "How do I configure chunk overlap?" --index ./index --top-k 3 ragframework --versionMotivation
Lets people evaluate the framework in 60 seconds without writing Python, and gives maintainers a quick smoke test. Depends on retriever persistence for
--indexto be meaningful; until then the CLI can run ingest + query in one invocation.Acceptance criteria
ragframework/cli.pywithmain(argv=None);[project.scripts] ragframework = "ragframework.cli:main"inpyproject.toml--loader {auto,text,markdown,pdf,directory},--chunker {fixed,recursive,sentence},--embedder {random,huggingface},--retriever {memory,faiss,chroma},--generator {echo}; missing optional deps produce the standard install hint, exit code 1--chunk-size,--chunk-overlap,--top-kmap ontoRAGConfigqueryprints the answer, then sources as[n] <id> (<source>);--jsonprints a machine-readableRAGResponse--verboseenablesloggingat INFO (see the logging issue)main([...])directly withtmp_pathfixtures and the random/echo components; alsopython -m ragframeworkworks (__main__.py)CHANGELOG.mdupdatedFiles to touch
ragframework/cli.py,ragframework/__main__.py— newpyproject.tomltests/test_cli.py— newREADME.mdResources
argparsesub-commandsEstimated effort: Medium (half day)