file-type-cli
Detect the file type of a file or stdin.
The command‑line tool reads a file path or data from standard input and outputs the detected MIME type and file extension. It supports the same range of formats as the underlying library, covering common image, video, audio, document, and archive types. Users invoke it with a filename argument or pipe data directly, and the tool prints a concise result such as “png image/png”.
It is intended for developers and system administrators who need a quick way to identify unknown or ambiguous files in scripts, pipelines, or interactive sessions. The utility works cross‑platform wherever Node.js is available and can be installed globally via npm.
The package is marked as stable and provides a simple interface without additional configuration. It relies on the file‑type library for detection, and the README links to the full list of supported formats and the related API module.
Reviews
Loading reviews…
Similar apps
Terminals & CLI
gzip-size-cli
Get the gzipped size of a file.
File Management & Transfer
find-up-cli
Find a file by walking up parent directories.
File Management & Transfer
cpy-cli
Copies files.
Terminals & CLI
imgur-uploader-cli
Upload images to imgur.
File Management & Transfer
empty-trash-cli
Empty the trash.
File Management & Transfer
del-cli
Delete files and folders.