{"id":30815452,"url":"https://github.com/apebl/cppgen","last_synced_at":"2026-05-16T18:08:17.701Z","repository":{"id":62565147,"uuid":"346098932","full_name":"apebl/cppgen","owner":"apebl","description":"A command-line utility to generate boilerplate C/C++ code","archived":false,"fork":false,"pushed_at":"2021-03-09T18:20:09.000Z","size":8,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-06T08:22:28.084Z","etag":null,"topics":["code-generation","code-generator","cpp","python"],"latest_commit_sha":null,"homepage":"","language":"Python","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/apebl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-03-09T18:06:07.000Z","updated_at":"2023-05-11T03:59:20.000Z","dependencies_parsed_at":"2022-11-03T16:15:25.266Z","dependency_job_id":null,"html_url":"https://github.com/apebl/cppgen","commit_stats":null,"previous_names":["apebl/cppgen","kosmospredanie/cppgen"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/apebl/cppgen","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apebl%2Fcppgen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apebl%2Fcppgen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apebl%2Fcppgen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apebl%2Fcppgen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/apebl","download_url":"https://codeload.github.com/apebl/cppgen/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apebl%2Fcppgen/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33113509,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-16T04:41:52.686Z","status":"ssl_error","status_checked_at":"2026-05-16T04:41:52.009Z","response_time":115,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["code-generation","code-generator","cpp","python"],"created_at":"2025-09-06T08:13:34.403Z","updated_at":"2026-05-16T18:08:17.661Z","avatar_url":"https://github.com/apebl.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cppgen\n\nA command-line utility to generate boilerplate C/C++ code.\n\n```\npip install --user cppgen\n```\n\n## `cppgen`\n\nGenerates C/C++ definition files from header files.\n\n### Usage\n\n```\nusage: cppgen [-h] [--cpp CPP] [--ipp IPP] [-c {default,gnu,google}]\n              [-i {convention,space,tab}] [-t TABSIZE] [--no-todo]\n              FILE [FILE ...]\n\nGenerate definitions from headers\n\npositional arguments:\n  FILE                  A header file\n\noptional arguments:\n  -h, --help            show this help message and exit\n  --cpp CPP             Suffix for files containing function definitions\n                        (default: .cpp)\n  --ipp IPP             Suffix for files containing inline/template function\n                        definitions (default: .ipp)\n  -c {default,gnu,google}, --convention {default,gnu,google}\n                        Specify coding convention (default: default)\n  -i {convention,space,tab}, --indent {convention,space,tab}\n                        Specify indentation character (default: follow\n                        convention)\n  -t TABSIZE, --tabsize TABSIZE\n                        Specify tab size (default: 0; follow convention)\n  --no-todo             Do not insert todo comments\n```\n\n### Example\n\nHeader:\n\n```cpp\n// example.hpp\nnamespace example {\n    class Test {\n    public:\n        Test ();\n        ~Test ();\n        int get ();\n    };\n}\n```\n\nRun:\n\n```sh\n$ cppgen example.hpp\nGenerate: example.hpp -\u003e example.cpp\n```\n\nAnd result (`example.cpp`):\n\n```cpp\n#include \"example.hpp\"\n\nnamespace example {\n\nTest::Test () {\n    // TODO\n}\n\nTest::~Test () {\n    // TODO\n}\n\nint Test::get () {\n    // TODO\n}\n\n} /* namespace example */\n```\n\n## `hppgen`\n\nGenerates a header file.\n\n### Usage\n\n```\nusage: hppgen [-h] [--suffix SUFFIX] [-f {snake_case,hyphen-case,lowercase,UPPERCASE,camelCase,PascalCase,CONST_CASE}] [-c {default,gnu,google}] [-i {convention,space,tab}] [-t TABSIZE] [TYPE] NAME\n\nGenerate a header\n\npositional arguments:\n  TYPE                  Type: class, struct, or enum (default: class)\n  NAME                  (\u003cNAMESPACE\u003e::)*\u003cNAME\u003e\n\noptional arguments:\n  -h, --help            show this help message and exit\n  --suffix SUFFIX       Suffix for the generated header file (default: .hpp)\n  -f {snake_case,hyphen-case,lowercase,UPPERCASE,camelCase,PascalCase,CONST_CASE}, --file-convention {snake_case,hyphen-case,lowercase,UPPERCASE,camelCase,PascalCase,CONST_CASE}\n                        Specify file naming convention (default: snake_case)\n  -c {default,gnu,google}, --convention {default,gnu,google}\n                        Specify coding convention (default: default)\n  -i {convention,space,tab}, --indent {convention,space,tab}\n                        Specify indentation character (default: follow convention)\n  -t TABSIZE, --tabsize TABSIZE\n                        Specify tab size (default: 0; follow convention)\n```\n\n### Example\n\nRun:\n\n```sh\n$ hppgen foo::Bar\nGenerate: foo/bar.hpp\n```\n\nAnd result (`foo/bar.hpp`):\n\n```cpp\n#ifndef FOO_BAR_HPP\n#define FOO_BAR_HPP\n\nnamespace foo {\n\nclass Bar {\npublic:\n    Bar ();\n    ~Bar ();\n    Bar (const Bar \u0026other);\n    Bar (Bar \u0026\u0026other);\n\nprivate:\n};\n\n} /* namespace foo */\n\n#endif /* FOO_BAR_HPP */\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapebl%2Fcppgen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapebl%2Fcppgen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapebl%2Fcppgen/lists"}