Skip to main content

AIF-BIN Pro CLI

Professional command-line toolkit for semantic document memory.

CI Patent Pending License: MIT Python 3.9+


What is AIF-BIN Pro?

AIF-BIN Pro is a command-line tool for converting documents into searchable AI memory files. It generates real vector embeddings for semantic search — find content by meaning, not just keywords.

Key Features:

  • Semantic Search — Query your documents by meaning
  • Real Embeddings — 384/768-dimension vectors with 5 model options
  • Batch Processing — Parallel conversion of entire directories
  • Watch Mode — Auto-sync on file changes
  • AI Extraction — Use Claude, GPT-4, Gemini, or Ollama for intelligent parsing
  • Multiple Exports — JSON, CSV, Markdown, HTML

Installation

Clone the Repository

git clone https://github.com/Terronex-dev/aifbin-pro.git
cd aifbin-pro

Using the Wrapper Script

For convenience, a wrapper script is provided. Make it executable first:

chmod +x aifbin-pro

Now you can run the CLI directly:

# Verify installation
./aifbin-pro --help

The examples below will use this wrapper. If you prefer, you can still run python3 cli/aifbin_pro.py or python cli/aifbin_pro.py.

Optional: Virtual Environment (Recommended)

# Create virtual environment
python3 -m venv .venv

# Activate it
source .venv/bin/activate      # Linux/macOS/WSL
.venv\Scripts\activate         # Windows PowerShell

# Install dependencies
pip install -r requirements.txt

# Run
python cli/aifbin_pro.py --help

Quick Start

A sample.md file is included for testing.

# Convert the sample file to AIF-BIN with embeddings
./aifbin-pro migrate sample.md -o output/

# Search your memories semantically
./aifbin-pro search "project decisions" -d output/

# View file info
./aifbin-pro info output/sample.aif-bin

# Extract original content
./aifbin-pro extract output/sample.aif-bin

Commands

Command Description
migrate Convert files to AIF-BIN (v2 binary format) with embeddings
search Semantic search across your memory files
info Show file metadata, chunks, and model info
extract Recover original content from AIF-BIN
export Export to JSON, CSV, Markdown, or HTML
watch Auto-sync directory on file changes
diff Compare two AIF-BIN files
models List available embedding models
providers List AI providers for intelligent extraction
ingest Convert any file with AI extraction
config Configure AI provider API keys

Command Examples

Migrate (Convert Files)

# Single file
./aifbin-pro migrate document.md -o output/

# Entire directory
./aifbin-pro migrate notes/ -o output/

# Recursive with parallel processing
./aifbin-pro migrate notes/ -o output/ -r -p

# Use a different embedding model
./aifbin-pro migrate notes/ -o output/ -m bge-small

Search (Semantic Query)

# Basic search
./aifbin-pro search "budget decisions" -d output/

# Get more results
./aifbin-pro search "project timeline" -d output/ -k 10

# Filter by date
./aifbin-pro search "meeting notes" -d output/ --after 2026-01-01

Watch (Auto-Sync)

# Watch a directory and auto-convert changes
./aifbin-pro watch notes/ -o output/

# Custom check interval (seconds)
./aifbin-pro watch notes/ -o output/ -i 10

Export (Convert to Other Formats)

./aifbin-pro export file.aif-bin -o output.json -f json
./aifbin-pro export file.aif-bin -o output.csv -f csv
./aifbin-pro export file.aif-bin -o output.md -f markdown
./aifbin-pro export file.aif-bin -o output.html -f html

Ingest (AI-Powered Extraction)

# Configure an AI provider first
./aifbin-pro config --provider anthropic --api-key sk-ant-...

# Ingest files with AI extraction
./aifbin-pro ingest documents/ -o output/ -p anthropic

# Use local Ollama (no API key needed)
./aifbin-pro ingest documents/ -o output/ -p ollama

Embedding Models

Model Dimensions Speed Description
minilm 384 Fast Good quality (default)
mpnet 768 Slow Higher quality
bge-small 384 Fast Optimized for retrieval
bge-base 768 Slow Best quality retrieval
e5-small 384 Fast Microsoft E5

List available models:

./aifbin-pro models

AI Providers (for ingest command)

Provider API Key Required Best For
anthropic Yes Documents, analysis
openai Yes General purpose
gemini Yes Images, PDFs (vision)
ollama No (local) Privacy, offline use
none No Basic text extraction

Configure providers:

# Set API key
./aifbin-pro config --provider anthropic --api-key sk-ant-...

# Set default provider
./aifbin-pro config --default anthropic

# View current config
./aifbin-pro config

List available providers:

./aifbin-pro providers

File Format

AIF-BIN v2 is a compact binary format with:

  • MessagePack encoding (~50% smaller than JSON)
  • Fixed-offset headers for fast parsing
  • Embedded CRC64 checksums
  • Vector embeddings for semantic search
  • Original content preservation
[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 embeddings

[Footer]
  Index + Checksum

Troubleshooting

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

# Option 1: Use --break-system-packages
pip3 install -r requirements.txt --break-system-packages

# Option 2: Use a virtual environment (recommended)
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

ModuleNotFoundError: No module named 'sentence_transformers'

You may need to install the project's dependencies.

pip install -r requirements.txt

Ollama connection refused

Make sure Ollama is running:

# Start Ollama server
ollama serve

# Pull a model if needed
ollama pull llama3.1:8b

Related Projects

Project Description
AIF-BIN Lite Free CLI (format conversion only, no embeddings)

Privacy & Security

  • Local-first: All processing happens on your machine
  • No telemetry: We don't collect usage data
  • BYO API keys: Use your own AI provider credentials
  • Open format: AIF-BIN files are portable, no vendor lock-in

Legal

  • AIF-BIN™ is a trademark of Terronex.dev
  • Licensed under the MIT License (see LICENSE)
  • See NOTICE for patent and trademark information

Links


© 2026 Terronex.dev. All rights reserved.

Metadata

Release files for aifbin-pro 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aifbin-pro 1.0.0
File Size Uploaded Provenance
aifbin_pro-1.0.0.tar.gz 21.3 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for aifbin-pro 1.0.0
File Interpreter ABI Platform
aifbin_pro-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 43.5 kB

Release files / aifbin_pro-1.0.0.tar.gz

Download URL aifbin_pro-1.0.0.tar.gz
Size 21.3 kB
Tags Source
SHA-256 checksum
How to use checksums
e63ad030793e1da39949ed37c07e689e9c17a1b8d22b4c46c7520bedda203f62
BLAKE2b-256 checksum
How to use checksums
b39d8fc8dec2bf4cea02a2a74713e04b934f66a834f568ec1b029809a3855f1d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / aifbin_pro-1.0.0-py3-none-any.whl

Download URL aifbin_pro-1.0.0-py3-none-any.whl
Size 22.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
17b9b93234ff1ec936579b16c521a736e0185549e2fba2c5ad6f1c3ff8089869
BLAKE2b-256 checksum
How to use checksums
d389425cb1fd2c899cf15a17211c5f11508c6ce1dfe314374c6684d150f2760d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Security for aifbin-pro 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page