Spaces:
Sleeping
Sleeping
File size: 1,570 Bytes
80666bc 161cb23 a1415e8 80666bc 161cb23 a1415e8 80666bc a1415e8 161cb23 a1415e8 161cb23 a1415e8 161cb23 a1415e8 161cb23 a1415e8 161cb23 a1415e8 161cb23 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | ---
title: codehygiene
emoji: 🧹
colorFrom: gray
colorTo: green
sdk: docker
app_port: 7860
short_description: Find hard-to-read code in any GitHub repo
tags:
- code-quality
- readability
---
# codehygiene
Paste a GitHub link, upload a local folder, or paste a snippet to inspect structural readability issues in milliseconds.
The `23.84 KiB` ternary neural scorer (`codehygiene` `v0.6.1`) runs locally inside Web Workers in your browser — source code is never uploaded to score it. Public repositories can also be ranked on the [Leaderboard](TELEMETRY.md#leaderboard).
## Settings
| Variable | Default | What it does |
|---|---|---|
| `CODEHYGIENE_REF` | pinned commit | Build arg. Version of `codehygiene` (`engine.js`, `weights.npz`, and Python package). |
| `HF_STATS_DATASET_REPO` | unset | Optional Hugging Face Dataset repo storing aggregate `stats.json` and `leaderboard.json`. |
| `HF_TOKEN` | unset | Optional dataset-scoped write token for persisting `stats.json` and `leaderboard.json`. |
| `STATS_SYNC_SECONDS` | `300` | Seconds between dataset flushes. |
| `GITHUB_TOKEN` | unset | Optional zero-permission token raising GitHub API read limits for leaderboard ranking. |
| `LEADERBOARD_SEED` | `1` | Rank canonical seed repos in the background on startup. |
| `LEADERBOARD_SEED_PAUSE` | `20` | Seconds between background seed rankings. |
Aggregate counters and privacy rules are documented in [TELEMETRY.md](TELEMETRY.md).
## Run locally
```bash
npm --prefix web run build
LEADERBOARD_SEED=0 python -m uvicorn server.app:app --port 7860
```
|