The info command displays detailed metadata about a ZIM archive file, showing information about its contents, structure, and technical details.
The info command provides comprehensive inspection of ZIM files:
- Displays metadata fields (title, creator, publisher, date, description, language, tags)
- Shows article count and namespace distribution
- Lists file size and ZIM format version
- Supports both library and direct file access
zim info <file.zim or name>The command accepts either:
- Library name: Display name, index number, or partial filename from
zim library - Direct path: Path to a
.zimfile outside the library
# By index number
$ zim info 1
ZIM File Information
====================
File: ~/.cache/zim/wikipedia_en_comics_nopic_2024-10.zim
Article Count: 123456
Main Page: Main Page
Metadata:
Title: Wikipedia: Comics
Creator: Kiwix
Publisher: Wikimedia Foundation
Date: 2024-10-15
Description: Wikipedia articles about comics
Language: en
Tags: comics,wikipedia
Namespaces:
A: Articles (120000 entries)
I: Images (3456 entries)
J: Text images (789 entries)
File Size: 5.2 GB
ZIM Version: 7.0# Direct file path
$ zim info ~/Downloads/wikipedia_en_physics.zim
ZIM File Information
====================
File: ./archives/wikipedia_en_physics.zim
Article Count: 98765
Metadata:
Title: Wikipedia: Physics
Creator: Kiwix
Publisher: Wikimedia Foundation
Date: 2024-09-20
Description: Physics-related Wikipedia articles
Language: en
Tags: physics,wikipedia
Namespaces:
A: Articles (95000 entries)
I: Images (3765 entries)
File Size: 3.1 GB
ZIM Version: 7.0The command displays information in several sections:
- File: Path to the ZIM file
- Article Count: Total number of articles in the file
- Main Page: Main entry point article (if defined)
- UUID: Unique identifier for the ZIM file (hexadecimal)
- Title: Descriptive title of the ZIM file
- Creator: Tool/entity that created the ZIM file
- Publisher: Organization that published the content
- Date: Publication date
- Description: Detailed description of contents
- Language: Primary language code (ISO 639-1)
- Tags: Comma-separated tags for categorization
Shows distribution of content across ZIM namespace types:
| Namespace | Description | Typical Content |
|---|---|---|
| A | Articles | Main article content |
| B | Article metadata | Metadata for articles |
| I | Images | Image files (PNG, JPG, SVG) |
| M | ZIM metadata | ZIM file metadata |
| U | Categories | Category listings |
| V | Video | Video content |
| W | Well known entries | Standard entries |
| X | Search indexes | Search index data |
- File Size: Human-readable file size (GB, MB, etc.)
- ZIM Version: Format version (major.minor)
When given a library reference, the command resolves it through the library system:
# Index number from 'zim library'
$ zim info 1
# Display name from 'zim library'
$ zim info comics
# Partial filename match
$ zim info wikipedia_en_comicsWhen given a file path, it accesses the file directly:
# Absolute path
$ zim info /path/to/file.zim
# Relative path
$ zim info ../files/archive.zim
# Home directory shortcut
$ zim info ~/archives/zimfile.zimImportant distinction:
- Article Count: Total articles in the ZIM file (from ZIM metadata)
- Namespace Counts: Entries in each specific namespace type
Some ZIM files contain significant non-article content (images, metadata, indexes), so the total namespace entries may exceed the article count.
The command will fail with appropriate error messages for:
- File not found: When the specified file doesn't exist
- Invalid ZIM file: When the file is not a valid ZIM archive
- Empty library: When referencing a library name but no matching files exist
The info command:
- Resolves the file path using
internal.ResolveZIMPathWithInteraction() - Opens the ZIM file using
internal.OpenZIM() - Extracts metadata using ZIM library methods (
z.Title(),z.Creator(), etc.) - Counts namespace entries using
z.EntriesWithNamespace() - Formats output with clear section headers
| Command | Description | How it Relates |
|---|---|---|
library |
List library files | Provides names/indexes for info command |
list |
List articles | Shows detailed contents after viewing metadata |
read |
Read articles | Accesses content after verifying file info |
- Library Command - How to list and reference ZIM files
- ZIM File Format - Technical specification
- Getting Started - Installation and basics