Skip to content

feat(ui): add rich terminal UI for output formatting - #1152

Open
latiefdole wants to merge 2 commits into
Kaggle:mainfrom
latiefdole:feature/tui-upgrade
Open

feat(ui): add rich terminal UI for output formatting#1152
latiefdole wants to merge 2 commits into
Kaggle:mainfrom
latiefdole:feature/tui-upgrade

Conversation

@latiefdole

Copy link
Copy Markdown

Description

This PR introduces a modern, hacker-friendly Terminal User Interface (TUI) for Kaggle CLI using the rich library, making tables and outputs much more readable and user-friendly.

Changes Made

  • Added ui.py which handles rendering of gorgeous tables with rounded borders and responsive column alignments.
  • Intercepted the print_table logic inside kaggle_api_extended.py to route formatted data through rich if it is supported by the terminal.
  • Maintained perfect backward compatibility: if the output is piped or rich fails, it defaults completely to the original raw text/csv outputs.
  • Added test_ui.py with mock tests.
  • Updated pyproject.toml dependencies to include rich.

This fulfills the requirements mentioned in CONTRIBUTING.md.

@google-cla

google-cla Bot commented Jul 29, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@latiefdole

Copy link
Copy Markdown
Author

@googlebot I signed it!

@stevemessick

Copy link
Copy Markdown
Contributor

/gcbrun

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants