{"id":29719984,"url":"https://github.com/artoriouss/autoalias","last_synced_at":"2025-08-02T07:38:54.922Z","repository":{"id":57479103,"uuid":"244298652","full_name":"ARtoriouSs/autoalias","owner":"ARtoriouSs","description":"Alias all your modules in the iex shell with a single command!","archived":false,"fork":false,"pushed_at":"2020-12-23T18:34:03.000Z","size":21,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-07-24T15:11:22.849Z","etag":null,"topics":["alias","autoalias","elixir"],"latest_commit_sha":null,"homepage":"https://hexdocs.pm/autoalias/api-reference.html","language":"Elixir","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/ARtoriouSs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-03-02T06:38:29.000Z","updated_at":"2024-11-27T15:48:58.000Z","dependencies_parsed_at":"2022-09-18T05:23:24.731Z","dependency_job_id":null,"html_url":"https://github.com/ARtoriouSs/autoalias","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/ARtoriouSs/autoalias","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ARtoriouSs%2Fautoalias","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ARtoriouSs%2Fautoalias/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ARtoriouSs%2Fautoalias/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ARtoriouSs%2Fautoalias/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ARtoriouSs","download_url":"https://codeload.github.com/ARtoriouSs/autoalias/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ARtoriouSs%2Fautoalias/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268348772,"owners_count":24236302,"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","status":"online","status_checked_at":"2025-08-02T02:00:12.353Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["alias","autoalias","elixir"],"created_at":"2025-07-24T12:24:41.565Z","updated_at":"2025-08-02T07:38:54.897Z","avatar_url":"https://github.com/ARtoriouSs.png","language":"Elixir","readme":"# Autoalias\n\n[![Hex Version](https://img.shields.io/hexpm/v/autoalias.svg)](https://hex.pm/packages/autoalias)\n\nFind yourself typing long module names when debugging something in iex?\nOr creating aliases for lots of modules just to test simple query? This library can help you!\n\n_NOTE:_ you'll probably want to use `.iex.exs` file instead in most cases.\n\n## Installation\n\nAvailable via [Hex package](https://hex.pm/packages/autoalias), just add `autoalias` to\nyour list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [\n    {:autoalias, \"~\u003e 0.2.0\", only: :dev}\n  ]\nend\n```\n\n## Usage\n\nSimply type `use Autoalias` in the iex shell and it will ([try](#conflicts)) to alias every accessible module.\nFor example:\n\n**Before:**\n\n```bash\niex -S mix phx.server\n```\n\n```elixir\niex(1)\u003e MyApplication.Repo.get(MyApplication.SomeContext.SomeModule, 1) \\\n...(1)\u003e |\u003e MyApplication.SomeContext.SomeModule.changeset(%{foo: :bar}) \\\n...(1)\u003e |\u003e MyApplication.Repo.update()\n```\n\n**After:**\n\n```bash\niex -S mix phx.server\n```\n\n```elixir\niex(1)\u003e use Autoalias\niex(2)\u003e Repo.get(SomeModule, 1) \\\n...(2)\u003e |\u003e SomeModule.changeset(%{foo: :bar}) \\\n...(2)\u003e |\u003e Repo.update()\n```\n\n_NOTE:_ you should **not** use it in your code, it's built only for simplifying iex experience.\n\nCheck out the [docs](https://hexdocs.pm/autoalias) for more info.\n\n### Conflicts\n\nIf we have several modules with the same ending and alias all of them, only last one will be accepted.\nFor this lib it will be the longest accessible module with particular ending, all others will be aliased\nby their parents. Conflicts solving performs recursively till there will be no conflict at all.\n\nFor example if there is modules like `Foo.Bar.SomeModule` and `Baz.Qux.Corge.SomeModule` it will alias the longest module,\nand closest parent for all conflicted modules. In this case it will be:\n\n```elixir\nalias Baz.Qux.Corge.SomeModule\nalias Foo.Bar\n```\n\nSo we can now use `SomeModule` to access first one and `Bar.SomeModule` for the second.\n\nHere is the corner case when conflict appears with one-word module, e.g. `SomeModule` and `MyApp.SomeModule`.\nIn this case it will create alias for `MyApp.SomeModule` and you will loose direct access to one-word `SomeModule`\nmodule. If this happened, you can prepend module with `Elixir.` prefix, like `Elixir.SomeModule`, to access it.\n`Elixir` module itself cannot be aliased at all.\n\nThis cases are pretty rare, but it can happen.\n\n## Contributing\n\nIf there is any problems or suggestions, you can always open [issue](https://github.com/ARtoriouSs/autoalias/issues)\nor [pull request](https://github.com/ARtoriouSs/autoalias/pulls).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fartoriouss%2Fautoalias","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fartoriouss%2Fautoalias","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fartoriouss%2Fautoalias/lists"}