Ethos — a language that speaks for itself.
Ethos transpiles English-like syntax to Python. Every statement ends with a
period. No brackets, no semicolons — just sentences. Built solo by Aman, a Class 9 student
from India. The compiler, Forge, Foundry, every official template, and the three sample traits
(greetc, greetcpp, greetr) are all part of the same project.
Quick example
This is real Ethos — paste it into the Playground tab to run it in your browser via Pyodide.
ask "What's your name? " into name. set greeting to "Hello, ". say greeting. say name. set score to 95. if score is above 90. say "That's an A.". otherwise if score is at least 75. say "That's a B.". otherwise. say "Keep going.". end.
Why Ethos
English syntax
if, while, repeat, count loops all read like sentences. set age to 25. not age = 25;.
Type casting
Cast with phrases — set age to "25" to number., to text, to list, to decimal, and more.
String slicing
set piece to text from 0 to 5. transpiles directly to Python slice syntax text[0:5].
Functions
Define with how to greet with name. … call with run greet with "Aman".
Imports
bring in math. then run math.sqrt with 16. — the entire Python ecosystem is reachable.
Hard Traits
Load compiled C, C++, or Rust binaries via ctypes for native-speed extensions.
Soft Traits
Install any Python package from PyPI into ~/.ethos/traits/ using Forge.
Foundry registry
A curated registry of Hard Traits — every trait ships binaries for all 8 platforms.
Forge
The official package manager — installs Soft Traits from PyPI and Hard Traits from URLs or Foundry.
The Ethos ecosystem
Ethos is not one repo — it's a small family of repositories, all maintained under AmanCode22. Each one has a clear role: the compiler, the package manager, the trait registry, the three official templates, and the three verified sample traits. They're designed to compose cleanly.
| Repository | Role | Language | Status |
|---|---|---|---|
AmanCode22/ethos-lang | The Ethos compiler — lexer, parser (transpiler to Python), runtime, and Hard Trait loader. | Python (Nuitka-compiled) | paused |
AmanCode22/forge | Package manager for Ethos. Installs Soft Traits (PyPI) and Hard Traits (binaries). | Python | paused |
AmanCode22/ethos-foundry | Registry of Hard Traits. Hosted on Cloudflare Pages. Every PR must support all 8 platforms. | JSON registry | paused |
ethos-trait-c-template | Official template for writing Hard Traits in C. CI auto-builds all 8 platforms. | C + CMake | template |
ethos-trait-cpp-template | Official template for writing Hard Traits in C++. | C++ + CMake | template |
ethos-trait-rust-template | Official template for writing Hard Traits in Rust. | Rust | template |
ethos-trait-greetc | Sample trait written in C for greet. Verified. | C | verified |
ethos-trait-greetcpp | Sample trait written in C++ for greet. Verified. | C++ | verified |
ethos-trait-greetr | Sample trait written in Rust for greet. Verified. | Rust | verified |
How it works
Ethos is a transpiler: it parses English-like source code and emits Python, which is then executed. The pipeline is intentionally simple and inspectable — you can see exactly what Python your Ethos code becomes using the python. … pythonend. block, and you can trace tokens with debug. … debugend..
Project structure (from the real repo)
ethos-lang/
├── main.py
├── requirements.txt
└── src/ethos/
├── cli.py # REPL + file runner
├── lexer.py # Sentence splitter + tokenizer
├── parser.py # Transpiler (Ethos → Python)
├── executer.py # Runtime + Hard Trait loader
├── stdlib_shim.py # Forces stdlib into Nuitka binary
└── version.py # Version string
What's next
Planned — pending testers
- Rust rewrite of the transpiler for performance and memory safety. Currently paused.
- Termux prebuilt binaries once the Rust rewrite lands. Until then, Termux runs the Python source as a zipapp.
Not planned right now: LSP, VSCode extensions, GUI IDE.
Install Ethos
Ethos ships as a Nuitka-compiled binary on Windows, macOS, and Linux. Forge (the package manager) is bundled in the same installer. On Android you can install via Termux. Every binary on the releases page is built and signed by the maintainer.
One installer, two tools — by design
I deliberately ship Ethos and Forge together in one installer on Windows and macOS. The recommended path is the combined installer from the ethos-lang releases page. It sets up both ethos and forge in one shot and adds them to your PATH. On Linux, installing ethos-forge via your package manager pulls in ethos-lang automatically.
Quick install by platform
Windows
Combined installer for Ethos + Forge.
macOS
Combined .pkg installer for Ethos + Forge.
Linux
OBS repo, AUR, or universal tarball.
Termux
Add the Ethos repo and install via pkg.
Windows & macOS
- Go to the ethos-lang releases page.
- Download the installer for your OS —
.exeon Windows,.pkgon macOS. The installer includes both Ethos and Forge. - Run it. Both
ethosandforgeare added to yourPATH. - Open a terminal and verify:
ethos --version forge --version
There is also a standalone Forge .exe on the Forge releases page if you only want the package manager.
Linux — full instructions
Three install paths are available on Linux. All of them install the same Nuitka-compiled binary — no Python required at runtime.
Option 1 — OBS Repository recommended
Automatic updates via your package manager. Add the repo and install from software.opensuse.org. Packages are published for these distros:
| Distribution | Architectures |
|---|---|
| openSUSE Leap 15.6 | x86_64 |
| Arch Linux | x86_64 |
| Debian 12 / 13 / Unstable | i586, x86_64 |
| Fedora 42 / 43 / Rawhide | aarch64, x86_64 |
| openEuler 24.03 | aarch64, x86_64 |
| openSUSE Factory / Tumbleweed / Slowroll | aarch64, armv7l, i586, x86_64 |
| Ubuntu 24.04 / 25.04 / 25.10 / 26.04 | x86_64 |
The ethos-lang package recommends ethos-forge (the package manager) as an optional dependency.
Option 2 — AUR (Arch Linux)
# Using yay yay -S ethos-lang # Using paru paru -S ethos-lang # Manual AUR build git clone https://aur.archlinux.org/ethos-lang.git cd ethos-lang makepkg -si
ethos-forge is available as optdepends.
Option 3 — Universal Tarball any distro
Works on any distro. Includes both ethos and forge. Download ethos-build.tar.gz from the releases page, then:
# Extract tar -xzf ethos-build.tar.gz cd ethos-build # Make the installer executable chmod +x install.sh # Install system-wide (needs sudo): sudo ./install.sh # → installs to /usr/local/bin/ # OR install user-only (no sudo): ./install.sh # → installs to ~/bin/ and updates your .bashrc
Dependency note
Installing ethos-forge via any Linux package manager will pull in ethos-lang automatically as a hard dependency. You don't need to install Ethos first.
Android — Termux
Nuitka builds on Termux are not supported due to linker restrictions, so on Termux Ethos runs as a wrapper around the Python source code compressed as a zipapp. Prebuilt Termux binaries will ship after the Rust rewrite. Until then, .deb files and pkg integration are available from v0.5.0 beta onwards.
Option A — download a .deb manually
# After downloading the .deb file with wget or curl:
pkg update && pkg upgrade
pkg install python
pkg install ./path-to-the-deb-file.deb
Option B — add the Ethos Termux repo (recommended)
# 1. Add the repo to your sources list mkdir -p $PREFIX/etc/apt/sources.list.d/ echo "deb [trusted=yes] https://amancode22.github.io/ethos-termux-repo/repo termux extras" \ >> $PREFIX/etc/apt/sources.list.d/ethos-repo.list # 2. Update and install pkg update pkg install ethos-lang ethos-forge
What's in a release
Every release I publish on the ethos-lang releases page contains a full set of platform binaries. Each asset ships with a SHA256 checksum so you can verify integrity. The v0.5.0-beta release, for example, contains 11 assets:
| Asset | Platform | Purpose |
|---|---|---|
ethos-installer-linux-x86_64.tar.gz | Linux x86_64 | Universal tarball with install.sh |
ethos-linux-x86_64 | Linux x86_64 | Standalone single binary |
Ethos-macOS-arm64.pkg | macOS Apple Silicon | Combined Ethos + Forge installer |
Ethos-macOS-x86_64.pkg | macOS Intel | Combined Ethos + Forge installer |
ethos-macos-arm64 | macOS Apple Silicon | Standalone single binary |
ethos-macos-intel-x86_64 | macOS Intel | Standalone single binary |
Ethos-windows-installer-x86_64.exe | Windows x86_64 | Combined Ethos + Forge installer |
Ethos-windows-installer-arm64.exe | Windows arm64 | Combined Ethos + Forge installer |
ethos-lang_termux_0.5.0-beta_all.deb | Android / Termux | Termux .deb (zipapp wrapper) |
Source code (zip) | Any | Source for building from scratch |
Source code (tar.gz) | Any | Source for building from scratch |
Why standalone builds on Windows
From v0.4-beta onwards the Windows build switched from Nuitka onefile to standalone mode. Onefile builds were triggering Windows Defender's trojan-horse heuristics — the standalone build avoids that false positive and is what ships now.
Build from source
Requires Python 3.10+. The Forge repo has no dependencies beyond the standard library.
# Clone and run Forge directly git clone https://github.com/AmanCode22/forge.git cd forge python main.py --help # Clone and build Ethos git clone https://github.com/AmanCode22/ethos-lang.git cd ethos-lang # See BUILDING.md for full build instructions (Nuitka compilation)
Verify your install
$ ethos --version $ forge --version $ ethos # Drops into the Ethos REPL > say "Hello, Ethos!". Hello, Ethos!
Next steps
- Read the Language Reference for every statement and operator.
- Try the in-browser Playground — no install needed.
- See what changed in each version on the Changelog page.
- Install your first trait:
forge pymodule get requests.
Language Reference
Complete syntax reference, mirroring the official DOCS.md. Every statement ends with a period. Keywords are case-insensitive.
Syntax rules
- Every statement ends with a period (
.). - Keywords are case-insensitive —
SET,Say,setall work. - Strings use
"double"or'single'quotes. - Indentation is ignored — the parser tracks blocks via keywords.
- Blank lines are ignored.
- Trailing periods on block keywords (
end.,otherwise.) are optional.
Lexer internals
Pass 1 — Sentence splitting
Text is split at . characters, except:
- Inside quoted strings
- Decimal numbers (
3.14) - Dot notation (
math.sqrt)
Pass 2 — Tokenization
Each sentence is split via shlex.split(). Quoted strings stay intact. Non-quoted tokens are lowercased. The trailing period is stripped.
Multi-word phrase merging
Before parsing, these phrases are merged into single tokens (longest first):
is not is above is below is at least is at most divided by to the power of bring in how to otherwise if run function delete variable to number to decimal to text to boolean to list to tuple to set to dictionary to bytes to complex
Statements
say — Print ¶
say . say "Hello.". say score. say 42.
Transpiles to print( ).
set — Assignment ¶
set <name> to <expr>. set x to 10. set name to "Aman". set total to x times 3 plus 1.
String slicing:
set <name> to <source> from <start> to <end>. set piece to name from 0 to 5. # → piece = name[0:5]
Function return value:
set response to run requests.get with "https://api.github.com". set random_num to run random.randint with 1, 10.
add / subtract — In-place arithmetic ¶
add <n> to <var>. subtract <n> from <var>. add 1 to counter. # → counter += 1 subtract 5 from health. # → health -= 5
delete variable ¶
delete variable <name>.
ask — Input ¶
ask " " into <name>. ask "Your name: " into username.
Exactly 4 tokens required. into is mandatory. Returns a string — use type casting for numbers.
if / otherwise if / otherwise / end — Conditionals ¶
if <cond>. ... otherwise if <cond>. ... otherwise. ... end.
Conditions support and, or, not:
if age is at least 18 and verified is 1. say "Access granted.". end.
repeat — Count loop ¶
repeat <n>. ... end.
Anonymous loop variable (_). Transpiles to for _ in range(n):.
count — Ranged loop ¶
count from <start> to <end> variable <i>. ... end. count from 1 to 5 variable i. say i. end.
With step:
count from 10 to 0 variable i stepping -2. say i. end.
The parser adjusts the range end by +1 (forward) or -1 (backward).
while — Condition loop ¶
while lives is above 0. subtract 1 from lives. end.
how to / run — Functions ¶
# Define how to <name>. ... end. how to <name> with <a>, <b>. ... end. # Call run <name>. run <name> with <a>, <b>. run function <name> with <a>.
run and run function are identical. Dot notation works:
bring in requests. run requests.get with "https://api.github.com".
bring in — Import ¶
bring in math. set pi to math.pi. set result to run function math.sqrt with 16.
note / notes — Comments ¶
note single line comment. notes. block comment spanning lines. endnotes.
python / pythonend — Inspect generated code ¶
python. set x to 5 plus 3. pythonend.
Output: PY_GEN: x = 5 + 3
debug / debugend — Token trace ¶
debug. set x to 10. debugend.
Output: DEBUG: set x to 10
Operators
Arithmetic
| Ethos | Python |
|---|---|
plus | + |
minus | - |
times | * |
divided by | / |
to the power of | ** |
Comparison
| Ethos | Python |
|---|---|
is | == |
is not | != |
is above | > |
is below | < |
is at least | >= |
is at most | <= |
Type casting
| Ethos phrase | Python |
|---|---|
to number | int() |
to decimal | float() |
to text | str() |
to boolean | bool() |
to list | list() |
to tuple | tuple() |
to set | set() |
to dictionary | dict() |
to bytes | bytes() |
to complex | complex() |
set age to "25" to number. # → age = int("25") set pi to "3.14" to decimal. # → pi = float("3.14")
Errors
Ethos surfaces Python tracebacks directly, prefixed with context from the source sentence. If a Hard Trait fails to load, the runtime reports which trait and which function was missing.
Traits
Traits are how Ethos extends itself. There are two kinds: Soft Traits (Python packages) and Hard Traits (compiled native binaries). Both are installed and managed by Forge.
Soft Trait
A Python package installed from PyPI or a local file. Used in Ethos with bring in. Lives in ~/.ethos/traits/.
Hard Trait
A compiled shared library (C, C++, Rust — anything with a C ABI) packaged as a zip with a manifest.json. Loads via ctypes.
Soft Traits — Python packages
Soft Traits are simply Python packages. Forge queries the PyPI JSON API, picks the best wheel for your platform (platform-specific first, then pure-Python any, then sdist fallback), downloads it, and extracts it into ~/.ethos/traits/. Forge never runs install scripts — it only extracts the archive.
For a package to be importable, its top-level module folder must land directly inside ~/.ethos/traits/ after extraction.
# Install from PyPI $ forge pymodule get requests # Then in Ethos bring in requests. set response to run requests.get with "https://api.github.com". say response.
Hard Traits — Native binaries
A Hard Trait is a compiled shared library (a .so on Linux/Termux, .dylib on macOS, .dll on Windows) plus a manifest.json describing its functions. Ethos loads it via ctypes at startup.
Hard Trait folder layout
~/.ethos/traits/hard_traits/<name>/<version>/ ├── manifest.json └── (compiled binary here)
manifest.json ¶
The manifest declares the trait's name, version, author, license, all 8 platform binaries, checksums, and the functions Ethos can call. Every Hard Trait submitted to Foundry must include all 8 platforms.
Required fields
name— must match your folder name exactly.version— semver like1.0.0or0.5.0-beta.description— one line about what it does.author— your name or handle.repository— link to your trait's source repo.license— MIT, Apache-2.0, etc. (no proprietary licenses accepted on Foundry).platforms— object with all 8 platform entries, each withurlandchecksum.functions— list of functions Ethos can call, each withreturnandargs.
Optional fields
tags— keywords like["math", "crypto"]for search.verified— leavefalse; Aman sets it totrueafter review.
Example manifest.json
{
"name": "mymath",
"version": "1.0.0",
"description": "Fast integer math",
"author": "Aman",
"repository": "https://github.com/AmanCode22/ethos-trait-mymath",
"license": "MIT",
"tags": ["math"],
"verified": false,
"platforms": {
"linux-x86_64": { "url": "...", "checksum": "sha256: ..." },
"linux-aarch64": { "url": "...", "checksum": "sha256: ..." },
"macos-arm64": { "url": "...", "checksum": "sha256: ..." },
"macos-x86_64": { "url": "...", "checksum": "sha256: ..." },
"windows": { "url": "...", "checksum": "sha256: ..." },
"windows-arm64": { "url": "...", "checksum": "sha256: ..." },
"termux-aarch64": { "url": "...", "checksum": "sha256: ..." },
"termux-armv7": { "url": "...", "checksum": "sha256: ..." }
},
"functions": {
"add_ints": { "return": "int", "args": ["int", "int"] },
"get_message": { "return": "char *", "args": [] }
}
}
Supported C types
| Category | Manifest strings |
|---|---|
| Characters | char, unsigned char, wchar_t |
| Integers | short, unsigned short, int, unsigned int, long, unsigned long, long long, unsigned long long |
| Fixed-width ints | int8_t, uint8_t, int16_t, uint16_t |
| Floating point | float, double, long double |
| Strings / pointers | char *, wchar_t *, void *, pointer_to_int |
| Sizes | size_t, ssize_t |
| Other | bool, void |
Using a Hard Trait in Ethos
Here's the real end-to-end flow, using greetr — my verified Rust sample trait — as the example:
# Install a trait from Foundry $ forge foundry get greetr # Then in Ethos bring in greetr. set result to run greetr.greet with "Aman". say result.
Writing your own Hard Trait
Start from one of the official templates — they include CI workflows that automatically build binaries for all 8 platforms when you tag a release.
C template
CMake-based. Starter src/trait.c. Best for simplest FFI.
C++ template
CMake-based. Starter src/trait.cpp. Use extern "C" for exports.
Rust template
Cargo-based. Use #[no_mangle] extern "C" for exports.
Verified sample traits
Three sample Hard Traits — one per language — show how a real trait looks end-to-end. All three are on Foundry and verified. Each is a "greet" trait — the simplest possible native function that returns a greeting string.
greetc verified
Sample trait written in C for greet. The simplest reference implementation.
greetcpp verified
Sample trait written in C++ for greet. Shows extern "C" exports.
greetr verified
Sample trait written in Rust for greet. Shows #[no_mangle] extern "C".
Want a template for another language?
If you want to contribute an API for a language other than C / C++ / Rust (e.g. Go, Zig, Java), open an issue first on ethos-foundry with a link to your template repo. Once reviewed and accepted, it will be linked from the Foundry README — do not open a PR with a new language binding without an issue first.
Forge
The package manager for Ethos. Install Traits. Manage dependencies. Stay out of your way. Forge installs Soft Traits (Python packages from PyPI or local files) and Hard Traits (compiled native binaries) into your Ethos environment.
One installer, both tools
On Windows and macOS, the combined installer from ethos-lang releases sets up both Ethos and Forge in one shot. On Linux, installing ethos-forge pulls ethos-lang as a hard dependency.
Version & help
$ forge --version $ forge -v $ forge --help
Soft Traits — Python packages
Install from PyPI
$ forge pymodule get requests
Forge queries the PyPI JSON API, picks the best wheel for your platform (platform-specific first, then pure-Python any, then sdist fallback), downloads it, and extracts it into ~/.ethos/traits/.
Install from a remote wheel URL
$ forge pymodule wheel get <url>
Install from a local .whl file
$ forge pymodule wheel local <path>
Install from a remote sdist tarball
$ forge pymodule sdist get <url>
Install from a local .tar.gz sdist
$ forge pymodule sdist local <path>
How Soft Trait installation works
Forge never runs install scripts — it only extracts the archive. Platform detection works by reading sysconfig.get_platform() and matching against wheel filenames. For a package to be importable, its top-level module folder must land directly inside ~/.ethos/traits/ after extraction.
Hard Traits — native binaries
Install from a URL
$ forge get <url>
Forge downloads the zip, finds manifest.json at any depth, validates name and binary, and moves the trait folder into ~/.ethos/traits/hard_traits/<name>/<version>/.
Install from a local zip
$ forge local <path-to-zip>
Foundry support
Foundry is the curated registry of Hard Traits. Forge can search and install directly from it.
# Search for a hard trait in Foundry $ forge foundry search greetr # Install a trait from Foundry $ forge foundry get greetr
Listing installed traits
$ forge list # everything $ forge list pymodule # Soft Traits only $ forge list native # Hard Traits only
Removing traits
$ forge remove <name> # Hard Trait $ forge remove pymodule <name> # Soft Trait
Output prefixes
Forge uses consistent prefixes to indicate status:
| Prefix | Means |
|---|---|
[*] | in progress |
[+] | success |
[-] | something went wrong |
Build from source
Requires Python 3.10+. No dependencies beyond the standard library.
$ git clone https://github.com/AmanCode22/forge.git $ cd forge $ python main.py --help
Status
Foundry
Foundry is the Hard Trait registry for Ethos, hosted in two places — pick whichever you prefer:
☁ Primary — Cloudflare Pages
The canonical live registry. Fast global CDN. This is what forge foundry queries by default.
⬡ Mirror — GitHub Pages
The same registry, mirrored on GitHub Pages. Useful if Cloudflare is unreachable in your region.
The one rule that matters
Every Hard Trait must support all 8 platforms — Linux x86_64, Linux ARM64, macOS Intel, macOS Apple Silicon, Windows x86_64, Windows arm64, Termux ARM64, Termux ARMv7. If yours does not support one of these, first open an issue on ethos-foundry explaining why. Otherwise the PR will be rejected.
What Foundry is — and what it is not
Foundry is a registry, not a documentation site. It does not list trait inventories in any other form — the canonical list of available traits is what forge foundry search returns. Foundry itself is just JSON manifests; there is no separate "trait catalogue" page to maintain. This is intentional: a single source of truth (the manifests on Cloudflare Pages) means what you see via forge is always accurate.
Verified sample traits
Three sample "greet" traits — one per supported language — are verified and live on Foundry right now. They're the simplest possible reference implementations, useful as a starting point if you're writing your own.
| Trait | Language | Description | Install | Status |
|---|---|---|---|---|
greetc | C | Sample trait written in C for greet. | forge foundry get greetc | verified |
greetcpp | C++ | Sample trait written in C++ for greet. | forge foundry get greetcpp | verified |
greetr | Rust | Sample trait written in Rust for greet. | forge foundry get greetr | verified |
Quick use
# Search the registry $ forge foundry search greet # Install a trait (e.g. my verified Rust sample) $ forge foundry get greetr # List what you have installed $ forge list native
Then in Ethos:
bring in greetr. set result to run greetr.greet with "Aman". say result.
How it works — the full lifecycle
- You write a Hard Trait using one of the official template repos (C, C++, or Rust). The template has GitHub Actions that build binaries for all 8 platforms automatically.
- You tag a release (e.g.
v1.0.0). The workflows build binaries for all 8 platforms and upload them to GitHub Releases. - You open a PR to Foundry with the auto-generated
manifest.jsonfrom your release. You must open a PR to Foundry for each version bump also — the manifest in your release is different from the one in your source repo. - The PR is reviewed personally. If it looks good, it's merged. The trait goes live on Foundry.
Note
Traits that don't support all platforms will not be accepted. This ensures every user can use every trait, no matter their device. Or else open an issue first, else the PR will be rejected.
Required platforms — all 8 required
Every trait must include binaries for all of these. No partial support.
| Tag | OS | Arch | Extension |
|---|---|---|---|
linux-x86_64 | Linux | x86_64 | .so |
linux-aarch64 | Linux | ARM64 | .so |
macos-arm64 | macOS | Apple Silicon | .dylib |
macos-x86_64 | macOS | Intel | .dylib |
windows | Windows | x86_64 | .dll |
windows-arm64 | Windows | arm64 | .dll |
termux-aarch64 | Android / Termux | ARM64 | .so |
termux-armv7 | Android / Termux | ARMv7 | .so |
If your trait can't build on one of these
Open an issue on ethos-foundry first, explain the platform limitation, and wait for a response. Then submit the PR. PRs that skip this step are rejected automatically.
Adding your trait
- Fork a template. Pick your language: These repos have starter code, build config, and CI workflows. They compile for all 8 platforms automatically when you tag a release. You don't need to build anything locally.
- Build and release. Write your code. Push. Tag a release like
v1.0.0. The workflows build binaries for all platforms and upload them to GitHub Releases automatically. - Open a PR. The GitHub workflow auto-creates a
manifest.jsonfor the PR. You just need to use that and you're done. - Review and merge. The PR is reviewed personally. If it passes, it's merged. The trait goes live on Foundry.
Updating your trait
When you release a new version:
- Update your trait repo and tag a new release (e.g.
v2.0.0). - The CI builds new binaries for all platforms and uploads them.
- You open a PR to Foundry with the updated
manifest.json. - The PR is reviewed and merged. Users get the latest version when they run
forge foundry get.
You don't need to do anything extra. Just tag a release and open a PR.
Rules — the same rules apply to templates and platform support
Rejection rules — mechanical, no judgement calls
- Folder name must equal
manifest.name. If they don't match, the PR is rejected. - All 8 platforms must be supported. No partial support. If a platform can't build, open an issue first. Otherwise: rejected.
- No binaries in the repo. Binaries live on GitHub Releases, not in the Foundry repo. PRs containing binaries are rejected.
- All URLs must be public. No authenticated URLs, no rate-limited URLs.
- Checksums are mandatory (SHA256). Every platform entry must have a
sha256:checksum. Missing checksum = rejected. - Public license only. MIT, Apache-2.0, etc. No proprietary licenses accepted on Foundry.
- PR required for each version bump. Don't edit manifests in-place — open a new PR with the new release's manifest.
- New language bindings require an issue first. Don't open a PR with a new language template — open an issue on Foundry with the repo link first.
The PR rules are the Foundry rules — everywhere
The same rules apply across the Ethos ecosystem, because it's all maintained as one project:
- Foundry PRs → must follow the 8-platform rule and the open-issue-first rule.
- Template repos → must build on all 8 platforms via CI; no platform-specific code without
#ifdefguards. - Ethos itself → must run on Windows, macOS, Linux, and Termux; the Rust rewrite will preserve this.
If a platform requirement can't be met, the answer is always the same: open an issue first, explain why, then PR. Otherwise the PR is rejected.
Links
- Foundry repo:
AmanCode22/ethos-foundry - Live registry:
foundry-ethos.pages.dev - Mirror:
amancode22.github.io/ethos-foundry - Ethos docs: DOCS.md
- C template:
ethos-trait-c-template - C++ template:
ethos-trait-cpp-template - Rust template:
ethos-trait-rust-template
Playground
Runs entirely in your browser. Pyodide is fetched once from the jsDelivr CDN. Then it fetches lexer and parser and using Pyodide runs it!
This playground uses the real Ethos compiler
The playground runs the actual src/ethos/lexer.py and src/ethos/parser.py from the AmanCode22/ethos-lang repository inside Pyodide (CPython compiled to WebAssembly). There is no JavaScript reimplementation — every token, every line of transpiled Python, and every runtime execution uses the real Ethos compiler code.
How it works — three layers
- Lexer —
lexer.pyis loaded into the Pyodide virtual filesystem and imported as a Python module. Itslex()function splits source into sentences and tokenizes each one viashlex.split(), lowercasing non-quoted tokens. - Parser —
parser.pyis imported the same way. Itsparse()function converts the token stream into Python source code, tracking block nesting via theif/otherwise if/otherwise/endkeywords and indenting the Python output accordingly. - Pyodide runtime — the generated Python source is executed via
pyodide.runPythonAsync().printcalls are captured by redirectingsys.stdoutand displayed in the output panel.
Because the real parser produces standard Python, you can read exactly what your Ethos code becomes — switch the output mode to python to see it. This matches the behaviour of the real Ethos python. … pythonend. block.
What works in the browser
Because the playground uses the real compiler, it supports everything the real Ethos supports: say, set, add, subtract, ask, if / otherwise / end, repeat, count, while, how to / run, bring in, note, string slicing, type casting, and all arithmetic/comparison operators. Soft Trait imports from PyPI that ship with Pyodide (like math, random, json) work directly. Hard Traits require ctypes loading of native binaries, which is not available in the browser sandbox — install Ethos locally for the full Hard Trait experience.
cdn.jsdelivr.net
Need more? Install Ethos locally
Examples
Real Ethos code. Every snippet is compatible with the reference compiler and with the in-browser Playground — click Try in playground on any example to load it.
Hello, Ethos
say "Hello, Ethos!".
Variables and arithmetic
set a to 10. set b to 20. set sum to a plus b. say sum. set product to a times b. say product. set power to a to the power of 2. say power.
Input + if / otherwise
ask "What's your name? " into name. set greeting to "Hello, ". say greeting. say name. set score to 95. if score is above 90. say "That's an A.". otherwise if score is at least 75. say "That's a B.". otherwise. say "Keep going.". end.
count loop with step
count from 1 to 5 variable i. say i. end. count from 10 to 0 variable j stepping -2. say j. end.
while loop
set lives to 3. while lives is above 0. say lives. subtract 1 from lives. end. say "Game over.".
Functions
how to greet with name. set msg to "Hello, ". say msg. say name. end. run greet with "Aman". how to add with a, b. set result to a plus b. say result. end. run add with 5, 7.
String slicing
set name to "Ethos". set first to name from 0 to 1. set rest to name from 1 to 5. say first. say rest.
Type casting
set age_text to "25". set age to age_text to number. add 1 to age. say age. set pi_text to "3.14". set pi to pi_text to decimal. set twice to pi times 2. say twice.
Imports (Soft Trait)
bring in math. set pi to math.pi. say pi. set r to run function math.sqrt with 16. say r.
# works in local Ethos install; in the browser Playground, math is bundled with Pyodide so it also runs.
Hard Trait usage — greetr, greetc, greetcpp
Three sample traits — one per language — are verified and on Foundry. Pick whichever language you want to learn from:
greetc verified
C sample trait for greet.
greetcpp verified
C++ sample trait for greet.
greetr verified
Rust sample trait for greet.
Then in Ethos — using greetr as the example:
# After: forge foundry get greetr bring in greetr. set result to run greetr.greet with "Aman". say result.
# Hard Traits require a local Ethos install with ctypes — not available in the browser Playground.
Changelog
All releases published on the ethos-lang releases page, in reverse chronological order. Each release is signed with GPG key B5690EEEBB952194 and verified by GitHub.
All releases
| Version | Date | Title | State |
|---|---|---|---|
v0.5.0-beta | 14 Apr 2026 | Major bug fix, Termux support, Hard Trait API | latest |
v0.4.0-beta | 30 Mar 2026 | The first beta — macOS support, type casting | deprecated |
v0.3.0-alpha | 23 Mar 2026 | Major Linux package manager support | alpha |
v0.2.0-alpha | 21 Mar 2026 | Windows support added | alpha |
v0.1.0-alpha | 19 Mar 2026 | The Foundation Release | alpha |
v0.5.0-beta — Major bug fix, Termux support, Hard Trait API
# released 14 Apr 2026 · 11 assets · commit c16d82c · GPG signed
The v0.5.0-beta release ships major bug fixes alongside two significant additions: Termux support and the completed Hard Trait API.
Termux support is available through both the package repository and direct .deb downloads. Due to linker restrictions in the Termux environment, Termux builds require Python and are distributed as a zipapp of the source code. Native Termux binaries will ship after the Rust rewrite.
The Hard Trait API is completed with the introduction of Ethos Foundry, the official Hard Trait registry. Foundry is hosted on Cloudflare Pages and GitHub Pages, and provides pre-built hard traits. See ethos-foundry for details on submitting a trait.
This is the final beta release. Bug reports and feature requests are tracked via GitHub issues. The next milestone is the first stable release, followed by the Rust rewrite on a new branch. Windows ARM64 support is also included in this release.
What's new
- Termux support — available via the Termux repository and via downloadable
.debfiles. - Hard Trait API — completed, with Ethos Foundry as the official registry.
- Windows ARM64 — support added to the combined installer.
- Major bug fixes across the transpiler and runtime.
Assets (11)
| Asset | Size | Platform |
|---|---|---|
ethos-installer-linux-x86_64.tar.gz | 26.2 MB | Linux x86_64 |
ethos-linux-x86_64 | 14.3 MB | Linux x86_64 (standalone) |
Ethos-macOS-arm64.pkg | 10.5 MB | macOS Apple Silicon |
Ethos-macOS-x86_64.pkg | 11.8 MB | macOS Intel |
ethos-macos-arm64 | 5.74 MB | macOS Apple Silicon (standalone) |
ethos-macos-intel-x86_64 | 6.36 MB | macOS Intel (standalone) |
Ethos-windows-installer-x86_64.exe | 14.4 MB | Windows x86_64 |
Ethos-windows-installer-arm64.exe | 13.5 MB | Windows arm64 |
ethos-lang_termux_0.5.0-beta_all.deb | 5.93 KB | Android / Termux |
Source code (zip) | — | Source |
Source code (tar.gz) | — | Source |
View release on GitHub ↗
v0.4.0-beta — The first beta, macOS support, type casting
# released 30 Mar 2026 · 9 assets · commit dd5ae77 · GPG signed
Deprecated release
This release was found to contain significant bugs during post-release testing and is no longer recommended. Users should upgrade to v0.5.0-beta or later. It is listed here for historical reference.
The v0.4.0-beta release is the first beta for the Ethos language. It introduces official macOS support, fixes several bugs found during testing, and expands Python standard library coverage within the Nuitka-compiled binary. Requests for additional standard library modules can be opened as GitHub issues.
Type casting is supported in this release using Ethos's English-like syntax. See the language documentation for details. The release also switches Windows builds from Nuitka onefile mode to standalone mode, which avoids a Windows Defender false positive that flagged onefile builds.
What's new
- macOS support — officially added for both arm64 and x86_64.
- Type casting — English-like syntax (
to number,to decimal,to text, etc.). - Expanded Python stdlib — additional modules bundled into the Nuitka binary.
- Standalone Windows builds — replaces onefile mode to avoid Windows Defender false positives.
View release on GitHub ↗
v0.3.0-alpha — Major Linux package manager support
# released 23 Mar 2026 · 6 assets · commit a64a315 · GPG signed
The v0.3.0-alpha release adds -v and --version flags to the Ethos CLI for version detection, and introduces major package manager support for Linux installations. Packages are published via the Open Build Service for supported distributions.
If a distribution is not supported by the OBS repository, the universal tarball (ethos-build.tar.gz) can be downloaded and installed via install.sh. The tarball installs both Ethos and Forge; the same applies to the Windows installer.
What's new
- Version flags —
ethos -vandethos --version. - OBS repository — packages published at software.opensuse.org for openSUSE, Arch, Debian, Fedora, openEuler, and Ubuntu.
- Universal tarball —
ethos-build.tar.gzwithinstall.shfor unsupported distributions.
Assets (6)
ethos— 8.4 MB (Linux standalone)ethos-build.tar.gz— 19.6 MB (universal tarball)Ethos-windows-installer.exe— 11.9 MBethos.exe— 5.41 MB (Windows standalone)Source code (zip)Source code (tar.gz)
View release on GitHub ↗
v0.2.0-alpha — Windows support added
# released 21 Mar 2026 · 4 assets · commit 755b72e · GPG signed
The v0.2.0-alpha release adds Windows support to the Ethos programming language. The list and dict Python data types are now officially supported and tested, and float support has been added to the language.
What's new
- Windows support — native Windows installer and standalone binary.
- list and dict types — officially supported and tested.
- float support — added to the type system.
Assets (4)
Ethos-v0.2-windows-installer.exe— 12 MBethos.exe— 5.4 MB (standalone)Source code (zip)Source code (tar.gz)
View release on GitHub ↗
v0.1.0-alpha — The Foundation Release
# released 19 Mar 2026 · 3 assets · commit 606a90c · GPG signed
The v0.1.0-alpha release is the first public alpha of the Ethos programming language. It establishes the core foundation: a natural-language-inspired parser that transpiles human-readable syntax into a Python execution environment.
Key features in this alpha
- Natural language parsing — support for dynamic math expressions (
set x to 5 plus 10), conditional logic (is above,is not), and control flow using explicitendblocks. - Interactive I/O — fully functional
sayand theask "Prompt" into variablesyntax. - The
how toengine — define and execute custom functions natively. - Hard Trait bindings — the core executer dynamically loads compiled C/C++ shared libraries (
.so) mapped viamanifest.json, bringing native performance into Ethos scripts.
Linux installation (standalone)
The Ethos binary is compiled using Nuitka; Python is not required to run it. Download the ethos binary, make it executable, and run a script:
chmod +x ethos ./ethos run script.ethos
Windows and macOS native binaries are planned for later releases. Non-Linux users can run Ethos directly from the Python source code. Android (Termux) builds are planned after the project reaches a stable release.
Assets (3)
ethos— Linux standalone binarySource code (zip)Source code (tar.gz)
View release on GitHub ↗
Roadmap
Planned — pending testers
- First stable release — v0.5.0-beta is the final beta. If no major issues are reported, it will be promoted to stable without changes.
- Rust rewrite — begins on a new branch after the first stable release. Goals: performance, memory safety, and behavioural parity with the Python version.
- Termux prebuilt binaries — will ship after the Rust rewrite lands. Until then, Termux runs the Python source as a zipapp.
Not currently planned: LSP, VSCode extensions, GUI IDE.
B5690EEEBB952194 (verified by GitHub).
View all releases on GitHub ↗
Contributing
Ethos is a solo project maintained by me (Class 9, India). Contributions are welcome — especially Hard Trait SDK bindings for new languages, bug reports, and fixes. The rules below are mechanical; they're applied without judgement calls on every PR.
Rule 1 — The PR rules are the Foundry rules
One rule set, applied everywhere
The same rules apply to Foundry PRs, template repos, and Ethos itself. The rule is:
- All 8 platforms must be supported. Linux x86_64, Linux ARM64, macOS Intel, macOS Apple Silicon, Windows x86_64, Windows arm64, Termux ARM64, Termux ARMv7.
- If you cannot support a platform, open an issue first. Explain why on
ethos-foundry(for traits) or the relevant repo (for everything else). Wait for a response. Then open your PR. - PRs that skip the issue-first step are rejected. No exceptions, no judgement calls — this is mechanical.
Rule 2 — Templates are required
Hard Traits must be built from one of the official templates:
| Template | Language | Use for |
|---|---|---|
ethos-trait-c-template | C + CMake | Simplest FFI |
ethos-trait-cpp-template | C++ + CMake | Use extern "C" for exports |
ethos-trait-rust-template | Rust + Cargo | Use #[no_mangle] extern "C" |
Want a template for another language?
If you want to contribute an API for a language other than C / C++ / Rust (e.g. Go, Zig, Java), open an issue first on ethos-foundry with a link to your template repo containing the API similar to the above templates. Once reviewed and accepted, it will be linked from the Foundry README. Do not open a PR with a new language binding without an issue first.
Rule 3 — PR required per version bump
Every version bump requires a new PR to Foundry. Don't edit manifests in-place. The flow:
- Update your trait repo and tag a new release (e.g.
v2.0.0). - CI builds new binaries for all 8 platforms and uploads them to GitHub Releases.
- The workflow auto-creates a new
manifest.jsonfor the PR — use that one, not the one in your source repo (they are different). - Open a PR to
ethos-foundrywith the updated manifest. - I review and merge. Users get the latest version via
forge foundry get.
Rule 4 — No binaries in repos
Binaries live on GitHub Releases, not in source repos. PRs containing binaries (in the trait repo or in Foundry) are rejected. All URLs in manifests must be public, and SHA256 checksums are mandatory for every platform entry.
Rule 5 — Trait name must match folder name
The name field in manifest.json must match the folder name (and the repo name). For example, ethos-trait-mymath → name: "mymath" → same name used in CMakeLists.txt first line as project name. PRs with mismatched names are rejected.
Rule 6 — Public license only
MIT, Apache-2.0, etc. No proprietary licenses accepted on Foundry. The trait's license field in the manifest must match the LICENSE file in the source repo.
Where to contribute
Foundry — Hard Traits
Submit new Hard Traits or version bumps. Follow the 8-platform rule. Open PR ↗
Trait templates
Improve the C / C++ / Rust starter templates. New languages require an issue first. C template ↗
Forge — package manager
Bug reports and fixes. The Rust rewrite is paused but the Python version is open. Open issue ↗
Ethos language
Lexer, parser, runtime, stdlib shims. Open an issue before starting large features. Open issue ↗
Documentation
Improve DOCS.md, BUILDING.md, STDLIB_SHIMS.md, install guides. PRs welcome. DOCS.md ↗
Be a tester
Most valuable contribution right now. Test Ethos as a beginner and report bugs. DM u/AmanCode22 ↗
Quick checklist before opening a PR
- If your PR touches platforms: all 8 are supported, or an issue was opened first explaining the exception.
- If your PR is a Hard Trait: built from an official template (C / C++ / Rust).
- Folder name matches
manifest.namematches repo name. - No binaries in the PR — only source and manifest.
- All URLs in the manifest are public; SHA256 checksums are present for every platform.
- License is public (MIT, Apache-2.0, etc.).
- If this is a version bump: a new PR was opened, not an in-place edit.
- If this is a new language binding: an issue was opened on
ethos-foundryfirst and accepted.
Communication
- GitHub issues — primary channel for bugs, feature requests, platform exceptions, and new-language-binding requests.
- Reddit DM — u/AmanCode22 — for testers and direct contact.
- Open an issue before starting large features to avoid duplicate work.
Why the rules are strict
Ethos is a solo project reviewed by one person. Mechanical rules — all 8 platforms, templates required, issue-first for exceptions — keep the review load manageable and ensure every user on every device can use every trait. The strictness is what makes the ecosystem trustworthy, not a barrier to entry.