Chevron
Beautiful, modern interactive terminal prompts for Python.
Chevron is a modern prompt library for Python built on top of prompt_toolkit. It helps you build beautiful interactive command-line applications with a clean, intuitive API, rich terminal controls, and customizable themes.
Features
- 🎨 Modern terminal UI
- ⚡ Powered by
prompt_toolkit - 📝 Text input
- 🔒 Password input
- ✅ Confirmation prompts
- ☑️ Checkbox prompts
- 🔍 Interactive search prompt
- 📝 Built-in text editor
- 🎯 Consistent keyboard navigation
- 🌈 Theme support
- 🚀 Fast and lightweight
Installation
pip install chevron
Or with uv:
uv add chevron
Quick Start
from chevron import Input, Select, Confirm
name = Input("What's your name?").ask()
language = Select(
"Favorite language",
[
"Python",
"Rust",
"Go",
"Zig",
],
).ask()
remember = Confirm(
"Remember your choice?"
).ask()
print(name)
print(language)
print(remember)
Available Prompts
Input
name = Input("Name").ask()
Password
password = Password("Password").ask()
Confirm
delete = Confirm(
"Delete project?"
).ask()
Select
language = Select(
"Language",
[
"Python",
"Rust",
"Go",
],
).ask()
Checkbox
languages = Checkbox(
"Languages",
[
"Python",
"Rust",
"Go",
],
).ask()
Search
package = Search(
"Search package",
[
"numpy",
"pandas",
"matplotlib",
"torch",
],
).ask()
Editor
text = Editor(
"Commit message"
).ask()
Themes
from chevron import Theme
theme = Theme(
pointer="▶",
)
Input(
"Name",
theme=theme,
).ask()
Examples
Run the examples:
python examples/input.py
python examples/select.py
python examples/all.py
Roadmap
- Input
- Password
- Confirm
- Number
- Select improvements
- Checkbox improvements
- Search prompt
- Unit tests
- Async API
- Plugin system
Contributing
Contributions, ideas, bug reports, and pull requests are welcome.
License
MIT License.
Release files for chevron-sh 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| chevron_sh-1.0.0.tar.gz | 12.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| chevron_sh-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 27.9 kB
Release files / chevron_sh-1.0.0.tar.gz
| Download URL | chevron_sh-1.0.0.tar.gz |
|---|---|
| Size | 12.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8d1506c6f4f1455fcfe4b2fe898278972cdb5208c985dab21cd47325d4839dda
|
|
BLAKE2b-256 checksum How to use checksums |
a9212a84c6d1397c471200dfe0847a7d9addd33d4edfffd47f5b8f929f685c39
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.29 {"installer":{"name":"uv","version":"0.11.29","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / chevron_sh-1.0.0-py3-none-any.whl
| Download URL | chevron_sh-1.0.0-py3-none-any.whl |
|---|---|
| Size | 15.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
017a3db0d04cae3e27c0ea1d1263964f0f08ee287fffa9bd91d2b7b1eb805bd3
|
|
BLAKE2b-256 checksum How to use checksums |
7826ab6a7ab557237f1399f6da98402b6cd4c7f77b84740993ba4a688e1a2e1f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.29 {"installer":{"name":"uv","version":"0.11.29","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|