
Security News
The Changelog Podcast: Practical Steps to Stay Safe on npm
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.
inquirer-file-tree-selection-prompt
Advanced tools

npm install inquirer-file-tree-selection-prompt
If you are still using CJS, please install
inquirer-file-tree-selection-prompt@^1
inquirer.registerPrompt('file-tree-selection', inquirerFileTreeSelection)
inquirer.prompt({
type: 'file-tree-selection',
...
})
Takes type, name, message, [filter, validate, transformer, default, pageSize, onlyShowDir, onlyShowValid, hideChildrenOfValid, root, hideRoot, multiple, enableGoUpperDirector] properties.
The extra options that this plugin provides are:
onlyShowDir: (Boolean) if true, will only show directory. Default: false.root: (String) it is the root of file tree. Default: process.cwd().onlyShowValid: (Boolean) if true, will only show valid files (if validate is provided). Default: false.hideChildrenOfValid: (Boolean) if true, will hide children of valid directories (if validate is provided). Default: false.transformer: (Function) a hook function to transform the display of directory or file name.multiple: (Boolean) if true, will enable to select multiple files. Default: false.enableGoUpperDirectory: (Boolean) Show .. in inside root dir, and the user can press space on it to go upper directory. Default: false.When multiple is enabled, default should be string[] type, otherwise it's string type.
version >= 1.0.16
Install @types/inquirer
Ensure you have registered with file-tree-selection
inquirer.registerPrompt('file-tree-selection', inquirerFileTreeSelection)

ESM (version ^2)
import inquirer from 'inquirer'
import inquirerFileTreeSelection from 'inquirer-file-tree-selection-prompt'
inquirer.registerPrompt('file-tree-selection', inquirerFileTreeSelection)
inquirer
.prompt([
{
type: 'file-tree-selection',
name: 'file'
}
])
.then(answers => {
console.log(JSON.stringify(answers))
});
CJS (version ^1 and <2)
const inquirer = require('inquirer')
const inquirerFileTreeSelection = require('inquirer-file-tree-selection-prompt')
inquirer.registerPrompt('file-tree-selection', inquirerFileTreeSelection)
inquirer
.prompt([
{
type: 'file-tree-selection',
name: 'file'
}
])
.then(answers => {
console.log(JSON.stringify(answers))
});
FAQs
inquerer file tree selection prompt
The npm package inquirer-file-tree-selection-prompt receives a total of 15,070 weekly downloads. As such, inquirer-file-tree-selection-prompt popularity was classified as popular.
We found that inquirer-file-tree-selection-prompt demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.

Security News
Ruby's creator Matz assumes control of RubyGems and Bundler repositories while former maintainers agree to step back and transfer all rights to end the dispute.