https://github.com/qduc/ink-prompt
An Ink component for collecting multi-line text in CLIs
https://github.com/qduc/ink-prompt
cli ink input multiline react terminal textarea
Last synced: about 2 months ago
JSON representation
An Ink component for collecting multi-line text in CLIs
- Host: GitHub
- URL: https://github.com/qduc/ink-prompt
- Owner: qduc
- License: mit
- Created: 2025-12-04T10:36:28.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2026-02-03T12:50:44.000Z (4 months ago)
- Last Synced: 2026-02-04T03:06:39.043Z (4 months ago)
- Topics: cli, ink, input, multiline, react, terminal, textarea
- Language: TypeScript
- Homepage:
- Size: 312 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Agents: AGENTS.md
Awesome Lists containing this project
README
# ink-prompt
A React Ink component library focused on terminal-friendly prompts. The first
export is `MultilineInput`, an Ink component for collecting multi-line text in
CLIs.
## Installation
```bash
npm install ink-prompt
```
## Usage
```tsx
import React from 'react';
import { render, Box, Text } from 'ink';
import { MultilineInput } from 'ink-prompt';
const App = () => {
return (
Describe your change (press Enter to submit):
console.log(value)}
width={80}
/>
);
};
render();
```
`MultilineInput` supports typical editing controls:
- Arrow keys for navigation
- `Ctrl+J` or typing `\` before Enter to add a newline
- `Ctrl+Z`/`Ctrl+Y` for undo/redo
- Enter submits the current buffer
## Development
```bash
# Install dependencies
npm install
# Build the project
npm run build
# Watch for changes
npm run dev
# Type check
npm run type-check
```
## License
MIT