v11 · under 50 KB · zero dependencies · by Cognis Digital LLC

One file.
One cognition unit.

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 ✓
< 50 KB
Total engine size
2
Files to deploy
0
External dependencies
24
Block types
12
CLI commands
4
Cognition planes

Tiny but powerful

Everything you need for cognitive data management, nothing you don't.

Content-Addressed

Zero conflicts

Every block is identified by its SHA-256 hash. No IDs to manage, no conflicts, deterministic everywhere. Deduplication is automatic.

Zero Dependencies

2 files, 0 installs

Python stdlib only. No pip, no npm, no containers. Ships as two files totaling under 50 KB. Deploy anywhere Python runs.

Streaming First

Fetch only what you need

Block directory at end for range-fetch + append. Use curl --range to download specific blocks without pulling the whole file.

Copy-on-Write Forks

Instant branching

Instant snapshots via shard maps. Branch, experiment, merge back. Blocks are shared, not copied — zero storage overhead.

Tamper-Evident

Built-in trust

Hash chain over all events + blocks. HMAC signatures. Anti-replay stamps. Rule seals prevent silent policy swaps.

Deterministic Rebuilds

Fully auditable

Indexes rebuild from logs. Ship diffs, not artifacts. Every operation is replayable — perfect for compliance and audit trails.

Built for real-world workflows

Use cases

From AI research labs to enterprise compliance teams, COG replaces fragile toolchains with a single, portable, verifiable file.

AI & ML Knowledge Packs

Bundle training data, model configs, embeddings, and evaluation rules into a single portable file. Ship cognition, not infrastructure.

Vector search built inEmbed + query in one fileVersion with forks

Compliance & Audit

Tamper-evident proof chains and HMAC signatures make COG ideal for regulatory compliance, legal holds, and audit trails.

Immutable event logCryptographic proof chainRule seal verification

Edge & Offline Deployment

A single file under 50 KB carries its own tools. No internet, no package manager, no runtime — just Python and a .cog file.

Works air-gappedNo network requiredSelf-contained ops

Research & Experimentation

Fork bundles to create isolated experiments. Compare branches, replay event logs, and merge results — all without copying data.

Zero-cost branchingReplayable experimentsDiff stream comparison

Enterprise Knowledge Bases

Consolidate runbooks, policies, and operational rules into signed, verifiable bundles that teams can trust and share.

Signed & verifiablePortable across teamsSelf-documenting

Data Pipelines & ETL

Content-addressed blocks enable deduplication across pipeline stages. Append-only writes make COG a natural fit for streaming data.

Automatic dedupStreaming appendDeterministic rebuilds

Why teams choose COG

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.

< 30s
Setup time
< 50 KB
Engine size
Zero
Dependencies
Built-in
Integrity

Four planes of cognition

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.

Memory Plane

6 blocks

Retrieve fast — packed vectors, ANN graphs, hot caches, and filter maps

BUNDLE_HEADVEC_PAGESNEIGH_GRAPHCODEBOOKSHOTCACHEFILTERMAP

Behavior Plane

6 blocks

Act consistently — rules, state, events, tasks, and knowledge links

RULE_PACKKV_STATEEVENT_LOGTASK_TAPEREL_MAPADAPT_PATCH

Evolution Plane

4 blocks

Fork + merge — copy-on-write shards, ref counting, sparse diffs

SHARD_MAPSHARE_TALLYVIS_SCOPEDIFF_STREAM

Proof Plane

5 blocks

Trust + audit — hash chains, signatures, anti-replay stamps

PROOF_CHAINSIGN_RECORDSKEYRINGSTAMP_TOKENSRULE_SEAL

Built-ins Orchestration

3 blocks · MD + Python + Bash

Embedded operational runbooks, Python scripts (stdlib only), and POSIX shell glue. The bundle carries its own tools.

MD_RUNBOOKPY_CORESH_MINI

Stream-friendly layout

Directory at end for append-only writes and range-fetch reads.

HEADERFixed 40 bytes: magic, version, UUID, directory pointer
BLOCK 0BUNDLE_HEAD — metadata
BLOCK 1Content blocks (append-only) …
BLOCK NPROOF_CHAIN, SHARD_MAP, RULE_SEAL …
DIRECTORYJSON block index with offsets + hashes

curl --range fetches directory first, then only needed blocks

System architecture

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 size

12 verbs, complete control

One 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 -v

Built-ins only

No pip. No npm. No containers. Just what ships with your OS.

Python stdlib

Core engine — hashing, compression, binary I/O, CLI

hashlibhmacstructzlibsqlite3jsonargparseuuid

Bash built-ins

Streaming glue — piping, range-fetch, deployment

catddheadtailwcshasum*

Markdown

Operator UX — plain text, no renderer needed

RunbooksProceduresRecoveryChecklists

*If shasum not present, Python provides hashing/verify fallback

Install in one line

Everything you need. Nothing you don't. Requires Python 3.8+.

One-line install

curl -fsSL https://cognis.work/install.sh | sudo bash

Or clone & install locally

git clone https://github.com/cog-bundle/cog.git
cd cog && sudo bash install.sh

Or 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

Quick start after install

# 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 experiment

Design rules

Built-ins only

Python stdlib, Bash built-ins, plain Markdown. If a tool might not exist, fall back to Python.

Content-addressed

Every block identified by hash. No IDs to generate, no coordination needed.

Streaming first

Directory at end (or duplicated) for range-fetch + append. Designed for curl --range.

Deterministic

Indexes rebuild from logs. Ship diffs, not rebuild artifacts. Every state is replayable.

Append-only

Blocks are never modified in place. New data appends, directory rewrites at end.

Small surface

One CLI with 12 verbs. Two files total under 50 KB. Minimal API, maximum capability.