{"id":33333920,"url":"https://github.com/vishal-ahirwar/leaf","last_synced_at":"2026-04-19T14:12:16.534Z","repository":{"id":312768822,"uuid":"1048256048","full_name":"vishal-ahirwar/leaf","owner":"vishal-ahirwar","description":"🍃Leaf a modern, fast, and intuitive project/package manager for C++","archived":false,"fork":false,"pushed_at":"2026-04-13T15:42:55.000Z","size":239,"stargazers_count":11,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-04-13T17:36:11.645Z","etag":null,"topics":["cli","cross-platform","modern-cpp","package-manager","project-management"],"latest_commit_sha":null,"homepage":"https://vishal-ahirwar.github.io/leaf.dev/","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vishal-ahirwar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":["vishal-ahirwar"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"lfx_crowdfunding":null,"polar":null,"buy_me_a_coffee":null,"thanks_dev":null,"custom":null}},"created_at":"2025-09-01T07:04:23.000Z","updated_at":"2026-04-13T15:42:59.000Z","dependencies_parsed_at":"2025-09-01T23:19:13.989Z","dependency_job_id":"9f33e869-44c7-4f97-93bb-bdead746da36","html_url":"https://github.com/vishal-ahirwar/leaf","commit_stats":null,"previous_names":["vishal-ahirwar/leaf"],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/vishal-ahirwar/leaf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vishal-ahirwar%2Fleaf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vishal-ahirwar%2Fleaf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vishal-ahirwar%2Fleaf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vishal-ahirwar%2Fleaf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vishal-ahirwar","download_url":"https://codeload.github.com/vishal-ahirwar/leaf/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vishal-ahirwar%2Fleaf/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32009278,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T20:23:30.271Z","status":"online","status_checked_at":"2026-04-19T02:00:07.110Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","cross-platform","modern-cpp","package-manager","project-management"],"created_at":"2025-11-21T00:06:26.373Z","updated_at":"2026-04-19T14:12:16.526Z","avatar_url":"https://github.com/vishal-ahirwar.png","language":"C++","funding_links":["https://github.com/sponsors/vishal-ahirwar"],"categories":[],"sub_categories":[],"readme":"# 🍃 Leaf\n\nA modern, fast, and intuitive package manager for C++ - inspired by Cargo for Rust.\n## Overview\n\nLeaf aims to bring the simplicity and power of Cargo to the C++ ecosystem. Just like how Cargo revolutionized Rust development, Leaf streamlines C++ project management with:\n\n- **Simple project initialization** - Get started with a single command\n- **Dependency management** - Add, remove, and update dependencies effortlessly  \n- **Build system integration** - Works seamlessly with CMake and other build systems\n- **Package registry** - Discover and share C++ libraries\n- **Cross-platform support** - Windows, Linux, and macOS\n\n## Features\n\n-  **Fast project setup** - `leaf new` and you're ready to code\n-  **Dependency management** - Add libraries with `leaf addpkg boost fmt spdlog`\n-  **Build integration** - Automatic CMake generation and build orchestration\n-  **Registry support** - Access to popular C++ libraries\n-  **Parallel builds** - Multi-threaded compilation for faster builds\n-  **Clean management** - Easy cleanup of build artifacts\n-  **Detailed logging** - Beautiful, colored output with progress indicators\n\n## Installation\n\n### Install with scripts\n\n#### Windows (`install.bat`)\n```bat\npowershell -NoProfile -ExecutionPolicy Bypass -Command \"Invoke-WebRequest -Uri https://raw.githubusercontent.com/vishal-ahirwar/leaf/master/install.bat -OutFile install.bat; .\\install.bat\"\n```\n\n#### macOS / Linux (`install.sh`)\n```bash\ncurl -fsSL https://raw.githubusercontent.com/vishal-ahirwar/leaf/master/install.sh | bash\n```\n\nAfter installation, open a new terminal and verify:\n```bash\nleaf version\n```\nIf you want to use mingw, this will setup mingw based toolchain on host os\n```bash\nleaf setup --mingw\n```\nIf you want to use clang, this will install all the tools you need to compile your project\nusing clang, on windows it will install visual studio build tools too\n```bash\nleaf setup\n```\n### Build from source\n\n### Prerequisites\n- C++20 compatible compiler ( Clang 19++)\n- CMake 3.20+\n- Conan 2.0+ (for dependency resolution)\n\n#### Using Leaf (Self-bootstrapping)\n```bash\ngit clone --recursive https://github.com/vishal-ahirwar/leaf.git\ncd leaf\nleaf build  # Uses existing Leaf installation to build itself\n```\n\n#### Manual CMake Build\n```bash\ngit clone --recursive https://github.com/vishal-ahirwar/leaf.git\ncd leaf\npython3 build.py\n```\n\n### Development Tools Generated\nLeaf automatically generates development configuration files:\n- `.clang-format` - Code formatting rules\n- `compile_commands.json` - For clangd LSP support\n- `.clangd` - Language server configuration\n\n## Quick Start\n\n### Create a new project\n```bash\nleaf new hello-world\ncd hello-world\n```\n\n### Add dependencies\n```bash\nleaf addpkg fmt boost spdlog\n```\n\n### Build your project\n```bash\nleaf build          # Debug build\nleaf build --release # Release build\nleaf build --target \u003ctarget\u003e\n```\n\n### Run your project\n```bash\nleaf run\nleaf run --release\nleaf run --target \u003ctarget\u003e\nleaf run --app \u003capp\u003e\n```\n\n### Test your project\n```bash\nleaf test\n```\n\n\n\n## Project Structure\n\nLeaf follows a conventional project layout\n\n## Advanced Usage\n\n# Features you will see in upcoming release\n### Custom Build Scripts\n```bash\n# Pre-build script\nleaf build --script prebuild.py\n\n# Post-build hook\nleaf build --post-script \"cpack -G DEB\"\n```\n\n### Cross-compilation\n```bash\n# Android cross-compilation\nleaf build --target android-arm64\nleaf build --target android-x86_64\n\n# Web/WASM compilation \nleaf build --target wasm32-emscripten\nleaf build --target wasm32-wasi\n\n# Other targets\nleaf build --target x86_64-linux-gnu\nleaf build --target aarch64-apple-darwin\nleaf build --target x86_64-pc-windows-msvc\n```\n\n#### Android Cross-compilation Setup\n```bash\n# Build for Android\nleaf build --target android-arm64\n```\n\n#### Web/WASM Compilation Setup  \n```bash\n# Build for Web\nleaf build --target wasm32-emscripten\n\n# The output will be .wasm + .js files ready for web deployment\n```\n\n#### Packages sharing\n```bash\nleaf publish\nleaf publish --remote \u003cremote\u003e\n```\n\n#### Setup registry for private packages\n```bash\nleaf setup --registry\nleaf serve --registry\n```\n## Integration with IDEs\n\n### CLion \u0026 Vscode\nLeaf automatically generates CMake files and `compile_commands.json` that CLion can import directly. The generated `.clangd` configuration provides optimal IntelliSense support.\n\n### Vim/Neovim\nWith generated development files:\n- `compile_commands.json` - For LSP completion via clangd\n- `.clangd` - Configured for optimal C++ support\n- `.clang-format` - Consistent code formatting\n\n\n## Contributing\n\nWe welcome contributions! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.\n\n#### Development Tools Integration\nThe build system automatically configures:\n\n**.clang-format**\n```yaml\nBasedOnStyle: Google\nIndentWidth: 2\nColumnLimit: 100\nSortIncludes: true\n```\n\n**.clangd** \n```yaml\nCompileFlags:\n  Add: [-std=c++20, -Wall, -Wextra]\n  Remove: [-W*, -std=*]\nIndex:\n  Background: Build\n```\n\n**compile_commands.json**\n\nGenerated automatically for perfect LSP integration with any editor.\n\n\u003cimg width=\"988\" height=\"547\" alt=\"image\" src=\"https://github.com/user-attachments/assets/210799f6-459a-4583-b4ec-2a9fae353e61\" /\u003e\n\u003cimg width=\"988\" height=\"547\" alt=\"image\" src=\"https://github.com/user-attachments/assets/a5f0edd7-68f1-42fe-8c76-30f4aea15991\" /\u003e\n\n## Roadmap\n\n- [x] **v0.1.0** - Basic project management and dependency resolution\n- [x] **v0.2.0** - Package registry and publishing\n- [ ] **v0.3.0** - Workspace support and multi-project management\n- [ ] **v0.4.0** - IDE integrations and tooling\n- [ ] **v0.5.0** - Cross-compilation and target management\n- [ ] **v1.0.0** - Stable API and production ready\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Acknowledgments\n\n- Inspired by [Cargo](https://doc.rust-lang.org/cargo/) for Rust\n- Built on top of [Conan](https://conan.io/) for dependency resolution  \n- Uses [CMake](https://cmake.org/) for build system generation\n\n---\n\n**Made with ❤️ for the C++ community**\n\n*\"Just like a leaf makes the tree beautiful, Leaf makes C++ development beautiful.\"*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvishal-ahirwar%2Fleaf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvishal-ahirwar%2Fleaf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvishal-ahirwar%2Fleaf/lists"}