HoodScript
A Python 3 dialect whose grammar keywords come from documented features of African American Vernacular English, with strict 1:1 mapping to Python and crash reports written in plain English.
bet greet(who, greeting="wassup"):
dip greeting + ", " + who
fam Dog:
bet __init__(self, name):
self.name = name
bet speak(self):
dip self.name + " says woof"
be i in 1..3:
holla greet("fam"), Dog("Rex").speak(), i
Every keyword is one Python keyword under a different name. bet is def.
dip is return. be is for. Nothing is added, nothing is
reinterpreted. That means:
.hsfiles can import any Python package (numpy,fastapi,json, …)- Python files can import
.hsmodules after one line:hoodscript.install() - Type checkers, linters, profilers, and debuggers all work on the output
hood2pygives you back plain Python whenever you want to leave
Every keyword is cited. Tier A grammar words (be, finna, done,
tryna) each have a Yale Grammatical Diversity Project page. Tier B lexical
words (bet, fam, holla, dip, chill, cap) each have dictionary
attestation of AAVE origin. The rest is Python's own word or plain English,
labeled as such. Sources: hoodscript/docs/linguistics.md.
Spec: GRAMMAR.md. Full table: docs/keywords.md.
Try it in the browser
khaoticdev62.github.io/hoodscript —
HoodScript on the left, the exact Python on the right, live. Runs entirely in
your browser (Pyodide); nothing is sent anywhere. Programs run inside the
sandbox, so import os is refused and a runaway loop is stopped.
Install
git clone https://github.com/khaoticdev62/hoodscript && cd hoodscript
python3 -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"
Requires Python ≥ 3.10. To try it with no install at all, prefix commands
with PYTHONPATH=src and use python3 -m hoodscript instead of hoodscript.
Run
hoodscript hello.hs # transpile + execute
hoodscript -c hello.hs # print the Python it becomes
hoodscript repl --mirror # interactive REPL (hood> prompt; chill to exit; --mirror shows the Python)
hoodscript fmt|lint <file.hs> # formatter / linter (pip install "hoodscript[tools]")
hoodscript learn [topic] # interactive tutor driving docs/curriculum.md
hoodscript # a short tour of all commands
hoodscript lsp # language server over stdio, for editors
hoodscript make-stubs f.py # emit a .pyi-style stub with empty bodies
Convert
hood2py program.hs > program.py # HoodScript → Python
py2hood program.py > program.hs # Python → HoodScript
Both are token-level rewrites: comments, spacing, and line numbers survive round-trips untouched.
Crash reports
Unhandled exceptions never show a raw Python traceback. Every error is translated into plain English — what happened, why, and what to do — with a "did you mean?" computed from what was actually in scope:
🚨 HOODSCRIPT CRASH REPORT — HS0001 UnknownNameTrip
File "boom.hs", line 4, in <module>()
main()
File "boom.hs", line 3, in main()
holla totl
^^^^
What happened: I can't find anything called 'totl'.
Why: Nothing gave 'totl' a value before line 3, or it was spelled differently when it was created.
Fix: Did you mean 'total'? If not, set it first: `totl = ...` above this line.
(run with --python-traceback to see the raw Python error)
Thirty-five catalogued diagnostics (HS0001–HS0299), each with a worked
example that the test suite executes. pip install "hoodscript[pretty]" adds
colour and a box on terminals. --python-traceback shows the raw Python when
you're debugging the compiler rather than a program.
The language in one screen
| Python | HoodScript | Python | HoodScript | |
|---|---|---|---|---|
def / return |
bet / dip |
try / except / finally |
tryna / catch / regardless |
|
class |
fam |
raise |
throw |
|
for |
be |
continue / pass |
skip / chill |
|
async / await |
finna / done |
False |
cap |
|
print / input |
holla / ask |
ValueError, KeyError, … |
BadValueTrip, MissingKeyTrip, … |
|
True |
no cap |
not |
ain't / ain't nobody |
|
while True: |
steady: |
x is not None |
it's x |
|
X: Final = v |
BIN X = v |
range(a, b + 1) |
a..b |
|
elif |
else if |
Everything else — if, else, while, import, with, match, None,
self, every builtin — is Python's own word, and every Python keyword still
works in a .hs file.
Learn
docs/onboarding.md— from zero to a running program in ten minutesdocs/curriculum.md— ten lessons, each with a runnable fileMANUAL.md— the full manualagents.md— architecture and subsystem walkthroughCLAUDE.md— the standing brief for anyone (human or agent) changing the codeSPRINT_PLAN.md— what's next ·CHANGELOG.md·CONTRIBUTING.md
Repo layout
src/hoodscript/ the package (transpiler, importer, cache, CLI, REPL, LSP, migrator)
tests/ pytest suite — includes one conformance test per keyword and one run per doc example
docs/ onboarding, curriculum, generated keyword table, archived plans
scripts/ gen_keywords.py
editors/vscode/ extension manifest
hoodscript/ Sprint 0–1 prototype: linguistic research, sourcing policy, v1.0 grammar — reference only
License
MIT — see LICENSE.
Metadata
Release files for hoodscript 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| hoodscript-1.1.0.tar.gz | 218.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| hoodscript-1.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 273.3 kB
Release files / hoodscript-1.1.0.tar.gz
| Download URL | hoodscript-1.1.0.tar.gz |
|---|---|
| Size | 218.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bfd1dbad66ee37296479dcbf7c39f40aee08382469ca554f8c6de0cfb6ba228f
|
|
BLAKE2b-256 checksum How to use checksums |
a4f37985d7e8f326dd443f32d7f33084744e1c264eff6e72ea256506de529706
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 12, 2026.
Transparency logRelease files / hoodscript-1.1.0-py3-none-any.whl
| Download URL | hoodscript-1.1.0-py3-none-any.whl |
|---|---|
| Size | 54.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9767fe54c93884c92e7583b068df27b3cb125918bcd2046badef866ce7b466cd
|
|
BLAKE2b-256 checksum How to use checksums |
efae561ba60a7f12f6c2960302435913df7275e43687751d6780607fe3ec31ca
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 12, 2026.
Transparency log