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 -vDocument management, compliance, data provenance, knowledge bases, workflows, incident response, SLA monitoring, secret vaulting, data classification, and reporting — all powered by COG bundles with zero external dependencies.
# Install is automatic — enterprise is built in
cog enterprise doc create --title "Security Policy" --content "All systems require MFA"
cog enterprise compliance check SOC2
cog enterprise vault store --name API_KEY --value sk-secret --rotation-days 30
cog enterprise incident create --title "DB Outage" --severity P0_CRITICAL --desc "Primary down"cog enterprise docVersion-controlled document storage with locking, classification, retention policies, and full-text search.
createCreate a new documentupdateUpdate document content (creates new version)listList all documents, optionally filtered by typesearchFull-text search across all documentsgetRetrieve document (specific version or latest)lockLock document to prevent concurrent editsunlockUnlock a locked documentdiffDiff two versions of a documentdeleteDelete a documentexportExport document as MarkdownclassifySet classification leveltagAdd tags to a documentretentionSet retention policy in dayscog enterprise complianceRegulatory compliance checks against SOC2, HIPAA, GDPR, PCI-DSS, ISO 27001, NIST CSF, and FedRAMP frameworks.
checkRun compliance check (SOC2, HIPAA, GDPR, PCI-DSS, ISO27001, NIST-CSF, FedRAMP)reportGenerate compliance reportverifyVerify audit log chain integrityframeworksList all supported compliance frameworkssearchSearch audit log entriescog enterprise provenanceTrack data lineage from sources through transforms to sinks. Trace upstream/downstream and run impact analysis.
sourceRegister a data sourcetransformRegister a transform stepsinkRegister a data sink / outputtraceTrace lineage pathgraphVisualize the full provenance graphimpactImpact analysis — what depends on this sourcelistList all provenance entitiescog enterprise kbSearchable knowledge base with articles, categories, ratings, cross-links, and popularity tracking.
addAdd a knowledge articlesearchSearch articles by contentpopularShow most-viewed articlesrecentShow recently updated articlescategoriesList all categories with article countslinkCross-link two related articlesrateRate an article (0.0–5.0)cog enterprise workflowMulti-step workflows with assignments, approvals, rejections, and progress tracking.
createCreate a new workflowassignAssign a user to a stepcompleteMark a step as completedapproveApprove the workflowrejectReject with reasonlistList workflows, optionally by statusstatusShow workflow progress and step detailscog enterprise incidentIncident lifecycle management with severity tracking, timelines, escalation, and MTTR analytics.
createOpen a new incidentassignAssign responderresolveResolve with root causeescalateEscalate severitylistList incidentstimelineShow incident timelinemttrMean Time to Resolve across all incidentscog enterprise slaDefine SLA targets, record measurements, detect breaches, and generate compliance reports.
defineDefine an SLA targetmeasureRecord a measurementreportGenerate SLA compliance reportlistList all SLAsstatusShow SLA status and breach historycog enterprise vaultEncrypted secret storage with access logging, rotation tracking, and expiry alerts.
storeStore a secretgetRetrieve a secret (logged)rotateRotate a secret with new valuecheck-rotationCheck which secrets need rotationlistList all secrets (values redacted)deleteDelete a secretcog enterprise classifyAutomatic PII detection (email, SSN, credit card, phone, IP) and manual classification levels.
scanAuto-scan text for PII and classifymanualManually classify datalistList all classificationscog enterprise reportExecutive summaries and data export in JSON and CSV formats across all enterprise modules.
summaryGenerate executive summary across all modulesexportExport section dataCustom polymetric lattice-based cryptographic suite operating over the polynomial ring Rq = Zq[x]/(xn + 1). Key encapsulation, digital signatures, hybrid encryption, certificates, and polynomial arithmetic — all stdlib-only.
# Generate a 1024-bit KEM keypair
cog pqc keygen --name alice --security 1024
# Encapsulate a shared secret for alice
cog pqc encapsulate --recipient alice
# Sign a message with Merkle-tree signature
cog pqc sign-keygen --name alice-sig --security 512
cog pqc sign --key alice-sig --message "Verified by COG"
# Hybrid encrypt a message
cog pqc encrypt --recipient alice --message "Top secret data"
# Full security analysis
cog pqc analyze --security 1024cog pqc keygenGenerate KEM keypair for lattice-based key exchangecog pqc list-keysList all stored keypairscog pqc inspectInspect keypair details and parameterscog pqc encapsulateKEM encapsulate — generate shared secret + ciphertextcog pqc decapsulateKEM decapsulate — recover shared secret from ciphertextcog pqc sign-keygenGenerate Merkle-tree signature keypair (1024 one-time keys)cog pqc signSign a message or file using WOTS+ hash chainscog pqc verifyVerify a signature against public key and messagecog pqc encryptHybrid encrypt: lattice KEM + symmetric XOR-stream ciphercog pqc decryptHybrid decrypt: recover plaintext from ciphertextcog pqc cert-createCreate a PQC certificate with lattice-signed bindingcog pqc cert-verifyVerify a certificate signature and expirycog pqc cert-inspectInspect certificate fields and metadatacog pqc kdfHKDF-SHA256 key derivation with PBKDF2 strengtheningcog pqc analyzeFull security analysis: norms, entropy, noise budgetcog pqc benchmarkPerformance benchmark: keygen, encap, decap, sign, verifycog pqc compareSide-by-side comparison of 512 vs 1024 parameterscog pqc poly-genGenerate a random polynomial in R_qcog pqc poly-addAdd two polynomials mod qcog pqc poly-mulMultiply two polynomials in R_q = Z_q[x]/(x^n + 1)cog pqc poly-normCompute L2 and L-infinity norms of a polynomialA full content-addressed blockchain with proof-of-work mining, wallets, transactions, Merkle inclusion proofs, smart contracts, consensus, and chain management — all in a single stdlib-only Python file.
# Create wallets
cog chain wallet create --name alice
cog chain wallet create --name bob
# Mine some blocks to get rewards
cog chain mine --miner alice --count 5
# Send a transaction
cog chain tx send --from alice --to bob --amount 25 --fee 0.1
# Mine to confirm the transaction
cog chain mine --miner alice
# Deploy a smart contract
cog chain contract deploy --owner alice --id token \
--code '{"mint":{"type":"increment","key":"supply"}}'
# Check chain stats
cog chain stats
cog chain validatecog chain wallet <action>Create and manage wallets with HMAC-based keypairs, balance tracking, and transaction history.
createCreate a new wallet with keypairlistList all walletsbalanceCheck wallet balancehistoryTransaction history for walletexportExport wallet details as JSONcog chain tx <action>Create, sign, and broadcast transactions with configurable fees and optional data payloads.
sendCreate, sign, and submit a transactiongetLook up a transaction by hashlistList all confirmed transactionspendingShow mempool (pending transactions)cog chain mineProof-of-work mining with automatic difficulty adjustment and halving reward schedule.
mineMine blocks (default 1, or continuous with --auto)cog chain block <action>Inspect blocks, verify Merkle roots, and generate inclusion proofs for any transaction.
getGet block by index or hashlatestShow the latest blocklistList recent blocksmerkleShow Merkle root and transaction treemerkle-proofGenerate and verify Merkle inclusion proofcog chain contract <action>Deploy and execute smart contracts with actions: increment, transfer, vote, store, escrow.
deployDeploy a smart contractcallExecute a contract actionstateQuery contract statelistList all deployed contractsvalidateValidate entire chain integrity (hashes, proof-of-work, balances)
statsChain statistics: height, supply, difficulty, block times, mempool
top-holders[--limit N]
Top balance holders
export--format json|csv
Export entire chain to file
search[--miner M] [--limit N]
Search blocks by miner or criteria
snapshotCreate state snapshot of balances and nonces
rollback--height H
Rollback chain to a specific block height
fork-detectDetect chain forks and inconsistencies
resetReset entire chain to genesis (destructive)
infoChain info summary with key metrics
Every block contains a Merkle root computed from all transactions. Generate and verify inclusion proofs for any transaction without downloading the entire block.
# Verify a Merkle inclusion proof cog chain block merkle-proof 5 --tx-index 2 # Check chain integrity cog chain validate # Snapshot current state cog chain snapshot # View top holders cog chain top-holders --limit 5 # Export to JSON cog chain export --format json
No 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
One unified installer — COG engine plus optional Sovereign Dev Architect stacks. Requires Python 3.8+. Append flags to provision AI, Web3, security, or server environments.
COG engine only — one line
curl -fsSL https://cognis.work/install.sh | sudo bashOr 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 helpAppend stack flags to the same install.sh to provision a fully modular Ubuntu/WSL dev environment. Prefetch everything into a portable .cog bundle for air-gapped installs.
--minimal--ai--web3--sec--server--offlineOnline install (COG + pick your stacks)
# COG engine + full sovereign stack
curl -fsSL https://cognis.work/install.sh | sudo bash -s -- --ai --web3 --sec --server --gpu
# Just COG + AI development
sudo bash install.sh --ai --gpu
# Minimal baseline only
sudo bash install.sh --minimalAir-gapped install via .cog bundle
# Step 1: On a machine WITH internet — prefetch & bundle into .cog
sudo bash prefetch.sh --ai --web3 --sec --server --gpu
# → produces sovereign-cache.cog (single portable file)
# Step 2: Transfer sovereign-cache.cog + install.sh to airgapped host
# (USB drive, SCP, sneakernet, etc.)
# Step 3: On the air-gapped host — install from .cog bundle
sudo bash install.sh --offline --ai --web3 --sec --server --gpu
# → unpacks sovereign-cache.cog, installs everything offlineDownload scripts
curl -fsSL https://cognis.work/install.sh -o install.sh
curl -fsSL https://cognis.work/prefetch.sh -o prefetch.sh
chmod +x install.sh prefetch.shprefetch.sh downloads all packages, wheels, binaries, and repos then bundles everything into a single sovereign-cache.cog file using the COG format. Transfer one file, run install.sh --offline, and the installer unpacks the bundle automatically. No internet required.
COG AI is its own local inference engine. During prefetch, cog ai --seed-knowledge distills ~35 key topics (AI, Web3, security, server admin, dev patterns) into a compact brain.cog knowledge base. On the air-gapped host, COG AI auto-detects offline mode and answers queries entirely from pre-distilled knowledge — extractive recall, n-gram scoring, and summarization. No external LLM, no API keys, no internet. Stdlib-only.
Each stack creates its own isolated venv and workspace scaffolding. Use the aliases to activate: aienv for AI, secenv for Security. All services bind to localhost only. Manifest saved to /etc/sovereign-dev-manifest.
Python 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.