{"id":20776681,"url":"https://github.com/daronenko/cpp-template","last_synced_at":"2025-03-11T21:44:20.457Z","repository":{"id":235175711,"uuid":"760320902","full_name":"daronenko/cpp-template","owner":"daronenko","description":"simple and powerful template for your projects in c++","archived":false,"fork":false,"pushed_at":"2024-08-10T20:36:08.000Z","size":17,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-18T08:19:10.567Z","etag":null,"topics":["cmake","compose","cpp","docker","make","modern","project","sanitizer","template"],"latest_commit_sha":null,"homepage":"","language":"CMake","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/daronenko.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2024-02-20T07:45:35.000Z","updated_at":"2024-11-13T13:20:14.000Z","dependencies_parsed_at":"2024-04-22T15:21:04.148Z","dependency_job_id":"8fc61cfd-3162-44b0-9a6c-7c63acce88a2","html_url":"https://github.com/daronenko/cpp-template","commit_stats":null,"previous_names":["daronenko/cpp-template"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daronenko%2Fcpp-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daronenko%2Fcpp-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daronenko%2Fcpp-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daronenko%2Fcpp-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/daronenko","download_url":"https://codeload.github.com/daronenko/cpp-template/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243119664,"owners_count":20239319,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["cmake","compose","cpp","docker","make","modern","project","sanitizer","template"],"created_at":"2024-11-17T13:10:46.628Z","updated_at":"2025-03-11T21:44:20.435Z","avatar_url":"https://github.com/daronenko.png","language":"CMake","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# cpp-template\n\nsimple and powerful template for your projects in c++\n\n\u003c/div\u003e\n\n## Contents\n\n- [Features](#features)\n- [Dependencies](#dependencies)\n- [Getting Started](#getting-started)\n- [Commands](#commands)\n  - [Debug](#debug-commands)\n  - [Release](#release-commands)\n  - [Other](#other-commands)\n- [Inspired by](#inspired-by)\n- [License](#license)\n\n## Features \u003ca name=\"features\"\u003e\u003c/a\u003e\n\n- unit testing with [googletest](https://github.com/google/googletest)\n- common components with [wheels](https://gitlab.com/Lipovsky/wheels)\n- simple commands for all needs with [make](https://www.gnu.org/software/make/manual/make.html)\n- containerization with [docker](https://www.docker.com) \u0026 [docker compose](https://docs.docker.com/compose/)\n- code linting with [clang-tidy](https://clang.llvm.org/extra/clang-tidy)\n- code formatting with [clang-format](https://clang.llvm.org/docs/ClangFormat.html)\n- configured [ub](https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html), [address](https://clang.llvm.org/docs/AddressSanitizer.html) \u0026 [thread](https://clang.llvm.org/docs/ThreadSanitizer.html) sanitizers\n\n## Dependencies \u003ca name=\"dependencies\"\u003e\u003c/a\u003e\n\nTo run the project locally, you need to install the following dependencies:\n\n- [cmake](https://cmake.org)\n- [make](https://www.gnu.org/software/make/manual/make.html)\n\nOptionally:\n\n- [clang-format](https://clang.llvm.org/docs/ClangFormat.html) (for autoformatting)\n- [clang-tidy](https://clang.llvm.org/extra/clang-tidy) (for linting)\n- [docker](https://www.docker.com) \u0026 [docker compose](https://docs.docker.com/compose/) (for containerization)\n\n## Getting Started \u003ca name=\"getting-started\"\u003e\u003c/a\u003e\n\n1. Click on the \"Use this template\" button and clone your repo:\n\n```sh\ngit clone https://github.com/daronenko/cpp-template.git\n```\n\n2. Rename the project (only works on linux):\n\n```sh\nfind . -not -path \"./third_party/*\" -not -path \".git/*\" -not -path './build_*' -type f | xargs sed -i 's/cpp-template/\u003cYOUR-PROJECT-NAME\u003e/g'\n```\n\nYou can check if everything has been replaced with:\n\n```sh\ngrep -r \"cpp-template\" .\n```\n\n## Commands \u003ca name=\"commands\"\u003e\u003c/a\u003e\n\n### Debug \u003ca name=\"debug-commands\"\u003e\u003c/a\u003e\n\n- `make build-debug` - build debug version\n- `make start-debug` - run debug version\n- `make test-debug` - build debug, unit tests and run tests\n- `make clean-debug` - remove `build_debug` directory (also works for docker)\n- `make install-debug` - install debug version of project in `/usr/local/bin/`\n- `make docker-build-debug` - build debug in docker\n- `make docker-start-debug` - run the container with debug version\n- `make docker-test-debug` - build debug and run tests\n\n### Release \u003ca name=\"release-commands\"\u003e\u003c/a\u003e\n\n- `make` - test and run release version of project\n- `make build-release` - build release version\n- `make start-release` - run release version\n- `make test-release` - build release, unit tests and run tests\n- `make clean-release` - remove `build_release` directory (also works for docker)\n- `make install` or `make install-release` - install release version of project in `/usr/local/bin/`\n- `make docker-build-release` - build release in docker\n- `make docker-start-release` - run the container with release version\n- `make docker-test-release` - build release and run tests\n\n### Other \u003ca name=\"other-commands\"\u003e\u003c/a\u003e\n\n- `make format` - autoformat `.cpp` and `.hpp` files\n- `make lint` - check `.cpp` and `.hpp` files with linter\n- `make clean-docker` - stop and remove container\n\n## Inspired by \u003ca name=\"inspired-by\"\u003e\u003c/a\u003e\n\n- [userver-framework/service_template](https://github.com/userver-framework/service_template)\n- [Lipovsky/wheels](https://gitlab.com/Lipovsky/wheels)\n\n## License \u003ca name=\"license\"\u003e\u003c/a\u003e\n\nDistributed under the MIT License. See [LICENSE](https://github.com/daronenko/cpp-template/blob/main/LICENSE) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaronenko%2Fcpp-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaronenko%2Fcpp-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaronenko%2Fcpp-template/lists"}