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

Metadata

Release files for rcf-cli 2.1.9

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

Source distribution (sdist)

Source distribution for rcf-cli 2.1.9
File Size Uploaded Provenance
rcf_cli-2.1.9.tar.gz 66.3 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for rcf-cli 2.1.9
File Interpreter ABI Platform
rcf_cli-2.1.9-py3-none-any.whl Python 3 none any Details

Total release size: 127.8 kB

Release files / rcf_cli-2.1.9.tar.gz

Download URL rcf_cli-2.1.9.tar.gz
Size 66.3 kB
Tags Source
SHA-256 checksum
How to use checksums
e47a0a03304762913c17849d001cca6bbc671510129066a0d018d1d7846b1c58
BLAKE2b-256 checksum
How to use checksums
5d4bfcef0c849d42cee2ab8fd932559d35c707683e0d830b6739ec7ba42d1fc8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / rcf_cli-2.1.9-py3-none-any.whl

Download URL rcf_cli-2.1.9-py3-none-any.whl
Size 61.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
42a436bad5f63a872c24e978ff6e5b58f8ce0ac2ba0da83d006beadc11ef4572
BLAKE2b-256 checksum
How to use checksums
b5c0e30b76b9fb8d81ffd042b87214e41a5738a245c68e83765868490c8ab159
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Security for rcf-cli 2.1.9

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

2.1.9 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