{"id":13508581,"url":"https://github.com/bjro/apex","last_synced_at":"2025-10-21T19:05:12.131Z","repository":{"id":13345490,"uuid":"16032667","full_name":"BjRo/apex","owner":"BjRo","description":"Awesome printing for Elixir","archived":false,"fork":false,"pushed_at":"2023-11-02T10:13:14.000Z","size":93,"stargazers_count":275,"open_issues_count":4,"forks_count":19,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-04-22T13:33:48.778Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Elixir","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/BjRo.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}},"created_at":"2014-01-18T19:48:40.000Z","updated_at":"2024-04-07T09:34:24.000Z","dependencies_parsed_at":"2024-01-27T08:40:33.264Z","dependency_job_id":"613a6c74-e079-4918-ad93-56ce918f7c56","html_url":"https://github.com/BjRo/apex","commit_stats":{"total_commits":121,"total_committers":16,"mean_commits":7.5625,"dds":"0.28099173553719003","last_synced_commit":"362a5a99a77249615583d7fed6e351967f13ccdf"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BjRo%2Fapex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BjRo%2Fapex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BjRo%2Fapex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BjRo%2Fapex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BjRo","download_url":"https://codeload.github.com/BjRo/apex/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246314011,"owners_count":20757450,"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-01T02:00:55.102Z","updated_at":"2025-10-21T19:05:07.089Z","avatar_url":"https://github.com/BjRo.png","language":"Elixir","funding_links":[],"categories":["Miscellaneous"],"sub_categories":[],"readme":"## Apex - Awesome Print for Elixir ##\nAwesome Print is an Elixir library that pretty prints Elixir data structures in full color\nexposing their internal structure with proper indentation. It's a port of part of the functionality\nof Ruby's awesome [awesome_print gem](https://github.com/michaeldv/awesome_print).\n\n### Installation ###\nIn order to install it via hex, add the reference to this package into the `deps` area of your `mix.exs`.\n\n```elixir\n  defp deps do\n    [\n      {:apex, \"~\u003e1.2.1\"}\n    ]\n  end\n```\n\n### Examples ###\n\n```elixir\ndata = [false, 42, ~w(forty two), [time: \"now\"], %{foo: :bar}]\n\nApex.ap data\n\n# Will output the following:\n#[\n#   [0] false\n#   [1] 42\n#   [2] [\n#     [0] \"forty\"\n#     [1] \"two\"\n#   ]\n#   [3] [\n#     [0] time: \"now\"\n#   ]\n#   [4] %{\n#      foo: bar\n#   }\n#]\n#\n#[false, 42, ~w(forty two), [time: \"now\"], %{foo: :bar}]\n```\n\nIf the numbering is not for you, you can turn it off via `Apex.ap(data, numbers: false)`.\n\n### Supported types\n\n* BitString\n* Integer\n* Float\n* Atom\n* List\n* Range\n* PID\n* Port\n* Function\n* MapSet\n* Map\n* Tuple\n* Reference\n* Elixir Records\n* Elixir Structs\n\n`Apex` uses a protocol internally to format a given value. If there's something not yet in the box, you can extend the protocol `Apex.Format`.\n\n### Color customizations\nYou can customize the `Apex` colors on a per project or global basis. For project\nspecific color configuration, you can specify the color table in your `config/config.ex`\n\n```elixir\nuse Mix.Config\n\nconfig :apex, :colors, %{\n  binary: :red\n}\n```\n\nThis can alternatively also be done at runtime by using the `Application.put_env/3` function.\n\nPlease note, that you only have to specify the colors you actively want to change here. For\nthe rest `Apex` will fallback to the defaults.\n\nIf you want to apply the same settings across multiple elixir projects, you can drop a `.apexrc`\nfile into your home directory in order do the same thing. The configuration is an `Elixir` Map.\n\n```elixir\n%{\n  colors: %{\n    binary: :yellow,\n    true:   [:green, :bright]\n  }\n}\n```\n\n__IMPORTANT:__ the global configuration will get compiled into your `Apex` version when\nyou compile your app. You need to recompile `Apex` via `mix deps.compile apex` when\nyou want to apply changes to the `.apexrc` file.\n\n__PRECEDENCE:__ When both project specific and global configuration\nare present, project specific configuration will take precedence.\n\nFor a full list of all available customizations, please take a look at the result of `Apex.Format.Color.default_colors/0)`.\n\n### Awesome def aka adef\nInspired by [@sasajuric](https://github.com/sasa1977)'s [awesome blog post series about macros](http://www.theerlangelist.com/search/label/metaprogramming), Apex also contains an Apex flavored version of his `deftracable` macro. By using `adef` instead of `def`\n\n```elixir\nimport Apex.AwesomeDef\nadef test(data, options \\\\ []) do\n  data\nend\n```\n\nall function invocations print trace outputs in the following format to the group leader (console):\n\n```bash\niex(1)\u003e Apex.test \"foo\"\n\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\nFunction Elixir.Apex.test was called\ndefined in /Users/bjoernrochel/Coding/Laboratory/apex/lib/apex.ex:12\n----------------------------------------------------------------------------------------------------\nParameters:\n----------------------------------------------------------------------------------------------------\n[\n  [0] \"foo\"\n  [1] []\n]\n\n----------------------------------------------------------------------------------------------------\nResult:\n----------------------------------------------------------------------------------------------------\n\"foo\"\n```\n\n### Note on Patches/Pull Requests ###\n* Fork the project on Github.\n* Make your feature addition or bug fix.\n* Add tests for it, making sure $ mix test is all green.\n* Do not rebase other commits than your own\n* Do not change the version in the mix file\n* Commit\n* Send me a pull request\n\n### License ###\n(The MIT License)\n\nCopyright (c) 2014-2018 Björn Rochel\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbjro%2Fapex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbjro%2Fapex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbjro%2Fapex/lists"}