{"id":23167659,"url":"https://github.com/oblivious-oblivious/emeralds","last_synced_at":"2026-05-24T01:01:20.022Z","repository":{"id":107334004,"uuid":"274232263","full_name":"Oblivious-Oblivious/Emeralds","owner":"Oblivious-Oblivious","description":"A module/package manager for C applications","archived":false,"fork":false,"pushed_at":"2026-05-19T18:52:43.000Z","size":378,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-05-19T22:18:35.526Z","etag":null,"topics":["continuous-integration","crystal","emeralds","package-management"],"latest_commit_sha":null,"homepage":"","language":"Crystal","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/Oblivious-Oblivious.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2020-06-22T20:11:26.000Z","updated_at":"2026-05-16T17:23:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"0093140e-5efd-4800-a7d7-68e1ec1b637b","html_url":"https://github.com/Oblivious-Oblivious/Emeralds","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/Oblivious-Oblivious/Emeralds","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Oblivious-Oblivious%2FEmeralds","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Oblivious-Oblivious%2FEmeralds/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Oblivious-Oblivious%2FEmeralds/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Oblivious-Oblivious%2FEmeralds/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Oblivious-Oblivious","download_url":"https://codeload.github.com/Oblivious-Oblivious/Emeralds/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Oblivious-Oblivious%2FEmeralds/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33417489,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-23T22:14:44.296Z","status":"ssl_error","status_checked_at":"2026-05-23T22:14:43.778Z","response_time":53,"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":["continuous-integration","crystal","emeralds","package-management"],"created_at":"2024-12-18T02:31:39.943Z","updated_at":"2026-05-24T01:01:20.015Z","avatar_url":"https://github.com/Oblivious-Oblivious.png","language":"Crystal","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Emeralds\n\n[![Built with Crystal](https://img.shields.io/badge/built%20with-crystal-000000.svg?)](https://crystal-lang.org/)\n[![GPLv3 License](https://img.shields.io/badge/license-GPL%20v3-yellow.svg)](./LICENSE)\n\n[![CI](https://github.com/Oblivious-Oblivious/Emeralds/workflows/CI/badge.svg)](https://github.com/Oblivious-Oblivious/Emeralds/actions?query=workflow%3ACI)\n\nA module/package manager for C applications.\n\n## Releases\n\n### Homebrew\n\n```bash\nbrew install Oblivious-Oblivious/tap/emeralds\n```\n\n### One-line install\n\n```bash\ncurl -fsSL https://raw.githubusercontent.com/Oblivious-Oblivious/Emeralds/v0.10.3/get.sh | sh\n```\n\n### Windows with [scoop.sh](https://scoop.sh/).\n\n```powershell\nscoop install https://raw.githubusercontent.com/Oblivious-Oblivious/homebrew-tap/master/emeralds.json\n```\n\n### From source\n\nRequires [Crystal](https://crystal-lang.org/) and Shards. Clone the repo first.\n\n**Install script**\n\n```bash\nchmod 755 install.sh\n./install.sh\n```\n\n**On Windows**\n\n```\n.\\install-win32.bat\n```\n\n## Usage\n\n```\nem help\n```\n\n```\nEmeralds - Help/Usage\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\nemeralds/em [\u003ccommand\u003e]\n\nCommands:\n    add [\u003cname\u003e]                        - Add a new .c/.h file pair\n    remove [\u003cname\u003e]                     - Remove a .c/.h file pair\n    build [app | lib] [debug | release] - Build the application in the `export` directory.\n    run                                 - Run the compiled application.\n    clean                               - Run the clean script\n    help                                - Print this help message.\n    init [\u003cname\u003e]                       - Initialize a new library with an em.json file.\n    install [ | dev | all]              - Install dependencies into a flattened libs directory.\n    reinstall                           - Reinstall dependencies into a flattened libs directory.\n    uninstall [\u003cname\u003e]                  - Remove a dependency from em.json and libs.\n    list                                - List dependencies and project modules.\n    makefile                            - Generate a makefile for independent compilation\n    loc                                 - Count the significant lines of code in the project\n    lint                                - Lint all project sources with clang-format.\n    test                                - Run the script of tests.\n    version                             - Print the current version of the emerald.\n    license                             - Update the license notice based on the em.json value.\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n```\n\n**To start a new project:**\n\n```\nem init YourApp\n```\n\n```\nEmeralds - Initializing a new project\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n⚙ Creating directory: YourApp\n⚙ Writing initial files:\n  ➔ em.json\n  ➔ .git\n  ➔ spec\n    ➔ get_value\n      ➔ get_value.module.spec.h\n    ➔ YourApp.spec.c\n  ➔ src\n    ➔ get_value\n      ➔ get_value.c\n      ➔ get_value.h\n    ➔ YourApp.c\n  ➔ .clangd\n  ➔ .clang-format\n  ➔ .gitignore\n  ➔ LICENSE\n  ➔ README.md\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\nAll done in 0.697 seconds\n```\n\n**Add a new module, a `.c`/`.h` pair plus its test spec:**\n\n```\nem add one\n```\n\n```\nEmeralds - Adding new .c/.h pair...\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n➔ one\n  ➔ one.c\n  ➔ one.h\n  ➔ one.module.spec.h\n  ➔ YourApp.spec.c\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\nAll done in 0.001 seconds\n```\n\nThis creates `src/one/one.c`, `src/one/one.h`, and `spec/one/one.module.spec.h`, then wires the module into `spec/YourApp.spec.c` by adding its `#include` and a `T_one();` call to `cspec_run_suite`.\n\n**Remove a module, deleting its source, header, and spec:**\n\n```\nem remove one\n```\n\n```\nEmeralds - Removing .c/.h pair...\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n➔ one\n  ➔ one.c\n  ➔ one.h\n  ➔ one.module.spec.h\n  ➔ YourApp.spec.c\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\nAll done in 0.001 seconds\n```\n\nThis deletes `src/one/` and `spec/one/`, then strips the module's `#include` and `T_one();` call from `spec/YourApp.spec.c`.\n\n**Manage dependencies, navigate into your project and list dependencies:**\n\n```\ncd YourApp\nem list\n```\n\n```\nEmeralds - Em libraries used:\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\nDependencies:\n  ⚙ cSpec\n\nModules:\n  ⚙ get_value\n\n➔ 1 dependency\n➔ 1 module\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\nAll done in 0.001 seconds\n```\n\n**Install dependencies:**\n\n```\nem install all\n```\n\n```\nEmeralds - Resolving all dependencies...\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n ⚙ Installing `cSpec`\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\nAll done in 3.822 seconds\n```\n\n**Uninstall a dependency:**\n\n```\nem uninstall cSpec\n```\n\n```\nEmeralds - Uninstalling dependency...\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n  ⚙ Removed `cSpec` from em.json\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\nAll done in 0.001 seconds\n```\n\nThis removes the named entry from both `dependencies` and `dev-dependencies` in `em.json` and deletes the corresponding `libs/\u003cname\u003e` directory.\n\n**Edit configuration json file:**\n\n```\ncat em.json\n```\n\n```\n{\n  \"name\": \"YourApp\",\n  \"version\": \"0.0.1\",\n  \"license\": \"mit\",\n  \"locignore\": {\n    \"extensions\": [],\n    \"directories\": []\n  },\n  \"lintignore\": {\n    \"extensions\": [],\n    \"directories\": []\n  },\n  \"scripts\": {},\n  \"compile-flags\": {\n    \"darwin\": {\n      \"cc\": \"clang\",\n      \"debug\": {\n        \"opt\": \"-O2\",\n        \"version\": \"-std=c89\",\n        \"flags\": \"-g -fsanitize=address\",\n        \"warnings\": \"-Wall -Wextra -Werror -pedantic -pedantic-errors -Wpedantic\"\n      },\n      \"release\": {\n        \"opt\": \"-O2\",\n        \"version\": \"-std=c89\",\n        \"flags\": \"\",\n        \"warnings\": \"\"\n      }\n    },\n    \"linux\": {\n      \"cc\": \"gcc\",\n      \"debug\": {\n        \"opt\": \"-Og\",\n        \"version\": \"-std=c89\",\n        \"flags\": \"-g\",\n        \"warnings\": \"-Wall -Wextra -Werror -pedantic -pedantic-errors -Wpedantic\"\n      },\n      \"release\": {\n        \"opt\": \"-O3\",\n        \"version\": \"\",\n        \"flags\": \"\",\n        \"warnings\": \"\"\n      }\n    },\n    \"win32\": {\n      \"cc\": \"gcc\",\n      \"debug\": {\n        \"opt\": \"-O2\",\n        \"version\": \"-std=c89\",\n        \"flags\": \"-g\",\n        \"warnings\": \"-Wall -Wextra -Werror -pedantic -pedantic-errors -Wpedantic\"\n      },\n      \"release\": {\n        \"opt\": \"-O2\",\n        \"version\": \"-std=c89\",\n        \"flags\": \"\",\n        \"warnings\": \"\"\n      }\n    }\n  },\n  \"dependencies\": {},\n  \"dev-dependencies\": {\n    \"cSpec\": \"Oblivious-Oblivious/cSpec\"\n  }\n}\n```\n\n- **name**: The name of your application or library.\n- **version**: The version number displayed with `em version`.\n- **license**: The project's license. This should be a valid SPDX license identifier.\n  - Available license types: `mit`, `gpl-v2`, `apache-v2`, `gpl-v3`, `lgpl-v3`, `mpl-v2`, `epl-v2`, `agpl-v3`, `cc0-v1`, `cc0-v4`\n- **scripts**: Custom commands runnable with `em \u003cscript\u003e`. Script names can override built-in commands. Values can be a string command or an array of command lines.\n```\n\"scripts\": {\n  \"build\": [\n    \"mkdir -p export\",\n    \"clang -O2 -o export/YourApp src/YourApp.c\"\n  ]\n}\n```\n- **locignore**: Extensions and project-relative directories ignored by `em loc`.\n- **lintignore**: Extensions and project-relative directories ignored by `em lint`.\n- **compile-flags**: The set of compiler flags.\n  - Platform keys can use Crystal-supported operating system flags (e.g., `win32`, `linux`, `darwin`, `unix`).\n  - **cc**: The C compiler to use for that platform.\n  - **debug**: Debug build flags for that platform.\n  - **release**: Release build flags for that platform.\n    - **opt**: Optimization level (e.g., -Og, -O0).\n    - **version**: The C standard to use (e.g., -std=c89, -std=c11).\n    - **flags**: Additional compiler flags (e.g., -g -fsanitize=address).\n    - **warnings**: Warning flags to enable (e.g., -Wall -Wextra).\n    - **libs** Additional linked static or shared libraries.\n- **dependencies**: A table of dependencies required for the project to run. The value grabs any Emeralds-compatible repository on GitHub (_user/repo_).\n- **dev-dependencies**: A table of development dependencies **not** linked with the release version.\n\n**Testing your application and run the test suite:**\n\n```\nem test\n```\n\n```\nEmeralds - Running tests...\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n➔ rm -rf spec/spec_results\n➔ clang -Og -std=c2x -g -fsanitize=address -Wall -Wextra -Werror -pedantic -pedantic-errors -Wpedantic -o spec/spec_results  src/get_value/get_value.c spec/YourApp.spec.c\n\n➔ ./spec/spec_results\n/######## ########/\n/##### cSpec #####/\n/######## ########/\n\nModule `T_get_value`\n    `#get_value`\n        ✓ it returns `Hello, World!`\n\n● 1 tests\n✓ 1 passing\n✗ 0 failing\n- 0 skipped\n★ Finished in 0.00487 ms\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\nAll done in 4.039 seconds\n```\n\n**Build your application:**\n\n```\nem build app release\n```\n\n```\nEmeralds - Compiling as an app...\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n➔ clang -O2 -std=c89   -o export/YourApp  src/get_value/get_value.c src/YourApp.c\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\nAll done in 0.424 seconds\n```\n\n**Run the executable:**\n\n```\n./export/YourApp\n\nHello, World!\n```\n\n**Clean up project build artifacts:**\n\n```\nem clean\n```\n\n```\nEmeralds - Cleaning the library files...\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n➔ rm -rf spec/spec_results\n➔ rm -rf export\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\nAll done in 0.003 seconds\n```\n\n**Lint the project sources:**\n\n```\nem lint\n```\n\n```\nEmeralds - Linting sources...\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n➔ spec/YourApp.spec.c\n➔ spec/get_value/get_value.module.spec.h\n➔ src/YourApp.c\n➔ src/get_value/get_value.c\n➔ src/get_value/get_value.h\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\nAll done in 0.012 seconds\n```\n\nThis runs `clang-format` on every file found from the project root, using the `.clang-format` generated by `em init`.\n\n## Contributing\n\n1. Fork it (\u003chttps://github.com/Oblivious-Oblivious/Emeralds/fork\u003e)\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create a new Pull Request\n\n## Contributors\n\n- [atha](https://github.com/Oblivious-Oblivious) - creator and maintainer\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foblivious-oblivious%2Femeralds","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foblivious-oblivious%2Femeralds","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foblivious-oblivious%2Femeralds/lists"}