Skip to content

quantmew/pyinkcli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pyinkcli


pyinkcli

A Python fork and translation project of 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.

Ink demo

Install

pip install pyinkcli

Quick Start

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.

About

🌈 React for interactive command-line apps (A pure Python port)

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors