OneFace
Generating interfaces(CLI, Qt GUI, Dash web app) from a Python function or a command program.
Install / Use
/learn @Nanguage/OneFaceREADME
oneFace is an easy way to create interfaces.
In Python, just decorate your function and mark the type and range of the arguments:
from oneface import one, Val
@one
def bmi(name: str,
height: Val[float, [100, 250]] = 160,
weight: Val[float, [0, 300]] = 50.0):
BMI = weight / (height / 100) ** 2
print(f"Hi {name}. Your BMI is: {BMI}")
return BMI
# run cli
bmi.cli()
# or run qt_gui
bmi.qt_gui()
# or run dash web app
bmi.dash_app()
These code will generate the following interfaces:
| CLI | Qt | Dash |
| ---- | -- | ---- |
|
|
|
|
Wrap command line program
Or you can wrap a command line using a config file:
# add.yaml
# This is a demo app, use for add two numbers.
name: add
# mark the arguments in command with: {}
command: python {verbose} -c 'print({a} + {b})'
inputs:
# describe the type and range of your arguments
verbose:
type: bool
default: False
true_insert: "-v" # insert '-v' to the command when the value is true
false_insert: ""
a:
type: float
range: [-100.0, 100.0]
default: 0.0
b:
type: float
range: [-100.0, 100.0]
default: 10.0
Lanuch the app with:
$ python -m oneface.wrap_cli run add.yaml dash_app # run Dash app, or:
$ python -m oneface.wrap_cli run add.yaml qt_gui # run Qt GUI app
Features
- Generate CLI, Qt GUI, Dash Web app from a python function or a command line.
- Automatically check the type and range of input parameters and pretty print them.
- Easy extension of parameter types and GUI widgets.
- Support for embedding the generated interface into a parent application.
Detail usage see the documentation.
Installation
To install oneFace with complete dependency:
$ pip install oneface[all]
Or install with just qt or dash dependency:
$ pip install oneface[qt] # qt
$ pip install oneface[dash] # dash
Related Skills
node-connect
351.8kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
claude-opus-4-5-migration
110.9kMigrate prompts and code from Claude Sonnet 4.0, Sonnet 4.5, or Opus 4.1 to Opus 4.5
frontend-design
110.9kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
model-usage
351.8kUse CodexBar CLI local cost usage to summarize per-model usage for Codex or Claude, including the current (most recent) model or a full model breakdown. Trigger when asked for model-level usage/cost data from codexbar, or when you need a scriptable per-model summary from codexbar cost JSON.
