Skip to main content

RCF CLI — Python Edition 🛡️🐍

PyPI - Version Python Versions License: RCF-PL CI DOI ORCID: Aladdin Aliyev

The official Python Command Line Interface for the RCF (Restricted Correlation Framework) Protocol Active Integrity & Audit Framework.

RCF is an author-defined licensing protocol designed to protect intellectual property in the age of automated extraction and AI/ML mass replication. It creates a clear legal and technical boundary between Visibility and Usage Rights using cryptographic integrity chains.

Installation

Install via PyPI:

pip install rcf-cli

Features

  • Audit Shield Protection: Active enforcement of RCF-PL standards across your codebase.
  • Project Initialization: Instantly generate NOTICE.md and .rcfignore files to protect your project.
  • Automated Scanning: Quickly scan projects for RCF compliance and extract Audit Markers.
  • Header Validation: Ensure files have the required NOTICE: This file is protected under RCF-PL header.
  • RCF-Audit: Generate cryptographically signed compliance reports for ownership and integrity auditing.
  • Integrity Chains: Compare current file hashes and Audit Markers against an audit report to detect unauthorized modifications or tampering.

CLI Usage

1. Initialize RCF in your project

Run this in your project's root directory to generate the legal notice:

rcf-cli init --project "My awesome app" --author "Aladdin Aliyev"

2. Scan your project

# Scan the current directory
rcf-cli .

# Output scan results as JSON
rcf-cli . --format json

# Print summary only
rcf-cli . --summary

3. Generate an RCF-Audit Report

rcf-cli audit .

4. Verify Project Integrity

Compare current files with the latest audit report:

rcf-cli verify .

# Show summary only
rcf-cli verify . --summary

5. Forensic Analysis & Code Similarity

The Python SDK includes forensic utilities to analyze code uniqueness, generate watch-lists (sentinels), registry integrity canaries, and compute court-grade similarity proof reports.

Build Background Corpus

Builds a probability database of language structures (p_nat.json) using standard library and project files:

rcf-cli build-corpus --project . --out tests/corpus.json

Rank Sentinels (Watch-List)

Surfaces the highest-surprisal-mass functions in a codebase that are the most unique and worth watching:

rcf-cli sentinel . --corpus tests/corpus.json --top 5

Build Null Distribution Model

Calibrates a Monte Carlo null distribution (null_model.json) of similarity scores for independent code pairs:

rcf-cli build-null --project . --corpus tests/corpus.json --n-pairs 1000 --out tests/null_model.json

Compute Similarity Proof (Prove)

Compares two files and calculates statistical significance (Z-score, p-empirical, p-parametric, E-value):

rcf-cli prove src/core/wl.py src/core/wl.py --corpus tests/corpus.json --null tests/null_model.json --search-space 1

Register and Scan Designed Canaries

Register a functional canary to track code theft:

# Register canary
rcf-cli canary register --name "my_canary" --desc "integrity check" --source "def c(x): return x ^ 0xAB" --registry tests/rcf_canaries.json

# Scan codebase for the canary
rcf-cli canary scan . --registry tests/rcf_canaries.json

AST Adversarial Noise

Inject adversarial AST structures into protected files to break AI models trying to analyze the code:

rcf-cli noise src/

Export WAF Gateway

Exports production-ready Edge/WAF configurations to protect repositories and assets from AI scrapers and automated bots:

# Export Cloudflare Worker WAF script (cloudflare_worker.ts)
rcf-cli gateway cloudflare --out ./output_dir

# Export Nginx Lua WAF script (rcf_waf.lua) and nginx.conf snippet
rcf-cli gateway nginx --out ./output_dir

Markers Reference

RCF uses semantic markers to define protection levels. Place these inside code comments:

  • [RCF:PUBLIC] — Architecture and public concepts. Safe to discuss.
  • [RCF:PROTECTED] — Core methodology. Visible but not replicable.
  • [RCF:RESTRICTED] — Highly sensitive implementation. Minimal rights.
  • [RCF:AUDIT:HASH] — Cryptographic marker for active integrity verification.

Example header for protected files:

# NOTICE: This file is protected under RCF-PL
# [RCF:PROTECTED]
# [RCF:AUDIT:6A...F3]

Documentation

For full specification and legal framework details, visit the official site: aliyev.site/rcf

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rcf_cli-2.1.8.tar.gz (66.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rcf_cli-2.1.8-py3-none-any.whl (61.5 kB view details)

Uploaded Python 3

File details

Details for the file rcf_cli-2.1.8.tar.gz.

File metadata

  • Download URL: rcf_cli-2.1.8.tar.gz
  • Upload date:
  • Size: 66.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.6

File hashes

Hashes for rcf_cli-2.1.8.tar.gz
Algorithm Hash digest
SHA256 7498311b8e3d9ae3b2df5ce8c6d14144316bbc79e740eee6189b44038720a7e1
MD5 2f88177b121a90bae67d74b6cb824622
BLAKE2b-256 68bf95ef037f673b1d50228b77db24ee16f91ce9782c01ad8ba158e0c311397e

See more details on using hashes here.

File details

Details for the file rcf_cli-2.1.8-py3-none-any.whl.

File metadata

  • Download URL: rcf_cli-2.1.8-py3-none-any.whl
  • Upload date:
  • Size: 61.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.6

File hashes

Hashes for rcf_cli-2.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 30ef3a1649a4fa927b2c07942971bf4730d92ce53d93b0ec19ef3af2065418f3
MD5 54193d9909a2d6b31ba8dec596d7a98b
BLAKE2b-256 a887ad41b1239df695e0d4ba5916fc4bd1b28257b217ea892421863f010f3012

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

2.1.8 This release

2 files

2.1.7

2 files

2.1.6

2 files

2.1.5

2 files

2.1.4

2 files

2.1.3

2 files

2.1.2

2 files

2.1.1

2 files

2.1.0

2 files

2.0.7

2 files

2.0.6

2 files

2.0.5

2 files

2.0.4

2 files

2.0.3

2 files

2.0.1

2 files

2.0.0

2 files

1.3.0

2 files

1.2.8

2 files

1.2.7

2 files

1.2.6

2 files

1.2.5

2 files

1.2.4

2 files

1.2.3

2 files

1.2.2

2 files

1.2.1

2 files

1.2.0

2 files

1.1.2

2 files

1.1.1

2 files

1.1.0

3 files

0.1.0

2 files

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