Skip to main content

Reference Implementations

The AiHint repository includes reference implementations in Python, JavaScript/TypeScript, and PHP. These are designed to be used directly from the cloned repository — they are not published to package registries (PyPI, npm, Packagist).

How to Use

All three implementations live in the same repository and are used directly from source:

git clone https://github.com/Ai-Hint/aihint-standard.git
cd aihint-standard

Then follow the setup instructions for your language of choice:

LanguageDirectoryGuide
Pythonaihint/Requires Python 3.8+ and a few third-party packages
JavaScript/TypeScriptjs-aihint/Requires Node.js 18+ and TypeScript compilation
PHPphp-aihint/Requires PHP 8.1+ with ext-openssl — no external dependencies

What's Included

Each implementation provides:

  • Core API — Create, sign, validate, and verify AiHint documents programmatically
  • CLI — Command-line tools for all operations
  • Trust Scoring — An async/HTTP-based engine that evaluates website trust signals (SSL, headers, domain reputation, compliance, etc.)

Feature Comparison

FeaturePythonJS/TSPHP
Create hintsYesYesYes
Sign (RSA-SHA256)YesYesYes
Verify signatureYesYesYes
Validate (JSON Schema)YesYesYes
Key generationVia OpenSSLBuilt-inBuilt-in
Trust scoring engineYes (async)Yes (async)Yes (sync)
CLIaihintnode js-aihint/dist/cli.jsphp bin/aihint
Scoring CLIaihint scoringaihint-scoringphp bin/aihint-scoring

Important Notes

Use from source

These are reference implementations used directly from the cloned repository. There are no published packages — you work with the source files directly.

Trust scoring limitations

The trust scoring engines in all three languages perform real network checks for SSL/TLS and HTTP security headers. Some other scorers (domain reputation, incidents, compliance) use heuristic or placeholder logic and may not produce production-quality results.