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.0.tar.gz (53.0 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.0-cp312-cp312-musllinux_1_1_x86_64.whl (664.0 kB view details)

Uploaded CPython 3.12musllinux: musl 1.1+ x86-64

cich_prompt-0.1.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (127.6 kB view details)

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

cich_prompt-0.1.0-cp312-cp312-macosx_11_0_arm64.whl (100.6 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

cich_prompt-0.1.0-cp312-cp312-macosx_10_9_x86_64.whl (109.5 kB view details)

Uploaded CPython 3.12macOS 10.9+ x86-64

cich_prompt-0.1.0-cp311-cp311-musllinux_1_1_x86_64.whl (664.2 kB view details)

Uploaded CPython 3.11musllinux: musl 1.1+ x86-64

cich_prompt-0.1.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (127.9 kB view details)

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

cich_prompt-0.1.0-cp311-cp311-macosx_11_0_arm64.whl (100.3 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

cich_prompt-0.1.0-cp311-cp311-macosx_10_9_x86_64.whl (108.6 kB view details)

Uploaded CPython 3.11macOS 10.9+ x86-64

cich_prompt-0.1.0-cp310-cp310-musllinux_1_1_x86_64.whl (663.0 kB view details)

Uploaded CPython 3.10musllinux: musl 1.1+ x86-64

cich_prompt-0.1.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (126.3 kB view details)

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

cich_prompt-0.1.0-cp310-cp310-macosx_11_0_arm64.whl (98.9 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

cich_prompt-0.1.0-cp310-cp310-macosx_10_9_x86_64.whl (107.0 kB view details)

Uploaded CPython 3.10macOS 10.9+ x86-64

cich_prompt-0.1.0-cp39-cp39-musllinux_1_1_x86_64.whl (663.1 kB view details)

Uploaded CPython 3.9musllinux: musl 1.1+ x86-64

cich_prompt-0.1.0-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (126.4 kB view details)

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

cich_prompt-0.1.0-cp39-cp39-macosx_11_0_arm64.whl (99.1 kB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

cich_prompt-0.1.0-cp39-cp39-macosx_10_9_x86_64.whl (107.2 kB view details)

Uploaded CPython 3.9macOS 10.9+ x86-64

File details

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

File metadata

  • Download URL: cich_prompt-0.1.0.tar.gz
  • Upload date:
  • Size: 53.0 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.0.tar.gz
Algorithm Hash digest
SHA256 0cd73e61adec06e2e796e3db68e536efd56eb11bcca20c886150e6fac9fb4f07
MD5 2b407ddbf54b8e1060563bcdaf528f3e
BLAKE2b-256 ccab22dd24b12017a1502698cbbf87a6cf76ff8dd4ee02e081ac6ac95e6a8e6e

See more details on using hashes here.

Provenance

The following attestation bundles were made for cich_prompt-0.1.0.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.0-cp312-cp312-musllinux_1_1_x86_64.whl.

File metadata

File hashes

Hashes for cich_prompt-0.1.0-cp312-cp312-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 ebbdce0b08005eea9f05399e4203f54c44057f1d59e70892ea9b5faf21d6fb35
MD5 be67b12bc9665d31e2a514ba57c682d8
BLAKE2b-256 da44ade0d13dedc9d8ee7992ebef95de27af9b35a39ecb83c3d57addac32c3c5

See more details on using hashes here.

Provenance

The following attestation bundles were made for cich_prompt-0.1.0-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.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for cich_prompt-0.1.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 7009d885bf5aa6bd6df588f571d61be3c14766a9f8a7626d978915b701e3f90e
MD5 6c6eafb74e936458728aada0365658af
BLAKE2b-256 06140fd742523ce5cfc9618ad0ed7378efd3471b986e3fc8ad2c216798b0c3a8

See more details on using hashes here.

Provenance

The following attestation bundles were made for cich_prompt-0.1.0-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.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for cich_prompt-0.1.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4049ed996777aa042a1711a30302d9ffcf3bc84eb32e635178f7c708d8021b2c
MD5 8ad492919c3f7fe14392bf4457bd0948
BLAKE2b-256 6b97d81f88a7b1aeb55bd2e3d996ffd976e48c194f0a4fc3c8da287cd60b5334

See more details on using hashes here.

Provenance

The following attestation bundles were made for cich_prompt-0.1.0-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.0-cp312-cp312-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for cich_prompt-0.1.0-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 617abc9453764f3a0f11e20394b38a7b4a72a224ca5a6007e7c341b7cb5ef6cb
MD5 86e3bdd8e26095ed5ce24d3dee84bcda
BLAKE2b-256 496605ca0d548018d3027c93a810bf0309fff0f37cd651fdac50fa505fb4e190

See more details on using hashes here.

Provenance

The following attestation bundles were made for cich_prompt-0.1.0-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.0-cp311-cp311-musllinux_1_1_x86_64.whl.

File metadata

File hashes

Hashes for cich_prompt-0.1.0-cp311-cp311-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 e36d21c81f2cd579b3c7109397d35e4d484a013843188916d3489706f72c12fb
MD5 de514b2759fbb143fd47ad02ef05e479
BLAKE2b-256 dcb86ed372fc0951802ff594cf603f084253e531fa0f2fb2de2096c40202be98

See more details on using hashes here.

Provenance

The following attestation bundles were made for cich_prompt-0.1.0-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.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for cich_prompt-0.1.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 e9c72681f6d96055bfaffd862acb42fbe7766db8c181c1e478858bfac3525ed6
MD5 2ebf743e22865be5342350d46152d9af
BLAKE2b-256 8d332092492713bca4f87051a4669e742d87935d34e056b60323805433528ef0

See more details on using hashes here.

Provenance

The following attestation bundles were made for cich_prompt-0.1.0-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.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for cich_prompt-0.1.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 508d9556cb12209c3c1417fc4a778c4a374ed6511e56d0d15812c16b1c069233
MD5 812573dd740db3206c15b8b46331b52a
BLAKE2b-256 3bb4ebb0fbb3df3ea357f6774d0c1f0782a4666edc192a053cdeab2859d9f622

See more details on using hashes here.

Provenance

The following attestation bundles were made for cich_prompt-0.1.0-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.0-cp311-cp311-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for cich_prompt-0.1.0-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 afbf94164dd3487e14de77e1115cc98d3cf594983bc9e6c05cae0015a30c6323
MD5 3a777dc5f4444513d69183237a95f3f8
BLAKE2b-256 49ef7709dcf066603a3c9a215e2d01f5f3a176b5f417f5702f6d181c5a5ad078

See more details on using hashes here.

Provenance

The following attestation bundles were made for cich_prompt-0.1.0-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.0-cp310-cp310-musllinux_1_1_x86_64.whl.

File metadata

File hashes

Hashes for cich_prompt-0.1.0-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 581c2e83b1b499094c7caf9b779810f61fc6b8271547171627c23dd3150047c1
MD5 78183af6fc0b853844d075529803059f
BLAKE2b-256 ff83a77d6e851c2b633f909789921865f722da37efc34d7ef6f84776d5959ab4

See more details on using hashes here.

Provenance

The following attestation bundles were made for cich_prompt-0.1.0-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.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for cich_prompt-0.1.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b9b5ba254035d214746dfa71a0b1ed07de060c08634e71fa6d296655209d1be1
MD5 7c5e5a79b0f2d22b86604c29e0835fb0
BLAKE2b-256 c738a0c73611af05288c46b7b458538c14c23700e92b41790cb9b8fd6d2adc21

See more details on using hashes here.

Provenance

The following attestation bundles were made for cich_prompt-0.1.0-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.0-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for cich_prompt-0.1.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e3381e01ffa35fda53c97851da3e7b7dadf3cf3d22f0868f290503bcd7687c30
MD5 d97dc3a682ea7922f2566f2a2ddd7bbd
BLAKE2b-256 699f3e264e2d5a19c5bc99c9078643504d0bdd7296c97fd65899857a16f0c7ce

See more details on using hashes here.

Provenance

The following attestation bundles were made for cich_prompt-0.1.0-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.0-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for cich_prompt-0.1.0-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 15e002deb21ed548aea0df16efe63839c2b4fc5f6de487bedc3d3132cecb6aa9
MD5 7cf37daa6ccf269fc1d1a46b2d15ced3
BLAKE2b-256 e6089a021ddebfb7728f5655b36d49587c42d53e0bf8c9daac210daf4d6b7d2f

See more details on using hashes here.

Provenance

The following attestation bundles were made for cich_prompt-0.1.0-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.0-cp39-cp39-musllinux_1_1_x86_64.whl.

File metadata

File hashes

Hashes for cich_prompt-0.1.0-cp39-cp39-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 702f7477795bc9d7e724df73fbf21ccc389b3b92cf4c3e11ab5933b675ceed57
MD5 9e49f55d7c7a25a9ba788624f3e0d306
BLAKE2b-256 4dd67b0cea31d9e75e4a4069c6cf7bb6dddd7fe903845e9099bb8a6852689406

See more details on using hashes here.

Provenance

The following attestation bundles were made for cich_prompt-0.1.0-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.0-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for cich_prompt-0.1.0-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 228075f4443cdb2b543962f98625820ffda1d94fab4e66e0bb6cf7662d05cfe3
MD5 3267d20e32da8bc5e58eab5d0017ed0b
BLAKE2b-256 c98fe37878b5e9e567d539874c1a302c02c0a85ea0c60587ffbff36c477cc90a

See more details on using hashes here.

Provenance

The following attestation bundles were made for cich_prompt-0.1.0-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.0-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for cich_prompt-0.1.0-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1903ef240c0aa79cb29dedb3f5f32f8e9759366cdbd594f6e7dfe8bcbaceddf8
MD5 d60c9071028650c80885bde0000ebba7
BLAKE2b-256 4a41e22acf87d77ceaf4bd5419841c9551ba062ebfc5707dcdd972bf61db4c57

See more details on using hashes here.

Provenance

The following attestation bundles were made for cich_prompt-0.1.0-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.0-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for cich_prompt-0.1.0-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 e1e28e510ae7f6c42e4117b24c9715a9d7818a079401289bcdf0e7fc444ed9a6
MD5 10af18fb9d7a8af492c3fd2518950135
BLAKE2b-256 31fae5fb55527fda231cf29e1032fe4575777785485e733b87f8779f5f163f21

See more details on using hashes here.

Provenance

The following attestation bundles were made for cich_prompt-0.1.0-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