COG bundles data, behavior, and proof into a single content-addressed file. Ship AI knowledge packs, audit trails, and operational runbooks — all in under 50 KB with zero dependencies.
# Build a bundle from any folder
$ cog pack ./my_knowledge base.cog
COG bundle created: base.cog
UUID: a1b2c3d4-e5f6-7890-abcd-ef1234567890
Blocks: 8
Size: 12,480 bytes (12.2 KB)
# Verify integrity + proof chain
$ cog verify base.cog
Phase 1: Block integrity … ✓ All 8 blocks OK
Phase 2: Proof chain … ✓ Chain OK (5 records)
Phase 3: Rule seal … ✓ Rule seal matches
VERIFIED: bundle is intact ✓Everything you need for cognitive data management, nothing you don't.
Every block is identified by its SHA-256 hash. No IDs to manage, no conflicts, deterministic everywhere. Deduplication is automatic.
Python stdlib only. No pip, no npm, no containers. Ships as two files totaling under 50 KB. Deploy anywhere Python runs.
Block directory at end for range-fetch + append. Use curl --range to download specific blocks without pulling the whole file.
Instant snapshots via shard maps. Branch, experiment, merge back. Blocks are shared, not copied — zero storage overhead.
Hash chain over all events + blocks. HMAC signatures. Anti-replay stamps. Rule seals prevent silent policy swaps.
Indexes rebuild from logs. Ship diffs, not artifacts. Every operation is replayable — perfect for compliance and audit trails.
From AI research labs to enterprise compliance teams, COG replaces fragile toolchains with a single, portable, verifiable file.
Bundle training data, model configs, embeddings, and evaluation rules into a single portable file. Ship cognition, not infrastructure.
Tamper-evident proof chains and HMAC signatures make COG ideal for regulatory compliance, legal holds, and audit trails.
A single file under 50 KB carries its own tools. No internet, no package manager, no runtime — just Python and a .cog file.
Fork bundles to create isolated experiments. Compare branches, replay event logs, and merge results — all without copying data.
Consolidate runbooks, policies, and operational rules into signed, verifiable bundles that teams can trust and share.
Content-addressed blocks enable deduplication across pipeline stages. Append-only writes make COG a natural fit for streaming data.
Traditional knowledge management requires databases, APIs, authentication layers, and deployment pipelines. COG replaces all of that with a single file that carries its own data, rules, proofs, and tools.
24 block types organized across 4 planes, plus 3 built-ins orchestration blocks. Each plane handles a distinct concern while sharing the same content-addressed store.
6 blocks
Retrieve fast — packed vectors, ANN graphs, hot caches, and filter maps
6 blocks
Act consistently — rules, state, events, tasks, and knowledge links
4 blocks
Fork + merge — copy-on-write shards, ref counting, sparse diffs
5 blocks
Trust + audit — hash chains, signatures, anti-replay stamps
3 blocks · MD + Python + Bash
Embedded operational runbooks, Python scripts (stdlib only), and POSIX shell glue. The bundle carries its own tools.
Directory at end for append-only writes and range-fetch reads.
curl --range fetches directory first, then only needed blocks
The complete COG system — from CLI to on-disk binary format — in one diagram.
┌─────────────────────────────────────────────┐
│ COG v11 — System Overview │
│ Built by Cognis Digital LLC │
└────────────────────┬────────────────────────┘
│
┌────────────────────────┼────────────────────────┐
│ │ │
┌─────▼─────┐ ┌───────▼───────┐ ┌──────▼──────┐
│ cog.sh │ │ cog.py │ │ cog_tui.py │
│ Bash CLI │ │ Python Engine │ │ Interactive │
│ Wrapper │ │ (stdlib only)│ │ TUI │
└─────┬─────┘ └───────┬───────┘ └──────┬──────┘
│ │ │
└────────────┬───────────┘ │
│ │
┌────────────▼───────────────────────────────────┘
│
┌───────────▼───────────────────────────────────────────────────┐
│ .cog Bundle File │
│ ┌─────────────────────────────────────────────────────────┐ │
│ │ HEADER (40 bytes) │ │
│ │ magic · version · UUID · directory_offset │ │
│ ├─────────────────────────────────────────────────────────┤ │
│ │ │ │
│ │ ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐ │ │
│ │ │ Memory │ │Behavior │ │Evolution│ │ Proof │ │ │
│ │ │ Plane │ │ Plane │ │ Plane │ │ Plane │ │ │
│ │ ├─────────┤ ├─────────┤ ├─────────┤ ├─────────┤ │ │
│ │ │VEC_PAGES│ │RULE_PACK│ │SHARD_MAP│ │PROOF_ │ │ │
│ │ │NEIGH_ │ │KV_STATE │ │SHARE_ │ │ CHAIN │ │ │
│ │ │ GRAPH │ │EVENT_LOG│ │ TALLY │ │SIGN_ │ │ │
│ │ │CODEBOOKS│ │TASK_TAPE│ │VIS_SCOPE│ │ RECORDS │ │ │
│ │ │HOTCACHE │ │REL_MAP │ │DIFF_ │ │KEYRING │ │ │
│ │ │FILTERMAP│ │ADAPT_ │ │ STREAM │ │STAMP_ │ │ │
│ │ │ │ │ PATCH │ │ │ │ TOKENS │ │ │
│ │ │ │ │ │ │ │ │RULE_SEAL│ │ │
│ │ └─────────┘ └─────────┘ └─────────┘ └─────────┘ │ │
│ │ │ │
│ │ ┌───────────────────────────────────────────────────┐ │ │
│ │ │ Built-ins: MD_RUNBOOK · PY_CORE · SH_MINI │ │ │
│ │ └───────────────────────────────────────────────────┘ │ │
│ │ │ │
│ ├─────────────────────────────────────────────────────────┤ │
│ │ DIRECTORY (JSON) │ │
│ │ block index · offsets · content IDs · branch map │ │
│ └─────────────────────────────────────────────────────────┘ │
└───────────────────────────────────────────────────────────────┘
12 CLI verbs: pack · list · get · put · query · fork
verify · embed · replay · compact · log · sign
Key properties:
✓ Content-addressed (SHA-256) ✓ Append-only writes
✓ Copy-on-write forking ✓ HMAC-SHA256 signatures
✓ Tamper-evident proof chain ✓ Zero external dependencies
✓ Streaming range-fetch ✓ < 50 KB total engine sizeOne CLI, twelve commands. Everything you need, nothing more.
cog pack<source> <out.cog>
Build bundle from folder or file
cog list<bundle.cog>
List blocks, branches, stats
cog get<bundle.cog> <id>
Extract a block by ID or type
cog put<bundle.cog> <file> <type>
Append a block to bundle
cog query<bundle.cog> <text>
Hybrid text + vector similarity search
cog fork<bundle.cog> <name>
Create a copy-on-write branch
cog verify<bundle.cog>
Verify integrity + proof chain
cog embed<bundle.cog> <files…>
Embed text as vectors (feature hashing)
cog replay<bundle.cog>
Replay event log + diff streams
cog compact<bundle.cog> [out]
Compact bundle (dedup + rebuild)
cog log<bundle.cog> [-n N]
Show event log timeline
cog sign<bundle.cog> --key <k>
HMAC-SHA256 sign bundle
# Pack a project folder into a bundle
$ cog pack ./research paper.cog
# List everything inside
$ cog list paper.cog
# Search across all text blocks
$ cog query paper.cog "neural architecture"
# Fork for experimentation
$ cog fork paper.cog experiment-v2
# Add new data to the fork
$ cog put paper_experiment-v2.cog new_results.json RULE_PACK
# Verify the fork is intact
$ cog verify paper_experiment-v2.cog -vNo pip. No npm. No containers. Just what ships with your OS.
Core engine — hashing, compression, binary I/O, CLI
Streaming glue — piping, range-fetch, deployment
Operator UX — plain text, no renderer needed
*If shasum not present, Python provides hashing/verify fallback
Everything you need. Nothing you don't. Requires Python 3.8+.
One-line install
curl -fsSL https://cognis.work/install.sh | sudo bashOr clone & install locally
git clone https://github.com/cog-bundle/cog.git
cd cog && sudo bash install.shOr just grab the two files
# System-wide install — two files, zero dependencies
sudo curl -o /usr/local/lib/cog/cog.py https://cognis.work/cog.py
sudo curl -o /usr/local/lib/cog/cog.sh https://cognis.work/cog.sh
sudo chmod +x /usr/local/lib/cog/cog.sh
sudo ln -sf /usr/local/lib/cog/cog.sh /usr/local/bin/cog
cog help# Create a sample bundle
mkdir my_project
echo "# My Runbook" > my_project/runbook.md
echo '{"rules":[]}' > my_project/rules.json
# Pack, verify, explore
cog pack my_project demo.cog
cog verify demo.cog
cog list demo.cog
cog query demo.cog "runbook"
cog fork demo.cog experimentPython stdlib, Bash built-ins, plain Markdown. If a tool might not exist, fall back to Python.
Every block identified by hash. No IDs to generate, no coordination needed.
Directory at end (or duplicated) for range-fetch + append. Designed for curl --range.
Indexes rebuild from logs. Ship diffs, not rebuild artifacts. Every state is replayable.
Blocks are never modified in place. New data appends, directory rewrites at end.
One CLI with 12 verbs. Two files total under 50 KB. Minimal API, maximum capability.