Repolode
chriskiehl

chriskiehl/Gooey

Python library that turns an argparse-based command line program into a desktop GUI with a single decorator.

Stars
21,896
Forks
1,047
Open issues
172
Last commit
3 days ago

What is it?

Gooey wraps a Python console program that uses argparse and generates a graphical interface from its argument declarations. Adding the @Gooey decorator to the function that builds the parser is enough to get a window with input fields, checkboxes, dropdowns and other controls, while the script itself keeps running as before.

By default Gooey maps each argparse action to a suitable widget. Using GooeyParser in place of ArgumentParser lets you choose widgets explicitly, such as file and directory choosers, date and time pickers, sliders, password fields and listboxes. Layout, window size, a configuration screen (basic or advanced), menus, and progress bars driven by regular expressions on program output can all be configured through decorator arguments.

Gooey supports Python 3, and the README notes that Python 2 users must pin an older release. It ships with translations for many languages and can be packaged into an executable with PyInstaller.

Key features

  • 01Adds a GUI to an argparse program with a single @Gooey decorator.
  • 02Maps argparse actions to widgets automatically, with GooeyParser for explicit widget choice.
  • 03Provides file, directory, date, time, color and slider widgets.
  • 04Shows progress bars driven by regex matches on program output, with optional time remaining.
  • 05Offers a menu bar with about, message, link and HTML dialogs.
  • 06Supports internationalization through JSON language files.

Use cases

  • Giving non-programmer colleagues a point-and-click front end for an internal Python script.
  • Wrapping a data-processing or file-conversion utility so users can pick inputs visually.
  • Packaging a Python CLI tool as a standalone Windows or desktop executable with a form interface.

Quick start

  1. 1

    Install Gooey from PyPI with pip

    pip install Gooey
  2. 2

    Decorate your argparse main function with @Gooey

Things to know

  • Python 2 is no longer supported; Python 2 users must pin an older release and install wxPython manually.
  • Gooey relies on wxPython, which cannot be installed as part of the pip installation on Python 2.

In collections

Topics

#python#gui#argparse#cli#desktop-app#wxpython

FAQ

What is Gooey?
Python library that turns an argparse-based command line program into a desktop GUI with a single decorator. Gooey wraps a Python console program that uses argparse and generates a graphical interface from its argument declarations. Adding the @Gooey decorator to the function that builds the parser is enough to get a window with input fields, checkboxes, dropdowns and other controls, while the script itself keeps running as before.
Is Gooey free to use? What license does it have?
Gooey is open source under the MIT license. Check the license terms before using it in commercial products.
Is Gooey still maintained?
Actively maintained. The last commit to Gooey was on Nov 5, 2026.
What can I use Gooey for?
Giving non-programmer colleagues a point-and-click front end for an internal Python script. Wrapping a data-processing or file-conversion utility so users can pick inputs visually. Packaging a Python CLI tool as a standalone Windows or desktop executable with a form interface.
How do I install Gooey?
Install Gooey from PyPI with pip: pip install Gooey Decorate your argparse main function with @Gooey
Where can I get Gooey?
The source code and installation instructions are on GitHub: https://github.com/chriskiehl/Gooey

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects