Skip to main content

One-command setup for chub_guard - the AI SDK deprecation linter

Project description

🛡️ chub-guard-init (v1.2)

The Universal Deprecation Guard for modern engineering teams.

PyPI version License: MIT

📖 The Problem

Modern development moves fast. AI coding assistants often suggest deprecated APIs, and browser automation tools (Selenium, Playwright) change their signatures frequently. Standard linters miss these semantic deprecations, leading to production bugs and technical debt.

🚀 The Solution

chub-guard-init is the official one-command setup for chub-guard. It installs a specialized git-hook that blocks deprecated patterns—from AI SDKs and Automation to Legacy Python—before they ever reach your codebase by syncing with live documentation.


🛠 Prerequisites

Ensure your environment is ready:

  • Python: 3.8+
  • Node.js: >= 18.x (Required for the chub engine)
  • Git: Project must be a git repository

🏎️ Usage

Option 1: pipx (Recommended)

Run this command once at the root of any project:

pipx run chub-guard-init

Option 2: Standard pip

pip install chub-guard-init
chub-guard-init

Run on demand (Universal Scan)

Run a full project scan at any time to generate a detailed report:

chub-guard-init run-all

This generates a chub_guard_report.md with recommended fixes, trend lines, and Agent-ready prompts.


🧠 What does it guard?

  • 🤖 AI SDKs: Catches breaking changes in OpenAI, Gemini, Anthropic, Langchain.
  • 🌐 Browser Automation: Detects deprecated Selenium (find_element_by_id) and Playwright patterns.
  • 🐍 Legacy Code: Identifies Python 2 syntax and legacy urllib2/xrange.
  • 🏗️ Framework Smells: Detects architectural misconfigurations (e.g. React/Angular mixing).
  • ✨ Dynamic Docs: Automatically flags any pattern marked as "deprecated" in official documentation fetched via Context-Hub.

🏁 After Setup

Every time you git commit, the guard will scan your changed files. If it finds a deprecated pattern, it will block the commit and provide a rich terminal guide extracted directly from official docs.


⚙️ Configuration

Suppressing False Positives

Append # noqa: CHUB to any line:

import google.generativeai as genai  # noqa: CHUB

Syncing with the Ecosystem

Keep your project in sync with the latest ecosystem rules:

python scripts/chub_guard.py update-registry

🤝 Credits

Part of the chub-guard ecosystem, powered by Andrew Ng’s context-hub.

Full Documentation: github.com/rhealaloo45/chub-guard


📄 License

MIT © Rhea Laloo

Project details


Download files

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

Source Distribution

chub_guard_init-1.2.0.tar.gz (23.7 kB view details)

Uploaded Source

Built Distribution

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

chub_guard_init-1.2.0-py3-none-any.whl (25.8 kB view details)

Uploaded Python 3

File details

Details for the file chub_guard_init-1.2.0.tar.gz.

File metadata

  • Download URL: chub_guard_init-1.2.0.tar.gz
  • Upload date:
  • Size: 23.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for chub_guard_init-1.2.0.tar.gz
Algorithm Hash digest
SHA256 c5a59b3368837dde295ceb0b2c65cdbfdbad963c04d5dd68ca2e37c2bc552a52
MD5 33a23e998a7e089e94a35d805efb3d7d
BLAKE2b-256 03ca803ab5aee4ffec4841b32cc75553dfd34aa0d8b55c74cdc23b5114f12f8c

See more details on using hashes here.

File details

Details for the file chub_guard_init-1.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for chub_guard_init-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1313f6e59785bc455ac25b189f66350afaf8082f990967980040758e601ae87f
MD5 0fa4a7edff5c34b33a9d814c334e2d92
BLAKE2b-256 c69e5ebe5e9e81a00d79db474843a46d7ced6d5f7956cc49483016694974cb8d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page