A Ruby library that pretty prints Ruby objects in full color with proper indentation, exposing their internal structure.
Awesome Print is a Ruby library that pretty prints Ruby objects with full color syntax highlighting, proper indentation, and clear structural representation. It is designed to enhance the readability of objects during debugging and development, making it easier to inspect complex data structures, ActiveRecord objects, and class hierarchies.
Ruby developers, particularly those working with Rails, who need to debug and inspect objects in IRB, Rails console, PRY, or within application code. It is also useful for developers who frequently work with nested hashes, arrays, and ActiveRecord models.
Developers choose Awesome Print over standard Ruby output methods because it provides visually structured, colorized output that immediately reveals object internals, with seamless integration into Rails and popular REPLs. Its customizable formatting and convenience methods for strings offer a superior debugging experience compared to plain `p` or `puts`.
Pretty print your Ruby objects with style -- in full color and with proper indentation
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Uses ANSI color codes to highlight different data types, making object inspection visually intuitive and faster, as shown in examples with colored strings, hashes, and arrays.
Includes mixins for ActiveRecord objects and Rails templates, allowing easy inspection in Rails console and views, demonstrated with Account model examples.
Can be set as the default formatter for IRB, Rails console, and PRY with commands like AwesomePrint.irb!, enhancing debugging without manual calls.
Offers options for indentation, array indexing, hash sorting, and output limits, with global defaults via .aprc files for personalized use.
The README explicitly states that v1.9.0 may not work on Ruby 2.4 or older, and v2.0 will require Ruby 1.9.3+, posing challenges for legacy projects.
Only supports a predefined set of color names like :redish or :pale, with no option for custom RGB or hex codes, limiting advanced color customization.
Pretty printing and colorization can add processing time for very large or complex objects, making it less ideal for performance-critical debugging sessions.