{"id":21703684,"url":"https://github.com/frodoalaska/ymir","last_synced_at":"2026-04-29T01:02:10.611Z","repository":{"id":222416279,"uuid":"757223922","full_name":"FrodoAlaska/Ymir","owner":"FrodoAlaska","description":"A lightweight C++ project generator","archived":false,"fork":false,"pushed_at":"2025-05-14T02:08:03.000Z","size":3045,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-06T01:05:29.073Z","etag":null,"topics":["cli","command-line","command-line-tool","cpp","cpp-project-template","project-generation","project-generator"],"latest_commit_sha":null,"homepage":"https://frodoalaska.github.io/","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/FrodoAlaska.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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}},"created_at":"2024-02-14T03:33:25.000Z","updated_at":"2025-05-14T02:09:20.000Z","dependencies_parsed_at":"2024-02-17T10:31:59.671Z","dependency_job_id":"bd99684c-07ca-42ee-abb0-6cde06327057","html_url":"https://github.com/FrodoAlaska/Ymir","commit_stats":null,"previous_names":["mohamedag2002/ymir","frodoalaska/ymir"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/FrodoAlaska/Ymir","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FrodoAlaska%2FYmir","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FrodoAlaska%2FYmir/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FrodoAlaska%2FYmir/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FrodoAlaska%2FYmir/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FrodoAlaska","download_url":"https://codeload.github.com/FrodoAlaska/Ymir/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FrodoAlaska%2FYmir/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32405903,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-28T19:38:08.556Z","status":"ssl_error","status_checked_at":"2026-04-28T19:37:55.688Z","response_time":56,"last_error":"SSL_read: 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":["cli","command-line","command-line-tool","cpp","cpp-project-template","project-generation","project-generator"],"created_at":"2024-11-25T21:34:38.678Z","updated_at":"2026-04-29T01:02:10.593Z","avatar_url":"https://github.com/FrodoAlaska.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ymir \n\nYmir is a lightweight and flexible C++ project generator for both Windows and Linux. \n\nYmir is __not__ a C++ build system. \nIt is __not__ a replacement for CMake or any other build system. In fact, Ymir uses CMake under the hood. \n\nYmir is only a useful tool to generate all the necessary files and directories (specified by you) in order to start developing a C++ project faster. \n\nYmir will: \n    - *Create* a main directory for the project.\n    - *Generate* a top-level `CMakeLists.txt` file with all the required options set. The file is commented and quite robust although somewhat simple. \n    - *Create* the main directories where all your source files will live as well as a directory for all your third-party libraries. \n    - *Generate* a default `main.cpp` file for convenience \n    - *Generate* a `.gitignore` and a `.gitattributes` if Git is enabled.\n\nBesides that, Ymir can set a few configurations for the initial state of your project. Configurations such as the C++ standard, any initial project definitions, compiler flags, and so on.\n\n\n## Build Instructions \n\nLike most C++ projects, Ymir uses CMake as its build system. The following commands will compile Ymir and produce a `ymir` executable. \n\n```bash\nmkdir build \u0026\u0026 cd build \ncmake .. \nmake\n```\n\nYmir does not have any dependencies at all. It only uses `C++17` features and that's it. The compilation process should be quite simple and fast. \n\nAfterwards, you can execute the `ymir` command from the build directory or install it system-wide like so: \n\n```bash\nsudo make install\n```\n\nThat command will only work for Linux, however. For Windows, you can place Ymir anywhere but you _must_ add it to your environment variables in order to use it from anywhere.\n\n## Usage\n\nFinally, now you can use Ymir in all its glory. You should pass the `--help` flag to Ymir to get a better idea of what can be done. \n\n```\nymir --help\n```\n\nWill produce: \n\n```\n### ### Ymir: A C++ project generator ### ###\n\n[Usage]: ymir [options] --new \u003cproject_name\u003e\n        [--new, -n]          = The name of the new project\n        [--standard, -std]   = Define the standard of the language (by default, this is 20)\n        [--type, -t]         = Can be either CONSOLE_APP, GUI_APP, or LIBRARY\n        [--definitions, -d]  = List all of the project's definitions inside quotes\n        [--flags, -f]        = List all of the project's compiler flags inside quotes\n        [--src-dir, -sd]     = Define the name of the source directory (by default, this is 'src')\n        [--include-dir, -id] = Define the name of the include directory (by default, this is 'src')\n        [--deps-dir, -dd]    = Define the name of the dependencies directory (by default, this is 'libs')\n        [--has-git, -g]      = Create both a .gitignore and a .gitattributes file if set (by default, this is unset)\n        [--help, -h]         = Show this help screen\n\n### ### Ymir: A C++ project generator ### ###\n```\n\nThe most important flag is the `--new` flag since it will start the process of creating a C++ project with the given name. \n\n```\nymir --new \"NewCPPProject\"\n```\n\nWith only this command, you'll have a new project directory with the name `NewCPPProject` with the following contents:\n\n```\n- NewCPPProject/\n    - libs/ \n    - src/\n        main.cpp\n    - CMakeLists.txt\n```\n\nAlthough it is somewhat minimal, it is just enough to get started. However, if you wish to change or add a few configurations, you can use the various flags Ymir offers. \n\nFor example, the `--standard` flag or its alias `-std` will set the C++ language standard. \n\n```\nymir -std 20 --new \"NewCPPProject\"\n```\n\nYou can also change the _type_ of the C++ project. A library is different from a console application, and those are different still from a GUI application. Using the `--type` (or `-t`) flag will give you the flexibility of choosing a specific project type. \n\n```\nymir -std 20 -t CONSOLE_APP --new \"NewConsoleApp\"\n```\n\nThe `--type` flag accepts either `CONSOLE_APP`, `GUI_APP`, or `LIBRARY`. The difference between these types under the hood is the way the `CMakeLists.txt` and the default `main.cpp` files will be configured. For example, for the `CONSOLE_APP` project type, the CMake file will have the usual: \n\n```cmake\nadd_executable(${PROJECT_NAME} ${PROJECT_SOURCES})\n```\n\nHowever, for a `LIBRARY` project, the following will be used: \n\n```cmake\n# 'SHARED' is used by default but it can be changed\nadd_library(${PROJECT_NAME} SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})\n```\nThe `GUI_APP` project does not differ _too_ much from a regular `CONSOLE_APP`. However, on both Windows and MacOS, if you wish to disable the console completely (which is quite likely in a GUI application), the `add_executable` CMake command needs to include either the `WIN32` or the `MACOSX_BUNDLE` flags respectfully. Besides that, GUI applications on Windows have a unique entry point.\n\n```c++\n#include \u003cwindows.h\u003e\n\nint WINAPI WinMain(HINSTANCE inst, HINSTANCE prev_inst, LPSTR cmd_line, int cmd_show) {\n  return 0;\n}\n```\n\nMoving on, we can also add some configurations to the C++ project by using both the `--definitions` (or `-d`) and the `--flags` (or `-f`) flags. \n\n```\nymir -std 20 -t GUI_APP -d \"GLFW_INCLUDE_NONE\" -f \"-lm -w\" --new \"NewGameProject\"\n```\n\nJust make sure to include multiple flags or definitions in the same string on the command line.\n\nBy default, Ymir keeps both the translation units (`.cpp` or `.c`) and the header files in the same directory--`src`. But that can easily be changed. \n\n```\nymir -std 20 -t LIBRARY --src-dir \"src\" --include-dir \"include/library_name\" -n \"NewLibrary\"\n```\n\nYmir also generates a directory for third-party libraries. And, like the source and include directories, it can also be changed to your liking. \n\n```\nymir -std 20 -t LIBRARY --deps-dir \"thirdparty\" -n \"NewLibrary\"\n```\n\nYmir can also generate two Git files if the `--has-git` (or the alias `-g`) flag is set. Mainly, Ymir will generate a `.gitignore` and a `.gitattributes` file in the main directory.\n\n```\nymir -std 20 -t LIBRARY --src-dir \"src\" --include-dir \"include/library_name\" --deps-dir \"thirdparty\" -n \"NewLibrary\" -g\n```\n\nWith the previous command, the newly generated project directory should look something like this: \n\n```\n- NewLibrary/ \n    - include/ \n    - src/\n        main.cpp\n    - thirdparty/ \n    - CMakeLists.txt\n    - .gitignore\n    - .gitattributes\n```\n\nIf the `cmake ..` command is run on the main directory, a new binary will be produced with no issues (hopefully).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrodoalaska%2Fymir","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffrodoalaska%2Fymir","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrodoalaska%2Fymir/lists"}