Convert documents into agent-ready Markdown context for AI coding agents
Project description
omnivorous
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 summarymanifest.json— File manifestdocs/— 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 —headingortokens(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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fea1d5b9bcd990dabb44023a7e51e4415b78220a21abe784bf1056418dd89097
|
|
| MD5 |
dbe327fceffdac2b56844e3c3c20c8c9
|
|
| BLAKE2b-256 |
437d4ee943ed6c544a6c33dc8297d02c7ab09fe2b7fa5be3788e37b8e0a02bec
|
Provenance
The following attestation bundles were made for omnivorous-0.1.0.tar.gz:
Publisher:
publish.yml on hugo-onnx/omnivorous
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
omnivorous-0.1.0.tar.gz -
Subject digest:
fea1d5b9bcd990dabb44023a7e51e4415b78220a21abe784bf1056418dd89097 - Sigstore transparency entry: 1077507727
- Sigstore integration time:
-
Permalink:
hugo-onnx/omnivorous@5151527a8342c5bcfe6d5d411e1d931e6c85a4a5 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/hugo-onnx
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@5151527a8342c5bcfe6d5d411e1d931e6c85a4a5 -
Trigger Event:
release
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
83b2228334565df8cd73e78258d77ee4b76e4f82caa4bb6eeae6a6b184f720f0
|
|
| MD5 |
2932e7fe57eee2b7253a75a18808098e
|
|
| BLAKE2b-256 |
c1f3d72bc9d1844c1c088aaa1d588ebf84b4cb3dc54d15ca63f961186ef475c7
|
Provenance
The following attestation bundles were made for omnivorous-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on hugo-onnx/omnivorous
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
omnivorous-0.1.0-py3-none-any.whl -
Subject digest:
83b2228334565df8cd73e78258d77ee4b76e4f82caa4bb6eeae6a6b184f720f0 - Sigstore transparency entry: 1077507749
- Sigstore integration time:
-
Permalink:
hugo-onnx/omnivorous@5151527a8342c5bcfe6d5d411e1d931e6c85a4a5 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/hugo-onnx
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@5151527a8342c5bcfe6d5d411e1d931e6c85a4a5 -
Trigger Event:
release
-
Statement type: