Metadata-Version: 2.4
Name: pyinkcli
Version: 0.1.4
Summary: Python fork and translation of Ink for building terminal UIs
Project-URL: Homepage, https://github.com/quantmew/pyinkcli
Project-URL: Documentation, https://github.com/quantmew/pyinkcli#readme
Project-URL: Repository, https://github.com/quantmew/pyinkcli
Project-URL: Issues, https://github.com/quantmew/pyinkcli/issues
Author: Quantmew Contributors
License-Expression: MIT
License-File: LICENSE
Keywords: cli,component,console,ink,react,terminal,ui
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Terminals
Classifier: Typing :: Typed
Requires-Python: >=3.9
Requires-Dist: colorama>=0.4.0
Requires-Dist: wcwidth>=0.2.0
Requires-Dist: yoga-layout-python>=0.1.0
Provides-Extra: dev
Requires-Dist: mypy>=1.0.0; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.21.0; extra == 'dev'
Requires-Dist: pytest>=7.0.0; extra == 'dev'
Requires-Dist: ruff>=0.1.0; extra == 'dev'
Description-Content-Type: text/markdown

# pyinkcli

<div align="center">
	<br>
	<img width="220" alt="pyinkcli" src="media/logo.png">
	<br>
	<br>
</div>

> A Python fork and translation project of [Ink](https://github.com/vadimdemedes/ink) for building terminal UIs with a React-like component model.

`pyinkcli` is a Python implementation inspired by and translated from Ink. This repository is a fork, not the official Node.js package, and the API is adapted for Python where needed.

<div align="center">
	<img src="media/demo.svg" width="640" alt="Ink demo">
</div>

## Install

```bash
pip install pyinkcli
```

## Quick Start

```python
from pyinkcli import Box, Text, render


def Counter():
    return Box(
        Text("Hello from pyinkcli", color="green", bold=True),
        flexDirection="column",
        alignItems="center",
    )


app = render(Counter)
app.wait_until_exit()
```

## What This Repo Is

- A Python fork of Ink focused on translating the terminal UI model into Python
- A repo that keeps the upstream JS implementation nearby for parity work and audits
- A place for Python-native examples and tests under `examples/` and `tests/`

## Examples

- `examples/alternate-screen/`
- `examples/chat/`
- `examples/counter/`
- `examples/terminal-resize/`
- `examples/use-focus/`
- `examples/use-input/`

## License

MIT. The repository includes the upstream Ink license text in [`LICENSE`](LICENSE).
