Skip to main content

File Types

Hister can index local files from configured directories and from explicit imports. Directory indexing is controlled by the indexer.directories configuration. After you configure a directory, restart the Hister server. It automatically scans the directory at startup and watches it for later changes. You do not need to run hister import file for this automatic tracking.

Local File Indexing

File typeExtensionsIndexed contentTitle source
PDF.pdfExtracted plain text from all readable pages.File path fallback
DOCX.docxParagraph text.DOCX metadata title when present, otherwise file path fallback
Markdown.md, .markdownRendered Markdown text.First H1 heading when present, otherwise file path fallback
Org mode.orgRendered Org text.Org TITLE value when present, otherwise file path fallback
HTML.html, .htmExtracted page text.Extracted page title when present, otherwise file path fallback
Plain textAny file with valid UTF 8 textFull file contents.File path fallback

Files that do not match a specialized handler are treated as plain text. Binary files are skipped.

Watched HTML files use the same extractor chain as browser submissions, including Readability and structured metadata extraction, before language detection. Their original HTML is kept for previews, and their file identity is preserved even when the page contains a canonical URL. Run hister reindex after upgrading to extract text and correct language detection for previously indexed local HTML files. Existing remote HTML snapshots must be imported again from the source files.

The same handlers process snapshots created with hister import file. These imports are stored as remote file documents. The client sends prepared text, metadata, and any HTML preview content to the server.

Directory Filters

The filetypes setting on a watched directory is an extension filter. Use names without the leading dot.

indexer:
  directories:
    - path: '~/Documents'
      label: 'documents'
      filetypes: ['pdf', 'docx', 'md', 'txt']

If filetypes is omitted, Hister considers every file that passes the other directory rules. Specialized handlers run first, then valid UTF 8 text files are indexed as plain text.

Other directory rules still apply:

RuleBehavior
labelApplies the same searchable label to every file indexed from the directory.
include_hiddenHidden files and directories are skipped unless this is enabled.
excludesMatching paths are skipped.
patternsWhen set, only matching files are considered.
indexer.max_file_size_mbFiles above the configured size limit are skipped.
sensitive_content_patternsMatching files are rejected unless the indexing path explicitly allows sensitive content.

Import Formats

The hister import file command accepts these file formats:

File typeExtensionsBehavior
Hister JSON export.jsonImports documents previously written by hister export.
7z archive.7zImports a compressed Hister JSON export.
Saved HTML page.html, .htmExtracts the original page URL when present.
Local file snapshotAny supported local formatExtracts content locally and submits a remote file document.

When importing a directory, Hister reads matching files recursively. With no input path, it uses every configured watched directory and applies its filters. This creates remote file snapshots and is intended for directories that the command line client can access but the server cannot. Add --watch to keep importing new and changed snapshots while the command runs. Watch mode skips Hister exports, 7z archives, and HTML with source URL metadata. Source removals retain the indexed snapshots. See Importing Documents for watch mode details.

Use hister import file to create snapshots of the PDF, DOCX, Markdown, Org mode, HTML without a source URL, and plain text formats listed under local file indexing. Extraction occurs on the client, so this also works when the server cannot access the filesystem.