Clone only a specific subfolder from a GitHub repository.
pip install clone-subdirAfter installation, you can use the clone-subdir command directly:
clone-subdir https://github.com/a2aproject/a2a-samples/tree/main/samples/python/agents/a2a-mcp-without-frameworkThis will create a local directory:
./a2a-mcp-without-framework
If you want a custom name:
clone-subdir https://github.com/a2aproject/a2a-samples/tree/main/samples/python/agents/a2a-mcp-without-framework my-agent-exampleThe tool uses Git's sparse-checkout feature to efficiently clone only the specified subfolder without downloading the entire repository.