Socket
Book a DemoInstallSign in
Socket

reveal-file

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

reveal-file

Reveal a file or folder in the system file manager (Finder, Explorer, etc.)

latest
Source
npmnpm
Version
0.1.2
Version published
Maintainers
1
Created
Source

reveal-file

Reveal a file or folder in the system file manager (Finder, Explorer, etc.)

Cross-platform utility to open the file manager and highlight a specific file or folder. Works on macOS, Windows, and Linux.

Install

npm install reveal-file

Usage

import revealFile from 'reveal-file';

await revealFile('/Users/sindresorhus/Documents/Unicorn.pdf');

API

revealFile(filePath)

Reveals a file or folder in the system file manager.

Returns a Promise that resolves when the file manager has been opened.

filePath

Type: string | URL

The absolute path to the file or folder to reveal.

CLI

npm install --global reveal-file
$ reveal-file

Usage: reveal-file <file> [<file> ...]

Example:
  reveal-file ~/Documents/Unicorn.pdf

Linux support

Supported file managers:

  • Nautilus (GNOME)
  • Dolphin (KDE)
  • Caja (MATE)
  • Thunar (XFCE)
  • Nemo (Cinnamon)
  • open - Open stuff like URLs, files, executables
  • open-editor - Open files in your editor at a specific line and column

Keywords

reveal

FAQs

Package last updated on 04 Jan 2026

Did you know?

Socket

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.

Install

Related posts