File info

Every file type has an Info view, reachable via:

  • i in the viewer — jump straight there
  • Tab — cycle into Info as one of the file's view modes
  • --info on the CLI — print info and exit

The Info view for a JPEG, with File, Image, and a detailed EXIF section

The Info view groups universal fields (name, size, MIME, timestamps) with format-specific sections — here the image's dimensions, color model, HDR gain map, and the camera / lens / exposure metadata read straight from EXIF.

Universal fields

  • File — name, path, size (exact + human-readable)
  • MIME — detected via magic bytes
  • Permissions — per-character coloring
  • Timestamps — created / modified / accessed, age-based coloring

Format-specific sections

File kindInfo section adds
Text / sourceLine / word / char counts, blank lines, longest line, line endings, indent style, encoding, shebang
MarkdownHeading counts, fenced code + langs, links, images, tables, list items, task progress, reading time
SQLDialect, statement counts by category, created-object inventory, comment count, PL/pgSQL flag
CSSRule count, selector count + per-kind histogram, @media / @keyframes / custom-property counts, @import list, colour swatch grid
Structured dataTop-level kind, key/element count, max nesting depth, total node count
CSV / TSVFormat, delimiter, encoding, header detection, per-column type inference, record count, malformed-row counter
SpreadsheetSheet count + names, title, author, subject, keywords, created / modified
SQLitePage size, page count, encoding, journal mode, schema / user version, table / view / index / trigger counts, total rows, largest tables
XML / SVGRoot element, namespaces, element counts
NotebookFormat, kernel, language, cell counts (code / markdown / raw), output / image / error counts, max execution count
ImageDimensions, megapixels, color mode, bit depth, ICC profile, HDR, EXIF, XMP
AnimationFrame count, total duration, average FPS, loop count
AudioContainer, codec, channels, sample rate, bit depth, bitrate, duration; tag fields
DocumentTitle, author, subject, keywords, dates, paragraph / word / image counts
EmailMessage count, From, To, Cc, Subject, Date, Message-ID, attachment count
Calendar / contactsiCalendar: name, event / todo counts, date range, version, product. vCard: contact count, version
PDFPDF version, metadata, page count, attachment count, inline-image count
EPUBDublin Core metadata, spine length
EPS / PostScriptTitle, creator, created, BoundingBox, language level, page count, preview, render
ComicPage count, total image bytes
ArchiveEntry / file / directory counts, total uncompressed size
DirectoryEntry / file / subdirectory counts
ISOVolume label, system ID, publisher, application, four PVD timestamps
DMGUDIF version, image variant, sizes, partition-map presence, trailer flags
Compressed wrapCodec + size before / after
Object filesFormat, architecture, type, class, endianness, entry point, section / symbol counts, debug info, build ID, linked libraries
Java classfileClass, superclass / interfaces, kind, class-file version, source file, field / method counts
CertificatePer entry: subject, issuer, serial, validity + days left, public key, signature, SANs, CA / self-signed, key usage, SHA-1 / SHA-256 fingerprints
FontFormat, face count, family, subfamily, version, weight, width, style, glyph count, units/em, codepoint coverage, scripts, hinting, designer, vendor, license
BinaryDetected format from magic (Mach-O, ELF, PE, SQLite, …)

Use --utc to show timestamps in UTC instead of local + offset.

JSON output

peek <file> --info --json prints the info screen as a single JSON object instead of the themed view — designed for shell pipelines:

peek report.pdf --info --json | jq .size_bytes

Core metadata is fully typed: size_bytes is a number, timestamps are ISO-8601 UTC strings (independent of --utc), and each MIME entry carries a machine category. Absent fields (created time, compression, warnings) are omitted rather than emitted as null. The format-specific stats are nested under a per-type key (pdf, archive, image, …) with raw typed values and lowercase tokens for enum fields. Per-type dates (pdf.created, an email's date, a document's created / modified, …) are normalised to the same ISO-8601 UTC form as the core timestamps, whatever shape the source file stored them in. --json requires --info.

The fields depend on the file type, but the overall shape is consistent:

{
  "file_name": "surreal-numbers.pdf",
  "path": "test-data/surreal-numbers.pdf",
  "size_bytes": 575907,
  "mimes": [
    {
      "mime": "application/pdf",
      "category": "registered"
    }
  ],
  "modified": "2026-05-09T07:27:14Z",
  "created": "2026-05-09T07:27:14Z",
  "permissions": "-rw-r--r--",
  "pdf": {
    "flavor": "pdf",
    "pdf_version": "1.5",
    "encrypted": false,
    "created": "2011-01-25T13:32:43Z",
    "page_count": 26,
    "image_count": 1
  }
}