Skip to main content

Fast multiline terminal input and clipboard library with C++ core

Project description

cich_prompt

Fast multiline terminal input and clipboard library with C++ core and Python bindings.

Features

  • Multiline Input: Advanced terminal input with vim-like editing

    • Ctrl+V or /clip: paste from clipboard
    • Ctrl+N: insert newline
    • Ctrl+W/U/K: delete word/to-start/to-end
    • Arrow keys, Home, End navigation
    • Ctrl+Left/Right: word navigation
    • Ctrl+Up/Down: buffer start/end
  • Clipboard: Cross-platform clipboard operations

    • Supports X11 (xclip, xsel)
    • Supports Wayland (wl-copy, wl-paste)
    • Supports macOS (pbcopy, pbpaste)
    • Supports tmux clipboard
    • Async clipboard fetching with loading indicator

Installation

pip install cich_prompt

Quick Start

Multiline Input

from cich_prompt import multiline_input

# Get user input
text = multiline_input("Enter text: ")
print(f"You entered: {text}")

Clipboard Operations

from cich_prompt.clipboard import set_text, get_text

# Copy to clipboard
set_text("Hello, clipboard!")

# Paste from clipboard
content = get_text()
print(content)

Edit Existing Text

from cich_prompt import multiline_edit

initial = "Edit this text"
result = multiline_edit("Prompt: ", initial)
if result:
    print(f"Edited: {result}")

Auto-return Mode

from cich_prompt import multiline_input_autoreturn

# Auto-submits when input matches an option
options = ["yes", "no", "maybe"]
choice = multiline_input_autoreturn("Choose: ", options)

Requirements

  • Python 3.7+
  • Linux or macOS (Windows not yet supported)
  • C++17 compiler
  • CMake 3.15+ (for building from source)

Platform-Specific

Linux: For clipboard support, install one of:

  • xclip (X11)
  • xsel (X11)
  • wl-clipboard (Wayland)

macOS: Built-in clipboard support

Windows: Not currently supported (uses Unix terminal APIs)

Building from Source

git clone https://github.com/akash-sekhon-1/cich
cd cich/python_packages/cich_prompt
pip install -e .

License

MIT License - see LICENSE file

Author

Akash Sekhon (akashsekhon.de@gmail.com)

Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cich_prompt-0.1.3.tar.gz (52.9 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

cich_prompt-0.1.3-cp312-cp312-musllinux_1_1_x86_64.whl (665.1 kB view details)

Uploaded CPython 3.12musllinux: musl 1.1+ x86-64

cich_prompt-0.1.3-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (128.7 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

cich_prompt-0.1.3-cp312-cp312-macosx_11_0_arm64.whl (101.7 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

cich_prompt-0.1.3-cp312-cp312-macosx_10_9_x86_64.whl (110.6 kB view details)

Uploaded CPython 3.12macOS 10.9+ x86-64

cich_prompt-0.1.3-cp311-cp311-musllinux_1_1_x86_64.whl (665.3 kB view details)

Uploaded CPython 3.11musllinux: musl 1.1+ x86-64

cich_prompt-0.1.3-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (129.0 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

cich_prompt-0.1.3-cp311-cp311-macosx_11_0_arm64.whl (101.4 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

cich_prompt-0.1.3-cp311-cp311-macosx_10_9_x86_64.whl (109.7 kB view details)

Uploaded CPython 3.11macOS 10.9+ x86-64

cich_prompt-0.1.3-cp310-cp310-musllinux_1_1_x86_64.whl (664.1 kB view details)

Uploaded CPython 3.10musllinux: musl 1.1+ x86-64

cich_prompt-0.1.3-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (127.4 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

cich_prompt-0.1.3-cp310-cp310-macosx_11_0_arm64.whl (100.0 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

cich_prompt-0.1.3-cp310-cp310-macosx_10_9_x86_64.whl (108.1 kB view details)

Uploaded CPython 3.10macOS 10.9+ x86-64

cich_prompt-0.1.3-cp39-cp39-musllinux_1_1_x86_64.whl (664.2 kB view details)

Uploaded CPython 3.9musllinux: musl 1.1+ x86-64

cich_prompt-0.1.3-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (127.5 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

cich_prompt-0.1.3-cp39-cp39-macosx_11_0_arm64.whl (100.2 kB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

cich_prompt-0.1.3-cp39-cp39-macosx_10_9_x86_64.whl (108.3 kB view details)

Uploaded CPython 3.9macOS 10.9+ x86-64

File details

Details for the file cich_prompt-0.1.3.tar.gz.

File metadata

  • Download URL: cich_prompt-0.1.3.tar.gz
  • Upload date:
  • Size: 52.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for cich_prompt-0.1.3.tar.gz
Algorithm Hash digest
SHA256 149108a896d9bed53ada68221a2ed7971bc73f4149cddaea5a69cdc485dddc25
MD5 95cfb2c8a23415653ec59d6748b3cccb
BLAKE2b-256 1224cea36d3bcda93ed2f1ea367bc771348b79c4ec9c7c88f9f00c54d317d54a

See more details on using hashes here.

Provenance

The following attestation bundles were made for cich_prompt-0.1.3.tar.gz:

Publisher: publish-cich-prompt.yml on akash-sekhon-1/cich

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cich_prompt-0.1.3-cp312-cp312-musllinux_1_1_x86_64.whl.

File metadata

File hashes

Hashes for cich_prompt-0.1.3-cp312-cp312-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 ebf1a2553e4ba46f1eea99dd2cd107489757837523adc4ddbad79d461d221754
MD5 86d2b16bcd76fa077234876e54d15bc1
BLAKE2b-256 3f5de0df82a27049a0d3432114ae4e64163d4a783f33e26d00dff175ae3129d2

See more details on using hashes here.

Provenance

The following attestation bundles were made for cich_prompt-0.1.3-cp312-cp312-musllinux_1_1_x86_64.whl:

Publisher: publish-cich-prompt.yml on akash-sekhon-1/cich

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cich_prompt-0.1.3-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for cich_prompt-0.1.3-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 4f1e9e6d5bbb2dd3a64b31a12dcb7cfd987463e15b4ce1ae8d1d5ca300daebb5
MD5 34d88998a56c8edfe1d4e83a3cb7d3b3
BLAKE2b-256 4b39d171dd86e948e51ff3047fee1f57dd8761a5f866e928d1459533af980760

See more details on using hashes here.

Provenance

The following attestation bundles were made for cich_prompt-0.1.3-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish-cich-prompt.yml on akash-sekhon-1/cich

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cich_prompt-0.1.3-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for cich_prompt-0.1.3-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ebb913e2d0c251bd696f1007bb0e9de7af806bf2480740cc9d431a33686f31ea
MD5 2a98dea4061ca6704170e0e2397e62be
BLAKE2b-256 e39f702ef1935897f649cd8ee20c435162a71fd864dead9f0956eafb28dba86e

See more details on using hashes here.

Provenance

The following attestation bundles were made for cich_prompt-0.1.3-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: publish-cich-prompt.yml on akash-sekhon-1/cich

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cich_prompt-0.1.3-cp312-cp312-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for cich_prompt-0.1.3-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 b2e4ecff839a0f9cb354861bf2284c4ee5c731639b58297782e46358aeb1af72
MD5 77ec99acb1a45bae92bbee9e39b9e49b
BLAKE2b-256 81132dbcc07ac5dedc1f8318a12e3f00e8af983f8661489624aa5fc3f5e3d2bb

See more details on using hashes here.

Provenance

The following attestation bundles were made for cich_prompt-0.1.3-cp312-cp312-macosx_10_9_x86_64.whl:

Publisher: publish-cich-prompt.yml on akash-sekhon-1/cich

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cich_prompt-0.1.3-cp311-cp311-musllinux_1_1_x86_64.whl.

File metadata

File hashes

Hashes for cich_prompt-0.1.3-cp311-cp311-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 8971af7b4b8dfcb178687b6f51306fbd2d7952c9612ca583a9b3e0868b959cdf
MD5 f436b460079b9f6304ab45b4ab253b01
BLAKE2b-256 06766c1f232e502211dd8d5f710e2c5cb3d8af8b4492cb9ccd55ccddfecc00f7

See more details on using hashes here.

Provenance

The following attestation bundles were made for cich_prompt-0.1.3-cp311-cp311-musllinux_1_1_x86_64.whl:

Publisher: publish-cich-prompt.yml on akash-sekhon-1/cich

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cich_prompt-0.1.3-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for cich_prompt-0.1.3-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 f61821f16178f7a6400bafc506905eac50cc63f94fcd5560e7da11ac4d2e62ab
MD5 e8cb7134917284ef072cd7f91095de70
BLAKE2b-256 f74f74bb2a81d5b10d0b3f43952dafe634f4485457fb3d2293ac85f3d08e08ed

See more details on using hashes here.

Provenance

The following attestation bundles were made for cich_prompt-0.1.3-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish-cich-prompt.yml on akash-sekhon-1/cich

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cich_prompt-0.1.3-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for cich_prompt-0.1.3-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7b2f53b8f245eef4d1428d7c5194f68c7b3e075f25bea4730c55ba158f3645d2
MD5 4a0d7ad9934479517bcaf7e46038c0f7
BLAKE2b-256 247bdec8b0291b564a301261c9ebf5e35dbcf7265e14f2cae2847dff985daed4

See more details on using hashes here.

Provenance

The following attestation bundles were made for cich_prompt-0.1.3-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: publish-cich-prompt.yml on akash-sekhon-1/cich

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cich_prompt-0.1.3-cp311-cp311-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for cich_prompt-0.1.3-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 1d903a9a6ffce725597e4d21a2b52bac101c6d0d8f62e2397db4851971f0f4ff
MD5 dd147056b69b013a90e999b218f1188d
BLAKE2b-256 72fc9bf52a99a7757b8d7fe0b8bc528ef948d306dd14b639d56709ea19a59736

See more details on using hashes here.

Provenance

The following attestation bundles were made for cich_prompt-0.1.3-cp311-cp311-macosx_10_9_x86_64.whl:

Publisher: publish-cich-prompt.yml on akash-sekhon-1/cich

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cich_prompt-0.1.3-cp310-cp310-musllinux_1_1_x86_64.whl.

File metadata

File hashes

Hashes for cich_prompt-0.1.3-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 eadb319f206f6b6e0f5090cfb52c94533ec1a16055c07fa22c0ab488d245c5c4
MD5 9742bb8fabb43637b68551fdcc54cef5
BLAKE2b-256 c6447058e8ee8eb3beceac9f0e6536c32ca4eced0c052ec955537397eac1b41f

See more details on using hashes here.

Provenance

The following attestation bundles were made for cich_prompt-0.1.3-cp310-cp310-musllinux_1_1_x86_64.whl:

Publisher: publish-cich-prompt.yml on akash-sekhon-1/cich

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cich_prompt-0.1.3-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for cich_prompt-0.1.3-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 a7373dd545baa59073446268e317c647e4f7314798e69310851a65b836a75f20
MD5 9a2ecd7fc275b5279f4ec09a01a454ed
BLAKE2b-256 545ddfee6f7e0bc2b620ca5560ab1f25f723c3c1bdcfcb4d095082da1a2b95e1

See more details on using hashes here.

Provenance

The following attestation bundles were made for cich_prompt-0.1.3-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish-cich-prompt.yml on akash-sekhon-1/cich

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cich_prompt-0.1.3-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for cich_prompt-0.1.3-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 089c1bc342c871d5781e4f1dbe2ddbba0ab36d67fbc6b0364eb104cf15f4893e
MD5 d13b403a63256a97993965f2ca135911
BLAKE2b-256 99e4862ce040df1afdb849cda3574c7456ccdbfb2ca3ba436cf2f2b9571d157f

See more details on using hashes here.

Provenance

The following attestation bundles were made for cich_prompt-0.1.3-cp310-cp310-macosx_11_0_arm64.whl:

Publisher: publish-cich-prompt.yml on akash-sekhon-1/cich

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cich_prompt-0.1.3-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for cich_prompt-0.1.3-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 b4ba5bb0a2716e2d1094cad86adbf27b318767d09cf99f5a2da30e09462c0f17
MD5 22e0ba3ee01e87fa250a0a5469a295d6
BLAKE2b-256 648abd31dec777e1789cfa53409459e7a2cdcdf218d98a9b552f4813524a1f78

See more details on using hashes here.

Provenance

The following attestation bundles were made for cich_prompt-0.1.3-cp310-cp310-macosx_10_9_x86_64.whl:

Publisher: publish-cich-prompt.yml on akash-sekhon-1/cich

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cich_prompt-0.1.3-cp39-cp39-musllinux_1_1_x86_64.whl.

File metadata

File hashes

Hashes for cich_prompt-0.1.3-cp39-cp39-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 746ce0d119a37575ff472b6bcff494455337c1e811a6cfe001e523329b8d4f16
MD5 8130abe9a7a37b3ec5a8cbdddff23e8c
BLAKE2b-256 8a117667ec402c9aaceb5c1424968fb6f7f7310a9a27ca87a6170f095b92c389

See more details on using hashes here.

Provenance

The following attestation bundles were made for cich_prompt-0.1.3-cp39-cp39-musllinux_1_1_x86_64.whl:

Publisher: publish-cich-prompt.yml on akash-sekhon-1/cich

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cich_prompt-0.1.3-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for cich_prompt-0.1.3-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 68fc17dd86083d7c485e5d6335905d24e81231ace86d2d3e5b9ba9a85285b6e9
MD5 dbb713fa7fd867a4f8bf75bb498ab7db
BLAKE2b-256 c413da00142c62746816cf41a18ae61ed41860d7aa17802aadb175918f10f5d0

See more details on using hashes here.

Provenance

The following attestation bundles were made for cich_prompt-0.1.3-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish-cich-prompt.yml on akash-sekhon-1/cich

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cich_prompt-0.1.3-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for cich_prompt-0.1.3-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3da4ec892488ca2c7d36d133579309b737765558caf264ea231cf193c7a425f7
MD5 f66cf48483541901f1aa86d959b57eb1
BLAKE2b-256 430a49b9b3c79ed6a5a9218cbcdcc53cefe2766ff532ed323b5159d955b5fc78

See more details on using hashes here.

Provenance

The following attestation bundles were made for cich_prompt-0.1.3-cp39-cp39-macosx_11_0_arm64.whl:

Publisher: publish-cich-prompt.yml on akash-sekhon-1/cich

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cich_prompt-0.1.3-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for cich_prompt-0.1.3-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 2da8077062a889449ce3099bc8a18ee5d6c99a23a768ee92af0e525fabc309fd
MD5 50f290877014616711e69ca85dad7e58
BLAKE2b-256 71e37d62285a6e4fc25a5958cf7e2e9194a5ff8b13f8ced0c3d8b3f63506345f

See more details on using hashes here.

Provenance

The following attestation bundles were made for cich_prompt-0.1.3-cp39-cp39-macosx_10_9_x86_64.whl:

Publisher: publish-cich-prompt.yml on akash-sekhon-1/cich

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page