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:
| Language | Directory | Guide |
|---|---|---|
| Python | aihint/ | Requires Python 3.8+ and a few third-party packages |
| JavaScript/TypeScript | js-aihint/ | Requires Node.js 18+ and TypeScript compilation |
| PHP | php-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
| Feature | Python | JS/TS | PHP |
|---|---|---|---|
| Create hints | Yes | Yes | Yes |
| Sign (RSA-SHA256) | Yes | Yes | Yes |
| Verify signature | Yes | Yes | Yes |
| Validate (JSON Schema) | Yes | Yes | Yes |
| Key generation | Via OpenSSL | Built-in | Built-in |
| Trust scoring engine | Yes (async) | Yes (async) | Yes (sync) |
| CLI | aihint | node js-aihint/dist/cli.js | php bin/aihint |
| Scoring CLI | aihint scoring | aihint-scoring | php bin/aihint-scoring |
Important Notes
These are reference implementations used directly from the cloned repository. There are no published packages — you work with the source files directly.
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.