{"id":13878240,"url":"https://github.com/rubyatscale/packs","last_synced_at":"2025-06-19T11:07:11.933Z","repository":{"id":39668247,"uuid":"507074640","full_name":"rubyatscale/packs","owner":"rubyatscale","description":"packs are a specification for an extensible packaging system to help modularize Ruby applications.","archived":false,"fork":false,"pushed_at":"2025-01-07T22:31:54.000Z","size":2114,"stargazers_count":95,"open_issues_count":0,"forks_count":17,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-06-18T17:56:21.564Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","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/rubyatscale.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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-24T16:22:32.000Z","updated_at":"2025-06-11T23:22:18.000Z","dependencies_parsed_at":"2023-12-21T22:23:55.632Z","dependency_job_id":"8bd767f4-d584-44a9-b04c-2f901d939f93","html_url":"https://github.com/rubyatscale/packs","commit_stats":{"total_commits":16,"total_committers":1,"mean_commits":16.0,"dds":0.0,"last_synced_commit":"c699c907f663cd144dd40e85b539a1e78bb09ec9"},"previous_names":["rubyatscale/use_packwerk","rubyatscale/use_packs"],"tags_count":86,"template":false,"template_full_name":null,"purl":"pkg:github/rubyatscale/packs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubyatscale%2Fpacks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubyatscale%2Fpacks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubyatscale%2Fpacks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubyatscale%2Fpacks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rubyatscale","download_url":"https://codeload.github.com/rubyatscale/packs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubyatscale%2Fpacks/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260606207,"owners_count":23035342,"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":[],"created_at":"2024-08-06T08:01:43.643Z","updated_at":"2025-06-19T11:07:06.918Z","avatar_url":"https://github.com/rubyatscale.png","language":"Ruby","funding_links":[],"categories":["Ruby"],"sub_categories":[],"readme":"# packs\n\n`packs` are a specification for an extensible packaging system to help modularize Ruby applications.\n\nA `pack` (short for `package`) is a folder of Ruby code with a `package.yml` at the root that is intended to represent a well-modularized domain.\n\nThis gem provides a development CLI, `bin/packs`, to make using `packs` easier.\n\n# Configuration\nBy default, this library will look for `packs` in the folder `packs/*/package.yml` (as well as nested packs at `packs/*/*/package.yml`). To change where `packs` are located, create a `packs.yml` file in the root of your project:\n```yml\npack_paths:\n  - \"{packs,utilities,deprecated}/*\" # packs with multiple roots!\n  - \"{packs,utilities,deprecated}/*/*\" # nested packs!\n  - gems/* # gems can be packs too!\n```\n\n# Ecosystem\nThe rest of the [rubyatscale](https://github.com/rubyatscale) ecosystem is intended to help make using packs and improving the boundaries between them more clear.\n\nHere are some example integrations with `packs`:\n- [`packs-specification`](https://github.com/rubyatscale/packs-specification) is a low-dependency gem that allows your production environment to query simple information about packs\n- [`packs-rails`](https://github.com/rubyatscale/packs-rails) can be used to integrate `packs` into your `rails` application\n- [`rubocop-packs`](https://github.com/rubyatscale/rubocop-packs) contains cops to improve boundaries around `packs`\n- [`packwerk`](https://github.com/Shopify/packwerk) and [`packwerk-extensions`](https://github.com/rubyatscale/packwerk-extensions) help you describe and constrain your package graph in terms of dependencies between packs and pack public API\n- [`code_ownership`](https://github.com/rubyatscale/code_ownership) gives your application the capability to determine the owner of a pack\n- [`pack_stats`](https://github.com/rubyatscale/pack_stats) makes it easy to send metrics about pack adoption and modularization to your favorite metrics provider, such as DataDog (which has built-in support).\n\n# How is a pack different from a gem?\nA ruby [`gem`](https://guides.rubygems.org/what-is-a-gem/) is the Ruby community solution for packaging and distributing Ruby code. A gem is a great place to start new projects, and a great end state for code that's been extracted from an existing codebase. `packs` are intended to help gradually modularize an application that has some conceptual boundaries, but is not yet ready to be factored into gems.\n\n## Usage\n1. Add the gem to your Gemfile and do a `bundle install`\n```\ngem 'packs-rails'\ngem 'packs'\n```\n\n2. Initialize packwerk\n```\nbundle binstub packwerk\nbin/packwerk init\n```\n\n3. Make sure to run `bundle binstub packs` to generate `bin/packs` within your application.\n\n## CLI Documentation\n## Describe available commands or one specific command\n`bin/packs help [COMMAND]`\n\n## Create pack with name packs/your_pack\n`bin/packs create packs/your_pack`\n\n## Add packs/to_pack to packs/from_pack/package.yml list of dependencies\n`bin/packs add_dependency packs/from_pack packs/to_pack`\n\nUse this to add a dependency between packs.\n\nWhen you use bin/packs add_dependency packs/from_pack packs/to_pack, this command will\nmodify packs/from_pack/package.yml's list of dependencies and add packs/to_pack.\n\nThis command will also sort the list and make it unique.\n\n## List the top violations of a specific type for packs/your_pack.\n`bin/packs list_top_violations type [ packs/your_pack ]`\n\nPossible types are: dependency, privacy, layer.\n\nWant to see who is depending on you? Not sure how your pack's code is being used in an unstated way? You can use this command to list the top dependency violations.\n\nWant to create interfaces? Not sure how your pack's code is being used? You can use this command to list the top privacy violations.\n\nWant to focus on the big picture first? You can use this command to list the top layer violations.\n\nIf no pack name is passed in, this will list out violations across all packs.\n\n## Make files or directories public API\n`bin/packs make_public path/to/file.rb path/to/directory`\n\nThis moves a file or directory to public API (either the `app/public` folder or the pack's specified public path).\n\nMake sure there are no spaces between the comma-separated list of paths of directories.\n\n## Move files or directories from one pack to another\n`bin/packs move packs/destination_pack path/to/file.rb path/to/directory`\n\nThis is used for moving files into a pack (the pack must already exist).\nNote this works for moving files to packs from the monolith or from other packs\n\nMake sure there are no spaces between the comma-separated list of paths of directories.\n\n## Lint `package_todo.yml` files to check for formatting issues\n`bin/packs lint_package_todo_yml_files`\n\n## Lint `package.yml` files\n`bin/packs lint_package_yml_files [ packs/my_pack packs/my_other_pack ]`\n\n## Run bin/packwerk validate (detects cycles)\n`bin/packs validate`\n\n## Run bin/packwerk check\n`bin/packs check [ packs/my_pack ]`\n\n## Run bin/packwerk update-todo\n`bin/packs update`\n\n## Get info about size and violations for packs\n`bin/packs get_info [ packs/my_pack packs/my_other_pack ]`\n\n## Rename a pack\n`bin/packs rename`\n\n## Set packs/child_pack as a child of packs/parent_pack\n`bin/packs move_to_parent packs/child_pack packs/parent_pack`\n\n## Move packs/foo to the some/directory folder, where some/directory does not contain a package.yml file\n`bin/packs move_to_folder packs/foo some/directory`\n\n\n## Releasing\nReleases happen automatically through github actions once a version update is committed to `main`.\n\n## Discussions, Issues, Questions, and More\nTo keep things organized, here are some recommended homes:\n\n### Issues:\nhttps://github.com/rubyatscale/packs/issues\n\n### Questions:\nhttps://github.com/rubyatscale/packs/discussions/categories/q-a\n\n### General discussions:\nhttps://github.com/rubyatscale/packs/discussions/categories/general\n\n### Ideas, new features, requests for change:\nhttps://github.com/rubyatscale/packs/discussions/categories/ideas\n\n### Showcasing your work:\nhttps://github.com/rubyatscale/packs/discussions/categories/show-and-tell\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frubyatscale%2Fpacks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frubyatscale%2Fpacks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frubyatscale%2Fpacks/lists"}