Catalog PyPI
PACKAGE EXPLORERView in registry

aifbin-lite

PyPI

Free & open source CLI for AIF-BIN files. Convert documents to semantic memory format.

aiaif-binclidocument-processingmemorysemantic-search
Versions collected1
Direct dependencies1From release 1.0.0
Last observed21 Oct, 10:40 UTC

README

Version 1.0.0 documentation

AIF-BIN Lite

Free & Open Source CLI for AI memory files. CI

Patent Pending

VersionExtensionFull NameFormat
v1.aimfAI Memory FormatJSON
v2.aif-binAI Formatted - BinaryBinary (MessagePack)

License: MIT Python 3.8+


Documentation

What is AIF-BIN?

A file format specification with two versions:

  • AIMF (.aimf) - AI Memory Format, v1 JSON encoding for simplicity
  • AIF-BIN (.aif-bin) - AI Formatted - Binary, v2 binary encoding for performance

A single .aimf or .aif-bin file contains:

  • Original document — The source file preserved
  • Extracted content — Text parsed into searchable chunks
  • Metadata — Title, timestamps, checksums

This is the free, open source implementation. For semantic search, batch processing, see AIF-BIN Pro.


Format Versions

This repository contains both format versions:

VersionExtensionFileFull NameFormat
v1.aimfaifbin_v1.pyAI Memory FormatJSON
v2.aif-binaifbin_v2.pyAI Formatted - BinaryBinary (MessagePack)

AIMF - AI Memory Format (v1)

Simple, human-readable JSON. Uses .aimf extension. Great for learning and debugging.

{
  "version": "1.0.0-lite",
  "format": "json",
  "metadata": {
    "source_file": "sample.md",
    "created_at": "2026-01-30T10:00:00"
  },
  "chunks": [
    {"id": 0, "content": "...", "type": "text"}
  ],
  "original_raw": "# Original content..."
}

AIF-BIN - AI Formatted - Binary (v2)

Compact binary format with MessagePack encoding. Uses .aif-bin extension. Used by AIF-BIN Pro.

[Header: 64 bytes]
  Magic: "AIFBIN\x00\x01"
  Version, Offsets, Size

[Metadata Section]
  MessagePack blob

[Original Raw Section]
  Preserved source file

[Content Chunks]
  Typed chunks with optional embeddings

[Footer]
  Index + CRC64 Checksum

Installation

# Clone the repo
git clone https://github.com/Terronex-dev/aifbin-lite.git
cd aifbin-lite

Windows (PowerShell/CMD)

# Install dependencies
pip install -r requirements.txt

# v1 - No external dependencies needed, but included in requirements for simplicity
python aifbin_v1.py --help

# v2
python aifbin_v2.py --help

Linux / macOS / WSL

# Install dependencies
pip3 install -r requirements.txt

# v1 - No external dependencies needed, but included in requirements for simplicity
python3 aifbin_v1.py --help

# v2
python3 aifbin_v2.py --help

Usage

AIMF Commands (aifbin_v1.py)

Windows:

python aifbin_v1.py migrate sample.md      # Convert to AIMF (JSON)
python aifbin_v1.py info sample.aimf       # View file info
python aifbin_v1.py chunks sample.aimf     # List chunks
python aifbin_v1.py extract sample.aimf    # Extract original content

Linux / macOS / WSL:

python3 aifbin_v1.py migrate sample.md      # Convert to AIMF (JSON)
python3 aifbin_v1.py info sample.aimf       # View file info
python3 aifbin_v1.py chunks sample.aimf     # List chunks
python3 aifbin_v1.py extract sample.aimf    # Extract original content

AIF-BIN Commands (aifbin_v2.py)

Windows:

python aifbin_v2.py migrate sample.md              # Convert to AIF-BIN (binary)
python aifbin_v2.py info sample.aif-bin            # View file info
python aifbin_v2.py chunks sample.aif-bin          # List chunks
python aifbin_v2.py extract sample.aif-bin         # Extract original content
python aifbin_v2.py upgrade sample.aimf            # Upgrade v1 to v2

Linux / macOS / WSL:

python3 aifbin_v2.py migrate sample.md              # Convert to AIF-BIN (binary)
python3 aifbin_v2.py info sample.aif-bin            # View file info
python3 aifbin_v2.py chunks sample.aif-bin          # List chunks
python3 aifbin_v2.py extract sample.aif-bin         # Extract original content
python3 aifbin_v2.py upgrade sample.aimf            # Upgrade v1 to v2

Troubleshooting

error: externally-managed-environment (Debian/Ubuntu/WSL)

This error occurs when pip tries to install packages system-wide in environments where Python packages are managed by the OS.

Solution 1: Use the --break-system-packages flag:

pip3 install -r requirements.txt --break-system-packages

Solution 2 (Recommended): Use a Python virtual environment:

python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
python3 aifbin_v2.py --help
# Deactivate when done:
deactivate

python3 not found on Windows

On Windows, use python instead of python3:

python aifbin_v1.py --help

Migrating from AIMF to AIF-BIN

Why Migrate?

  • 50% smaller files — Binary format is more compact
  • Faster parsing — Fixed-offset headers enable direct seeks
  • Checksums — CRC64 verification for data integrity
  • Embeddings — AIF-BIN supports vector embeddings for semantic search
  • Typed chunks — TEXT, TABLE, IMAGE, AUDIO, VIDEO, CODE

How to Migrate

Option 1: Using the CLI (Recommended)

# Windows
python aifbin_v2.py upgrade sample.aimf -o sample.aif-bin

# Linux / macOS / WSL
python3 aifbin_v2.py upgrade sample.aimf -o sample.aif-bin

Option 2: Programmatically

from aifbin_v2 import migrate_from_v1

migrate_from_v1('sample.aimf', 'sample.aif-bin')

See examples/migrate_v1_to_v2.py for a complete migration script.


Examples

FileDescription
examples/quickstart_v1.pyBasic v1 usage
examples/quickstart_v2.pyBasic v2 usage
examples/migrate_v1_to_v2.pyMigration script

ProjectDescription
AIF-BIN LiteFree CLI (this repo)
AIF-BIN ProPro CLI + Inspector

Lite vs Pro

AIF-BIN Lite (this repo) handles the format — converting your documents into portable, structured files.

AIF-BIN Pro adds the intelligence — AI-powered semantic search that lets you query your documents by meaning, not just keywords.

┌─────────────────────────────────────────────────────────────┐
│                        Your Documents                        │
│                    (Markdown, notes, docs)                   │
└─────────────────────────────────────────────────────────────┘
                              │
                              ▼
┌─────────────────────────────────────────────────────────────┐
│                      AIF-BIN Lite (Free)                     │
│                                                              │
│   ✓ Convert to .aimf (JSON) or .aif-bin (binary)            │
│   ✓ Chunking and metadata extraction                         │
│   ✓ Portable files you own                                   │
│   ✗ No search — just format conversion                       │
└─────────────────────────────────────────────────────────────┘
                              │
                              ▼
┌─────────────────────────────────────────────────────────────┐
│                      AIF-BIN Pro (Paid)                      │
│                                                              │
│   ✓ Everything in Lite, plus:                                │
│   ✓ AI embeddings (text → vectors)                           │
│   ✓ Semantic search ("What did I decide about X?")           │
│   ✓ Plugins (LangChain, Obsidian, VS Code, etc.)             │
└─────────────────────────────────────────────────────────────┘

Why This Architecture?

  • Your data stays portable. Lite files work anywhere, with or without Pro.
  • No vendor lock-in. The format spec is open (MIT). Build your own tools if you want.
  • Pay for intelligence, not storage. Lite is free forever. Pro adds the AI layer.

Ready to Upgrade?

AIF-BIN Pro includes:

  • Semantic search — Find by meaning, not keywords
  • Batch processing — Convert entire directories
  • Watch mode — Auto-sync on file changes
  • Web Inspector — Visual file analyzer
  • 5 embedding models — OpenAI, Cohere, local options

DocumentDescription
LICENSEMIT License — free to use, modify, distribute
NOTICEPatent, trademark, and Lite vs Pro details
TERMSTerms of use
PRIVACYPrivacy policy (TL;DR: no data collection)
SECURITYSecurity policy and vulnerability reporting

Patent Pending: The AIF-BIN format and methods are subject to a pending patent application. This open-source implementation is provided under the MIT License.

Trademark: "AIF-BIN" is a trademark of Terronex.dev. You may use it to describe format compatibility.



Contributing

Contributions welcome! See CONTRIBUTING.md.


(c) 2026 Terronex.dev. All rights reserved.

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
1.0.013 Feb 20261

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
terronex-dev/aifbin-lite

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 21 Oct, 10:40 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:b69dc5ea123a67d95a9c6fb8b15f70c60dad5edd4ed1cdf64c6794882973ff48