Ghost Protocol
raw JSON → 1.3.1 verified Sat May 09 auth: no python
Ghost Protocol is an automated repository guardian that detects and blocks spam, junk, and low-quality contributions. Version 1.3.1 requires Python >=3.8. It auto-ignores irrelevant files and protects repos from unwanted activity, with a focus on developer sanity. Release cadence is irregular.
pip install ghost-protocol Common errors
error ModuleNotFoundError: No module named 'ghost_protocol' ↓
cause The package is installed with a hyphen (ghost-protocol), but the import uses an underscore (ghost_protocol). This is correct; the package provides the module name with underscores.
fix
Use 'pip install ghost-protocol' and then 'from ghost_protocol import GhostProtocol'.
error AttributeError: module 'ghost_protocol' has no attribute 'GhostProtocol' ↓
cause Trying to import GhostProtocol directly from the module, but the module may be a namespace package or the class is in a submodule.
fix
Ensure you have the correct version and use 'from ghost_protocol import GhostProtocol'.
Warnings
gotcha The package 'ghost-protocol' is installed as a dash, but imported as an underscore (ghost_protocol). Many users incorrectly try to import as 'ghost-protocol'. ↓
fix Use 'from ghost_protocol import GhostProtocol'.
breaking Version 1.3.0 changed the scan_repo method signature from requiring a 'repo_url' parameter to requiring 'repository' (or 'repo_url' as alias, but 'repository' is preferred). Old code using 'repo_url' may still work but is deprecated. ↓
fix Update call to gp.scan_repo(repository='your/repo') or use the alias.
Imports
- GhostProtocol wrong
import GhostProtocolcorrectfrom ghost_protocol import GhostProtocol
Quickstart
from ghost_protocol import GhostProtocol
import os
# Initialize with optional API key
api_key = os.environ.get('GHOST_API_KEY', '')
gp = GhostProtocol(api_key=api_key)
# Scan a repository for junk
report = gp.scan_repo('https://github.com/Adrena1ine-ai/Ghost-Protocol')
print(report)