npm.io
2.0.0 • Published 2 weeks ago

inquirer-file-selector

Licence
MIT
Version
2.0.0
Deps
3
Size
23 kB
Vulns
0
Weekly
0
Stars
17

inquirer-file-selector

A file selector prompt for Inquirer.js that allows users to interactively select files or directories from the terminal.

Features

  • File and directory selection
  • Multi-select support
  • Custom filters to show only specific file types
  • Restrict back navigation to a specific parent directory
  • Cancel selection with a key press (configurable)
  • Fully customizable keybinds
  • Fully customizable theme

Installation

pnpm add inquirer-file-selector

Basic Usage

import { fileSelector } from 'inquirer-file-selector'

const selection = await fileSelector({
  message: 'Select a file or directory:'
})
console.log(selection)

Advanced Usage

See the full documentation and examples in GitHub README.md.

2024 Brian Fernandez (main maintainer) and contributors.

This project is licensed under the MIT License.

Keywords