Ink VS python-prompt-toolkit

Compare Ink vs python-prompt-toolkit and see what are their differences.

Our great sponsors
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
Ink python-prompt-toolkit
64 21
25,790 8,948
- 1.1%
6.4 7.8
10 days ago 16 days ago
TypeScript Python
MIT License BSD 3-clause "New" or "Revised" License
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

Ink

Posts with mentions or reviews of Ink. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-03-12.
  • I created a simple CLI tool that helps you code FAST!
    2 projects | dev.to | 12 Mar 2024
    I've always wanted to build a CLI tool, and when I realized that you can build one using React with Ink, I converted my Python script into a CLI tool.
  • Delete git branches in batches
    2 projects | dev.to | 5 Feb 2024
    ⚠️ Git for Windows Terminal is currently not supported, and the tool is limited to ink. We will look for alternatives later. Please use CMD, Vscode terminal's Git... terminal
  • Setup Simple Web UI for Node.js App in Seconds
    2 projects | dev.to | 17 Jan 2024
    There is a good solution for some of those cases - ink. With ink, I can implement text-based UI with knowledge of React, which is neat but there are still some caveats for my usages:
  • Building Reactive CLIs with Ink - React CLI library
    3 projects | dev.to | 3 Nov 2023
    Looks cool, right? Building a similar UI in the terminal without any library would be quite hard, though, thanks to Ink it's almost as easy as building any frontend UI with React.
  • Terminal-like output library for js?
    2 projects | /r/learnjavascript | 26 Jun 2023
    ink?
  • Synchronous File Reading and Writing in Node.js
    1 project | /r/node | 25 Jun 2023
    I'm writing a CLI with ink. Writing async code is important as to not block the rendering and respond to user input. I have a few loading animations that update every 100ms. Synchronous operations can make the animation hang for >500ms, making the animation choppy.
  • Launch HN: Resend (YC W23) – Email API for Developers Using React
    11 projects | news.ycombinator.com | 13 Jun 2023
    You get the comfort of using react components instead of fighting with HTML tables to make your emails look nice. I think it's awesome! It's analog to what ink[0] does with CLI outputs. Sure, you could write fancy CLI outputs in bash, but ink takes the pain out of it and makes it easy.

    [0] https://github.com/vadimdemedes/ink

  • Is Node.js a good way to implement a CLI app with persistence?
    3 projects | /r/node | 2 Jun 2023
    Due to Node's asynchronous behavior, it makes Node great for long-running processes that make a lot of HTTP requests, database calls, and other async ops, like a web server or a REST API. However, if I am making a CLI tool for pretty much personal use only, with very minimal async operations, then blocking the event loop with a synchronous function that will resolve almost immediately will make no difference perceivable to a human brain or have any speed benefits that someone can actually observe (think `fs.readFileSync` or `require('dotenv') of 10 line config file, or a quick embedded db (sqlite) query with only ~100 records. I'm wondering what the best way to implement the database part of the app synchronous. I can read/write to JSON files but it would be tricky because the data is relational, and some complex joins and other data wrangling operations are required (complex to perform in JS but are easy to implement in a SQL statement). It's not important what the operations are, that's not the point of this post. This is mostly a personal project of interest: making this CLI tool completely avoiding any async operations/using no promises. I would like to use node tho, as I said this is just out of interest and I also want to experiment with several CLI libraries such as Ink or Cliffy.
  • Ink: React for interactive command-line apps
    1 project | /r/patient_hackernews | 8 May 2023
  • Make interactive command-line apps with React
    1 project | /r/reactjs | 8 May 2023

python-prompt-toolkit

Posts with mentions or reviews of python-prompt-toolkit. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-04-09.
  • Is there a library that can give python-prompt-toolkit like completion for TUI?
    2 projects | /r/rust | 9 Apr 2023
    Ref. https://github.com/prompt-toolkit/python-prompt-toolkit and https://github.com/c-bata/go-prompt ?
  • Show HN: Replbuilder, quickly build a Python REPL CLI prompt
    5 projects | news.ycombinator.com | 19 Feb 2023
    > The purpose is not to do this however, the goal for a repl cli is usually to invoke a set of particular, already implemented commands, not on the fly python input and output. The implementation will be predefined and packaged, repl are only used to run a list of specific commands with arguments that implementation has already defined.

    That's a very strange definition for a REPL, I would just call that an (interactive) CLI. Maybe that's why you couldn't find anything when you were doing your search? I used python-prompt-toolkit [0] when building such interfaces. pgcli [1] is an example of such an interface built with prompt-toolkit.

    It has a lot of nice autocomplete and readline emulation options. Maybe it's something you can integrate with your project.

    [0] https://github.com/prompt-toolkit/python-prompt-toolkit

    [1] https://www.pgcli.com/

  • TUI library with Sixel support?
    3 projects | /r/learnpython | 27 Nov 2022
    Euporie uses prompt_toolkit as its TUI library. prompt_toolkit does not specifically support terminal graphics, but I've written various of custom components and modifications to enable images to be displayed using terminal graphics.
  • Why is the terminal input so weird?
    7 projects | news.ycombinator.com | 16 Nov 2022
    That bothered me too, the default function for Ctrl-W in ipython is unix-word-rubout from python-prompt-toolkit [1], which uses spaces for word boundaries. You can rebind it to backward-kill-word so it uses "not a letter nor a digit" as a word boundary.

    Here's a gist with my config (also binds shift-left/right arrow to move to previous space instead of visual select): https://gist.github.com/fratajczak/64e32421a43d3b8194d0409ce...

    [1]: https://github.com/prompt-toolkit/python-prompt-toolkit/blob...

  • Is there a library for creating interactive long running terminal applications?
    4 projects | /r/learnpython | 26 Mar 2022
  • improved repl for lua?
    8 projects | /r/lua | 28 Feb 2022
    When coding in python I've used ptpython repl based on prompt-toolkit which has been used in numerous CLI programs https://github.com/prompt-toolkit/python-prompt-toolkit/blob/master/PROJECTS.rst. I've also used mycli from that page. I've really enjoyed the UX of these. In addition to the syntax highlighting, auto/tab completions, (and maybe other enjoyable features) the vi-mode is amazingly helpful (for us vi folks) (it's probably got emacs bindings too). I would love to have all of this in a repl for lua.
  • A simple tui to launch gzdoom mods
    2 projects | /r/commandline | 14 Feb 2022
    That's an interesting approach. I was also thinking of using a more sophisticated framework than whiptail, maybe the PromptToolkit. I guess it then would be more similar to the idea of using a text editor. I certainly do think a TUI may be overkill yet it was also a good excuse to practice some bash scripting for me.
  • How to create terminal GUI?
    6 projects | /r/bash | 9 Feb 2022
  • Rich is a Python library for rich text and beautiful formatting in the terminal
    16 projects | news.ycombinator.com | 15 Jan 2022
    Try prompt_toolkit which is a Python library used by IPython among others: https://github.com/prompt-toolkit/python-prompt-toolkit
  • python-prompt-toolkit VS python-sploitkit - a user suggested alternative
    2 projects | 15 Jan 2022

What are some alternatives?

When comparing Ink and python-prompt-toolkit you can also consider the following projects:

Commander.js - node.js command-line interfaces made easy

click - Python composable command line interface toolkit

oclif - CLI for generating, building, and releasing oclif CLIs. Built by Salesforce.

rich - Rich is a Python library for rich text and beautiful formatting in the terminal.

blessed - A high-level terminal interface library for node.js.

Turbo Vision - A modern port of Turbo Vision 2.0, the classical framework for text-based user interfaces. Now cross-platform and with Unicode support.

nestjs-commander - A module for using NestJS to build up CLI applications

textual - The lean application framework for Python. Build sophisticated user interfaces with a simple Python API. Run your apps in the terminal and a web browser.

tui-rs - Build terminal user interfaces and dashboards using Rust

asciimatics - A cross platform package to do curses-like operations, plus higher level APIs and widgets to create text UIs and ASCII art animations

PyLaTeX - A Python library for creating LaTeX files

urwid - Console user interface library for Python (official repo)