{"id":31208020,"url":"https://github.com/douglasg14b/betterconsoletables","last_synced_at":"2025-09-20T22:52:38.277Z","repository":{"id":23905226,"uuid":"99158903","full_name":"douglasg14b/BetterConsoleTables","owner":"douglasg14b","description":"Faster, colorable, more configurable, and more robust console colors \u0026 tables for C# console applications","archived":false,"fork":false,"pushed_at":"2024-01-11T06:21:54.000Z","size":292,"stargazers_count":97,"open_issues_count":8,"forks_count":15,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-09-06T01:51:37.994Z","etag":null,"topics":["colors","console","console-colors","csharp","netcore","performance","tables"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/douglasg14b.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-08-02T20:38:59.000Z","updated_at":"2025-07-16T14:52:50.000Z","dependencies_parsed_at":"2024-06-23T06:04:13.323Z","dependency_job_id":null,"html_url":"https://github.com/douglasg14b/BetterConsoleTables","commit_stats":{"total_commits":185,"total_committers":6,"mean_commits":"30.833333333333332","dds":"0.10810810810810811","last_synced_commit":"020fbe1c402760353277d560c3daf062f8be7a70"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/douglasg14b/BetterConsoleTables","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/douglasg14b%2FBetterConsoleTables","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/douglasg14b%2FBetterConsoleTables/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/douglasg14b%2FBetterConsoleTables/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/douglasg14b%2FBetterConsoleTables/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/douglasg14b","download_url":"https://codeload.github.com/douglasg14b/BetterConsoleTables/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/douglasg14b%2FBetterConsoleTables/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276169661,"owners_count":25596956,"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-09-20T02:00:10.207Z","response_time":63,"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":["colors","console","console-colors","csharp","netcore","performance","tables"],"created_at":"2025-09-20T22:52:37.034Z","updated_at":"2025-09-20T22:52:38.272Z","avatar_url":"https://github.com/douglasg14b.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Nuget](https://img.shields.io/nuget/v/BetterConsoleTables.svg?style=flat-square)](https://www.nuget.org/packages/BetterConsoleTables)\n[![Nuget](https://img.shields.io/nuget/vpre/BetterConsoleTables?style=flat-square)](https://www.nuget.org/packages/BetterConsoleTables/2.0.2-rc1)\n\n![image](https://user-images.githubusercontent.com/1400380/131178503-4ba32545-44e4-4ffc-a77e-dba9e96c74b7.png)\n\n_Code that generates of the above table can be found [here](https://github.com/douglasg14b/BetterConsoleTables/blob/224aff4a9629b1a2341062ad7585897ef03c9080/BetterConsoles.Tables.Examples/Program.cs#L82-L194)_\n\n**Note:** Readme is still WIP for V2. Please refer to the Examples project for examples on the V2 API.\n\n# Better Consoles\n\nFaster, colorable, more configurable, and more robust console colors \u0026 tables for C# console applications.\n\n* Better Console Colors\n* Better Console Tables\n\n\n\n# Better Console Tables\n\n\n\n## What it does\n\nProvides tables for your console application! But really, it provides tables in a performance friendly way, while also adding the ability to display multiple tables in a variety of formats. There is additional configuration information that you can use to overwrite default functionality, allowing you to create tables with whatever style you want.\n\n## Why?\n\nTo make something better than the defacto [console tables library](https://github.com/khalidabuhakmeh/ConsoleTables).\n\n## How do I use it?\n\n1. Get it from nuget `Install-Package BetterConsoleTables -Version 1.1.2`\n2. Include it `using BetterConsoleTables;`\n3. See code examples or example directory\n\n## You mentioned performance?\n\nYes! Yes I did. I wrote this to not just be highly configurable, but also performance friendly. Version 2 adds significant complexity by allowing for coloring, formatting, and greater configuration flexibility. This, unfortunately, comes at a cost.\n\nAs you can see from the tests below, Version 2 takes ~1.1x as long as the defacto library. Version 1 is nearly 3x faster.\n\n| Test                      | Mean     | StdDev  | Ratio |\n|---------------------------|----------|---------|-------|\n| OtherConsoleTable         | 9.8 us   | 0.86 us | 1.00  |\n| v1                        | 3.78 us  | 0.15 us | 0.39  |\n| v2                        | 10.89 us | 0.13 us | 1.11  |\n| v2 Formatted              | 14.96 us | 0.29 us | 1.52  |\n| v2 Formatted Replace Rows | 13.97 us | 0.13 us | 1.42  |\n\n## Features\n\n* Every table cell can have it's own formatting\n   * Current API is inelegant, better API being developed `[Coming Soon]`\n* Formatting Callbacks/Custom Formatters\n* Configuration Flexibility\n   * Fluent API\n   * Config classes\n   * Pre-formatted strings\n* Print multiple tables\n  * Automatically lines up the columns and their widths between the tables\n* Configurable table box drawing formats\n  * Several presets to choose from\n  * Can change any of the table drawing characters in the configuration\n  * Dividers, headers, outside \u0026 inside edges, and even corners are configurable\n* Alignment\n  * Align headers and cells, or entire columns\n  * Left, Center, and Right alignment with automatic padding\n* Colors\n  * Full RGB support\n  * Background \u0026 Foreground coloring\n  * Gradients `[Coming Soon]`\n  * Value-based coloring `[Coming Soon]`\n* Font/Text Formatting\n  * Bold (Brighten)\n  * Underline\n  * Italic \u003csup\u003e**\u003c/sup\u003e\n  * Blinking\n  * Crossed Out \u003csup\u003e**\u003c/sup\u003e\n  * Overline \u003csup\u003e**\u003c/sup\u003e\n  * Reversed colors (Swaps foreground \u0026 background)\n* Table data replacement support\n* Generate tables from existing objects\n\n## Future Improvements\n\n* Configuration\n   * Easier, short-form, configuration so there isn't as much boilerplate to write\n\n\u003csup\u003e**\u003c/sup\u003e Does not work in default windows console\n\n## Code Examples\n\n#### Single Simple Table\n\n```cs\nstatic void Main(String[] args)\n{\n    Table  table = new Table(\"one\", \"two\", \"three\");\n    table.AddRow(1, 2, 3)\n         .AddRow(\"long line goes here\", \"short text\", \"word\");\n\n    Console.Write(table.ToString());\n    Console.ReadKey();\n}\n```\n\n#### Derive From Objects\n\n```cs\nstatic void Main(String[] args)\n{\n  Table table = new Table(TableConfig.MySql());\n  table.From\u003cSomeData\u003e(rows);\n\n  Console.Write(table.ToString());\n}\n```\n\n#### Multiple Tables\n\n\n```cs\nstatic void Main(String[] args)\n{\n    Table table = new Table(\"One\", \"Two\", \"Three\")\n      .AddRow(\"1\", \"2\", \"3\")\n      .AddRow(\"Short\", \"item\", \"Here\")\n      .AddRow(\"Longer items go here\", \"stuff stuff\", \"stuff\");\n\n    Table table2 = new Table(\"One\", \"Two\", \"Three\", \"Four\")\n      .AddRow(\"One\", \"Two\", \"Three\")\n      .AddRow(\"Short\", \"item\", \"Here\", \"A fourth column!!!\")\n      .AddRow(\"stuff\", \"longer stuff\", \"even longer stuff in this cell\")\n      .Config = Config.UnicodeAlt();\n\n    ConsoleTables tables = new ConsoleTables(table, table2);\n    \n    Console.Write(tables.ToString());\n    \n    Console.ReadKey();\n}\n```\n\n#### Column Alignment\n\n```cs\n    ColumnHeader[] headers = new[]\n    {\n        new ColumnHeader(\"Left\"),\n        new ColumnHeader(\"Left Header\", Alignment.Right),\n        new ColumnHeader(\"Right Header\", Alignment.Center, Alignment.Right),\n    };\n    Table table = new Table(headers)\n        .AddRow(\"1\", \"2\", \"3\")\n        .AddRow(\"Short\", \"item\", \"Here\")\n        .AddRow(\"Longer items go here\", \"Right Contents\", \"Centered Contents\");\n    table.Config = TableConfiguration.MySqlSimple(); // Sets table formatting\n\n    Console.Write(table.ToString());\n    Console.ReadKey();\n ```\n\n## Console Outputs\n\n#### Column \u0026 Row Alignment 1\n\n```cs\nColumnHeader[] headers = new[]\n{\n    new ColumnHeader(\"Left\"),\n    new ColumnHeader(\"Right\", Alignment.Right, Alignment.Right),\n    new ColumnHeader(\"Center\", Alignment.Center, Alignment.Center),\n};\n\nTable table = new Table(headers);\n```\n\n\n```\n+----------------------+-------------+---------------------+\n| Left                 |       Right |        Center       |\n+----------------------+-------------+---------------------+\n| 1                    |           2 |          3          |\n| Short                |        item |         Here        |\n| Longer items go here | stuff stuff | some centered thing |\n+----------------------+-------------+---------------------+\n```\n\n#### Column \u0026 Row Alignment 2\n\n```cs\nColumnHeader[] headers = new[]\n{\n    new ColumnHeader(\"Left\"),\n    new ColumnHeader(\"Left Header\", Alignment.Right),\n    new ColumnHeader(\"Right Header\", Alignment.Center, Alignment.Right),\n};\n\nTable table = new Table(headers);\n```\n\n```\n+----------------------+----------------+-------------------+\n| Left                 | Left Header    |      Right Header |\n+----------------------+----------------+-------------------+\n| 1                    |              2 |         3         |\n| Short                |           item |        Here       |\n| Longer items go here | Right Contents | Centered Contents |\n+----------------------+----------------+-------------------+\n```\n\n#### Default\n\n```\n----------------------------------------------\n| One                  | Two         | Three |\n----------------------------------------------\n| 1                    | 2           | 3     |\n----------------------------------------------\n| Short                | item        | Here  |\n----------------------------------------------\n| Longer items go here | stuff stuff | stuff |\n----------------------------------------------\n```\n#### Markdown\n```cs\ntable.Config = TableConfiguration.Markdown();\n```\n\n```\n| One                  | Two         | Three |\n|----------------------|-------------|-------|\n| 1                    | 2           | 3     |\n| Short                | item        | Here  |\n| Longer items go here | stuff stuff | stuff |\n```\n\n#### MySql\n```cs\ntable.Config = TableConfiguration.MySql();\n```\n```\n+----------------------+-------------+-------+\n| One                  | Two         | Three |\n+----------------------+-------------+-------+\n| 1                    | 2           | 3     |\n+----------------------+-------------+-------+\n| Short                | item        | Here  |\n+----------------------+-------------+-------+\n| Longer items go here | stuff stuff | stuff |\n+----------------------+-------------+-------+\n```\n\n#### MySql Simple\n```cs\ntable.Config = TableConfiguration.MySqlSimple();\n```\n```\n+----------------------+-------------+-------+\n| One                  | Two         | Three |\n+----------------------+-------------+-------+\n| 1                    | 2           | 3     |\n| Short                | item        | Here  |\n| Longer items go here | stuff stuff | stuff |\n+----------------------+-------------+-------+\n```\n\n#### Unicode\n```cs\ntable.Config = TableConfiguration.Unicode();\n```\n```\n┌──────────────────────┬─────────────┬───────┐\n│ One                  │ Two         │ Three │\n├──────────────────────┼─────────────┼───────┤\n│ 1                    │ 2           │ 3     │\n│ Short                │ item        │ Here  │\n│ Longer items go here │ stuff stuff │ stuff │\n└──────────────────────┴─────────────┴───────┘\n```\n#### Unicode Alt\n```cs\n table.Config = TableConfiguration.UnicodeAlt();\n ```\n```\n╔══════════════════════╦═════════════╦═══════╗\n║ One                  ║ Two         ║ Three ║\n╠══════════════════════╬═════════════╬═══════╣\n║ 1                    ║ 2           ║ 3     ║\n║ Short                ║ item        ║ Here  ║\n║ Longer items go here ║ stuff stuff ║ stuff ║\n╚══════════════════════╩═════════════╩═══════╝\n```\n\n## Screenshot\n\n![alt text](https://raw.githubusercontent.com/douglasg14b/BetterConsoleTables/master/Screenshot_6.png)\n\n\n## Licence clarification\n\nThis LGPL-v3 license applies For all changes as part of the Version2 branch, from commit 0a2e191f96f7f1bb14f8a768d788e0a4aa272430 onwards. Previous to this all code is licensed under MIT.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdouglasg14b%2Fbetterconsoletables","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdouglasg14b%2Fbetterconsoletables","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdouglasg14b%2Fbetterconsoletables/lists"}