← Back to tools

file-type-cli

Detect the file type of a file or stdin

File Management linuxmacoswindows JavaScript MIT

Description

file-type-cli detects the file type of a file or stdin. It identifies file types by their magic bytes rather than file extensions, providing accurate type detection.

When to use this tool

Good fit when
  • When identifying unknown file types
  • When file extensions are missing or wrong
Avoid when
  • When file extensions are reliable

AI Summary

Detect file types by magic bytes from files or stdin

Capabilities

  • + Detect file type by content
  • + Read from file or stdin
  • + Identify by magic bytes

Use When

  • When identifying unknown file types
  • When file extensions are missing or wrong

Avoid When

  • x When file extensions are reliable

Related Tools

View AGENTS.md for file-type-cli