{"id":26600837,"url":"https://github.com/openpeeps/pkginfo","last_synced_at":"2025-10-06T03:27:01.620Z","repository":{"id":64530507,"uuid":"502911615","full_name":"openpeeps/pkginfo","owner":"openpeeps","description":"A tiny utility package to extract Nimble information from any .nimble project","archived":false,"fork":false,"pushed_at":"2023-05-10T01:35:55.000Z","size":126,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-23T18:48:10.327Z","etag":null,"topics":["macros","nim","nim-lang","nim-language","nimble","openpeep"],"latest_commit_sha":null,"homepage":"https://openpeeps.github.io/pkginfo/","language":"Nim","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/openpeeps.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2022-06-13T10:38:34.000Z","updated_at":"2024-09-12T13:20:36.000Z","dependencies_parsed_at":"2025-03-23T18:48:14.518Z","dependency_job_id":"d7c50938-d330-4c29-9074-eac72df3af8f","html_url":"https://github.com/openpeeps/pkginfo","commit_stats":null,"previous_names":["openpeeps/pkginfo"],"tags_count":5,"template":false,"template_full_name":"openpeeps/pistachio","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openpeeps%2Fpkginfo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openpeeps%2Fpkginfo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openpeeps%2Fpkginfo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openpeeps%2Fpkginfo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openpeeps","download_url":"https://codeload.github.com/openpeeps/pkginfo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248066024,"owners_count":21042019,"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":["macros","nim","nim-lang","nim-language","nimble","openpeep"],"created_at":"2025-03-23T18:35:39.006Z","updated_at":"2025-10-06T03:26:56.601Z","avatar_url":"https://github.com/openpeeps.png","language":"Nim","funding_links":["https://www.paypal.com/donate/?hosted_button_id=RJK3ZTDWPL55C"],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://raw.githubusercontent.com/georgelemon/nimble-website/main/.github/nimble.png\" width=\"70px\"\u003e\u003cbr\u003e\n    📦 A tiny utility package to extract Nimble information from any \u003ccode\u003e.nimble\u003c/code\u003e project\u003cbr\u003e\n\u003c/p\u003e\n\n## 😍 Key Features\n- [x] Enable features by a specific dependency 🎉\n- [x] Enable Backwards Compatibility support\n- [x] Magically `when requires \"pkg_name\"`\n- [x] Extract all package dependencies (`direct` + `indirect`)\n- [x] Cache metadata in `pkginfo.json` in Current Working Project\n- [x] Meta-programming powered by Nim's Macros 👑\n- [x] Open Source | `MIT` License\n\n## Installing\n```\nnimble install pkginfo\n```\n\n## Examples\n\nGet nimble meta data from current working project\n```nim\nimport pkginfo\n\nstatic:\n    echo pkg().getVersion\n    echo pkg().getDescription\n```\n\nUse `requires` macro to determine the current package dependencies and change the way application works.\n\n```nim\nimport pkginfo\n\nwhen requires \"toktok\":\n    # here you can import additional libraries or modules\n    # execute blocks of code or whatever you need\n```\n\nExtract the `version` of a package from `.nimble` project for backwards compatibility support\n```nim\nimport pkginfo\n\nwhen requires \"toktok\":\n    when pkg(\"toktok\").getVersion \u003c= v(\"0.1.1\"):\n        # backwards compatibility support\n    else:\n        # code for newer versions\n```\n\nChecking for the current Nim version from main `.nimble`\n```nim\nwhen nimVersion() \u003c v \"1.6.4\":\n    {.warning: \"You are using an older version of Nim\".}\n```\n\n## Roadmap\n- [x] Extract deps info\n- [x] Semver support via [Semver lib](https://github.com/euantorano/semver.nim)\n- [ ] Extend support for [Nimble variables](https://github.com/nim-lang/nimble#package)\n- [x] Handle indirect deps\n- [x] Cache dependency metadata in a `pkginfo.json`\n- [x] Add unit tests\n- [ ] Test with bigger projects\n- [x] Extract pkg info with `nimble dump \u003cpkg\u003e --json`\n- [ ] Handle local packages (linked with `nimble-link`)\n\n### ❤ Contributions\nContribute with code, ideas, bugfixing or you can even [donate via PayPal address](https://www.paypal.com/donate/?hosted_button_id=RJK3ZTDWPL55C) 🥰\n\n### 👑 Discover Nim language\n\u003cstrong\u003eWhat's Nim?\u003c/strong\u003e Nim is a statically typed compiled systems programming language. It combines successful concepts from mature languages like Python, Ada and Modula. [Find out more about Nim language](https://nim-lang.org/)\n\n\u003cstrong\u003eWhy Nim?\u003c/strong\u003e Performance, fast compilation and C-like freedom. We want to keep code clean, readable, concise, and close to our intention. Also a very good language to learn in 2022.\n\n### 🎩 License\nPkginfo is an Open Source Software released under `MIT` license. [Made by Humans from OpenPeep](https://github.com/openpeep).\u003cbr\u003e\nCopyright \u0026copy; 2022 OpenPeep \u0026 Contributors \u0026mdash; All rights reserved.\n\n\u003ca href=\"https://hetzner.cloud/?ref=Hm0mYGM9NxZ4\"\u003e\u003cimg src=\"https://openpeep.ro/banners/openpeep-footer.png\" width=\"100%\"\u003e\u003c/a\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenpeeps%2Fpkginfo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenpeeps%2Fpkginfo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenpeeps%2Fpkginfo/lists"}