Skip to main content

Convert documents into agent-ready Markdown context for AI coding agents

Project description

omnivorous

omni

Install

pip install omnivorous

Quick Start

# Generate a full agent context pack (defaults to Claude Code)
omni pack docs/ -o agent-context/

# Generate for a specific agent
omni pack docs/ --agent codex
omni pack docs/ --agent cursor

# Generate for multiple agents at once
omni pack docs/ --agent claude --agent codex --agent copilot

# Generate for all supported agents
omni pack docs/ --agent all

# Convert all files in a folder
omni ingest docs/ -o output/

# Inspect a document
omni inspect document.pdf

# Convert a single file
omni convert document.pdf -o output.md

# Use a different token encoding (default: o200k_base)
omni inspect document.pdf --encoding cl100k_base
omni convert document.pdf --encoding cl100k_base -o output.md

Supported Formats

  • PDF (.pdf)
  • Word (.docx)
  • HTML (.html, .htm)
  • Markdown (.md, .markdown)
  • Plain text (.txt)

Commands

All commands accept --encoding to select the tiktoken encoding used for token counting (default: o200k_base).

omni pack <folder>

Generate a full agent context pack with:

  • Agent instruction file (varies by target agent)
  • PROJECT_CONTEXT.md — Documentation summary
  • manifest.json — File manifest
  • docs/ — Converted and chunked documents

Options:

  • -o, --output: Output directory for agent context
  • -a, --agent: Target agent(s) — can be specified multiple times (default: claude)
  • --chunk-size: Target chunk size in tokens (default: 500)
  • --chunk-by: Strategy — heading or tokens (default: heading)
  • --encoding: Tiktoken encoding name (default: o200k_base)

Supported Agents

Agent Key Generated File
Claude Code claude CLAUDE.md
Codex CLI codex AGENTS.md
Cursor cursor .cursor/rules/omnivorous.md
GitHub Copilot copilot .github/copilot-instructions.md
Google Antigravity antigravity .agent/skills/omnivorous.md

Use --agent all to generate instruction files for every supported agent at once.

omni ingest <folder>

Scan a folder and convert all supported documents.

Options:

  • -o, --output: Output directory
  • --encoding: Tiktoken encoding name (default: o200k_base)

omni convert <file>

Convert a single document to Markdown with YAML frontmatter.

Options:

  • -o, --output: Output file path
  • --encoding: Tiktoken encoding name (default: o200k_base)

omni inspect <file>

Display document metadata: pages, headings, tables, token count, and encoding.

Options:

  • --encoding: Tiktoken encoding name (default: o200k_base)

Token Encoding

Token counts vary across models because each uses a different tokenizer. By default, omnivorous uses o200k_base (GPT-4o, o1, o3). You can switch to cl100k_base (GPT-4 / GPT-3.5) with the --encoding flag.

Supported encodings:

  • o200k_base — GPT-4o, o1, o3 (default)
  • cl100k_base — GPT-4, GPT-3.5

The encoding name is recorded in each document's metadata so downstream tools know which tokenizer was used.

Development

uv sync
uv run pytest
uv run ruff check src/

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

omnivorous-0.1.0.tar.gz (1.4 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

omnivorous-0.1.0-py3-none-any.whl (21.0 kB view details)

Uploaded Python 3

File details

Details for the file omnivorous-0.1.0.tar.gz.

File metadata

  • Download URL: omnivorous-0.1.0.tar.gz
  • Upload date:
  • Size: 1.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for omnivorous-0.1.0.tar.gz
Algorithm Hash digest
SHA256 fea1d5b9bcd990dabb44023a7e51e4415b78220a21abe784bf1056418dd89097
MD5 dbe327fceffdac2b56844e3c3c20c8c9
BLAKE2b-256 437d4ee943ed6c544a6c33dc8297d02c7ab09fe2b7fa5be3788e37b8e0a02bec

See more details on using hashes here.

Provenance

The following attestation bundles were made for omnivorous-0.1.0.tar.gz:

Publisher: publish.yml on hugo-onnx/omnivorous

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file omnivorous-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: omnivorous-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 21.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for omnivorous-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 83b2228334565df8cd73e78258d77ee4b76e4f82caa4bb6eeae6a6b184f720f0
MD5 2932e7fe57eee2b7253a75a18808098e
BLAKE2b-256 c1f3d72bc9d1844c1c088aaa1d588ebf84b4cb3dc54d15ca63f961186ef475c7

See more details on using hashes here.

Provenance

The following attestation bundles were made for omnivorous-0.1.0-py3-none-any.whl:

Publisher: publish.yml on hugo-onnx/omnivorous

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page