Intent-driven programming language that generates secure backend systems from human-readable descriptions. Code is no longer written; it is described.
Project description
๐ง MadiLang v0.4.0
โจ Code is no longer written. It is described. โจ
MadiLang transforms human-readable intent into production-ready, secure, and sovereign backend systems.
Describe what you want โ MadiLang generates the rest with cryptographic proof of origin.
๐ Quick Links
โจ Get Started โข ๐ Wiki โข ๐งฌ Philosophy โข ๐ค Contribute โข ๐ฌ Discussions
๐ The Sovereign Difference
In a world of boilerplate, complexity, and hidden logic, MadiLang restores clarity, sovereignty, and trust.
| Dimension | Traditional Development | MadiLang |
|---|---|---|
| ๐ง Abstraction | Write implementation details | Describe intent |
| ๐ Provenance | Manual audit trails | Cryptographic signature in every artifact |
| ๐ก๏ธ Security | Add as afterthought | Security & ethics by default |
| ๐ฑ Accessibility | Requires full IDE/PC | Mobile-first โ develop on Termux/phone |
| โก Boilerplate | Repetitive setup code | Zero boilerplate โ generated automatically |
| ๐ Extensibility | Modify core or fork | Plugin system โ extend without touching core |
| ๐ Targets | Single language per project | Multi-target โ Node.js, Python, Go (planned) |
| ๐งช Quality | Manual testing | Auto-generated tests & CI/CD pipeline |
๐ MadiLang is not just a tool. It's a declaration: Human intent is the sovereign layer.
๐ฅ Live Example: From Intent to Production API
๐ Describe Your Intent (auth.madi)
entity: User
fields:
- name: string
- email: string (unique)
- password: string (secure)
- createdAt: datetime (auto)
intent: register_user
route: "/api/signup"
method: POST
inputs: (name, email, password)
steps:
find User by email as existing_user
if existing_user:
show error "Email already exists"
stop process
create User
generate token
return success with token
๐ Generate & Run
madi run auth.madi
๐ค Output: Sovereign Backend (Node.js + Express + Prisma)
// โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
// ๐ MadiLang Sovereign Intent Signature
// โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
const __MADI_SIGNATURE__ = {
"developer": { "id": "madani004" },
"intent": { "hash": "a3f8c2...", "fingerprint": "7d9e1b..." },
"timestamp": { "iso": "2026-06-14T12:00:00Z" },
"ethics": { "score": 0.95, "passed": true },
"signature": { "algorithm": "SHA256-HMAC", "value": "..." }
};
// โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
app.post('/api/signup', validateInputs(['name','email','password']), async (req, res) => {
try {
const existing_user = await prisma.user.findUnique({ where: { email: req.body.email } });
if (existing_user) {
return res.status(400).json({ error: "Email already exists" });
}
const result = await prisma.user.create({
data: {
name: req.body.name,
email: req.body.email,
password: await bcrypt.hash(req.body.password, 10) // ๐ Auto-hashed
}
});
const token = jwt.sign({ id: result.id }, process.env.JWT_SECRET, { expiresIn: '7d' });
return res.status(200).json({ success: true, token });
} catch (error) {
res.status(500).json({ error: "Internal server error" });
}
});
โ Secure by default: Password hashing, input validation, error handling, JWT generation.
๐ Sovereign by design: Every file carries a verifiable signature binding it to the original intent.
๐ฑ Mobile-First Sovereignty
MadiLang is designed to run anywhere Python runs โ including your smartphone.
No heavy IDE. No powerful PC. Just intent and sovereignty.
๐ค Termux Setup (Android)
# 1. Install dependencies
pkg update && pkg install python nodejs git
# 2. Clone repository
git clone https://github.com/madanimkhitar22-beep/madilang.git
cd madilang
# 3. Install in editable mode
pip install -e .
# 4. Verify installation
madi --version
# ๐ง MadiLang v0.4.0 โ Sovereign Intent Compiler
# 5. Initialize and run
madi init my-backend
cd my-backend
madi run src/main.madi
๐ iOS (via Pythonista or similar)
pip install madilang
madi run your_file.madi
๐ก Democratizing development: Build sovereign backends from anywhere, even a smartphone.
๐๏ธ Architecture v0.4.0
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ๐ง MadiLang Sovereign Compiler Pipeline โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ
โ ๐ Source (.madi) โ
โ โ โ
โ ๐ Parser (Recursive Descent) โ AST โ
โ โ โ
โ ๐ Analyzer (Semantic Validation + Ethics Enrichment) โ
โ โ โ
โ ๐ IntentSignature (Cryptographic Binding + Provenance) โ
โ โ โ
โ โ๏ธ StepCompiler โ IR (Language-Agnostic Intermediate Representation) โ
โ โ โ
โ ๐งฉ Plugin Hooks (Ethics, Security, Custom Transformers) โ
โ โ โ
โ ๐๏ธ CodeGenerator โ Target Code (Node.js, Python, Go...) โ
โ โ โ
โ ๐ค Output + Embedded Signature + Runtime Verification โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ Project Structure
madilang/
โโโ madilang/ # ๐ง Core sovereign package
โ โโโ compiler/ # ๐ Parser, AST, Analyzer
โ โโโ ir/ # โ๏ธ IR + Signature Engine
โ โโโ generators/ # ๐๏ธ Code generators (Node.js, Python, Go)
โ โโโ stdlib/ # ๐ Auth, Validation, Security
โ โโโ plugins/ # ๐งฉ Plugin system (Ethics, Security hooks)
โ โโโ cli/ # ๐ฅ๏ธ Command-line interface
โโโ tests/ # ๐งช Comprehensive test suite
โโโ examples/ # ๐ก Ready-to-run examples
โโโ tools/ # ๐ค VSCode extension, dev tools
โโโ .github/workflows/ # ๐ CI/CD pipeline
๐ Sovereign Intent Signature
Every artifact generated by MadiLang carries a cryptographic signature that proves:
- ๐ค Who authored the original intent
- ๐ What the intent was (source hash)
- ๐ When it was generated
- ๐ก๏ธ Whether it passed ethical review
- โ Integrity โ any modification breaks verification
๐ Verify Signature
madi verify output.js
# โ
Signature structure valid
# ๐ค Developer: madani004
# ๐
Generated: 2026-06-14T12:00:00Z
# ๐ Intent Hash: a3f8c2...
# ๐ก๏ธ Ethics Score: 0.95
๐งช Runtime Verification
Generated code includes runtime verification helpers:
const verification = __verifyMadiSignature__();
if (!verification.valid) {
throw new Error("Sovereign signature verification failed!");
}
๐ก๏ธ Ethics & Security by Default
MadiLang enforces ethical and secure patterns at compile time.
โ Automatic Security Checks
| Check | Description |
|---|---|
| ๐ Secure Fields | Fields marked (secure) are automatically hashed with bcrypt |
| ๐ Auth Coverage | Sensitive routes require authentication protection |
| ๐ค Role Guards | Admin operations enforce role-based access control |
| ๐ซ Injection Prevention | Input validation generated for all inputs |
| โ ๏ธ Error Safety | Generic error messages prevent data leakage |
๐ง Ethics Scoring
The built-in ethics plugin evaluates:
- ๐ Privacy: Handling of sensitive data
- ๐ค Consent: Explicit user consent requirements
- ๐ Transparency: Clear intent and data usage
- ๐ Accountability: Audit trails and responsibility
- โ๏ธ Fairness: Non-discriminatory logic patterns
madi check auth.madi
# ๐ก๏ธ Ethics Score: [โโโโโโโโโโ] 0.95 โ
PASS
๐งฉ Plugin System
Extend MadiLang without modifying the core:
from madilang.plugins.base_plugin import BasePlugin, PluginHook, register_plugin
@register_plugin
class CustomAuditPlugin(BasePlugin):
@property
def metadata(self):
return PluginMetadata(
name="custom-audit",
version="1.0.0",
description="Custom audit logging",
author="Your Name",
hooks=[PluginHook.POST_GENERATE],
)
def post_generate(self, context):
context.generated_code += "\n// Custom audit hook injected\n"
return context.generated_code
๐ฆ Available Plugins
| Plugin | Description |
|---|---|
ethics-hook |
Quantifiable ethics scoring and validation |
security-hook |
Vulnerability detection and secure pattern enforcement |
sovereign-devkit |
Integration with external security scanner (optional) |
cognition-engine |
Integration with Sovereign-Cognition-Engine (optional) |
๐ CLI Commands
# Initialize new project
madi init my-project
# Compile and run
madi run src/main.madi
# Build without running
madi build src/main.madi --target nodejs --output dist/
# Verify signature
madi verify dist/output.js
# Analyze and validate
madi check src/main.madi
# Show version
madi --version
๐ฆ Installation
๐ง From Source
git clone https://github.com/madanimkhitar22-beep/madilang.git
cd madilang
pip install -e .
๐ From PyPI (Coming Soon)
pip install madilang
๐ Requirements
- Python 3.8+
- Node.js 18+ (for running generated code)
- PostgreSQL (for Prisma integration)
๐งฌ Philosophy
MadiLang is built on the Mkhitarian Ontology:
Human intent is the sovereign layer.
Code is merely the execution of will.
Ethics and security are not features โ they are foundations.
Core Principles
- ๐ง Clarity over complexity: Describe what you want, not how to do it
- ๐ฏ Intent over scale: Focus on purpose, not boilerplate
- ๐ Sovereignty over convenience: Maintain control and provenance
- ๐ก๏ธ Ethics by default: Moral considerations embedded in the toolchain
- ๐ฑ Accessibility for all: Develop from anywhere, even a smartphone
๐ Related Projects
- Mkhitarian Philosophy โ The philosophical foundation
- Sovereign-Cognition-Engine โ Ethics evaluation engine
- Sovereign-DevKit โ Security scanning toolkit
๐ค Join the Sovereign Movement
We welcome contributors, thinkers, and builders from around the world!
๐ฌ Discussions
Have questions? Ideas? Want to share your MadiLang projects?
๐ Join the Discussions
๐ Development Setup
# Fork and clone
git clone https://github.com/your-username/madilang.git
cd madilang
# Install with dev dependencies
pip install -e ".[dev]"
# Run tests
pytest tests/
# Run linting
ruff check .
black --check .
# Build package
python -m build
๐งญ Contribution Guidelines
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing-feature) - Open a Pull Request
โ Checklist
- Tests pass (
pytest tests/) - Linting passes (
ruff check .,black --check .) - Documentation updated
- Examples added if applicable
๐ Governance
- Code of Conduct โ Our community standards
- Security Policy โ Responsible disclosure guidelines
- License โ MIT License
๐ Changelog
See CHANGELOG.md for detailed release notes.
๐ v0.4.0 Highlights
- โจ Complete architecture rewrite with modular design
- ๐ Sovereign Intent Signature system
- ๐งฉ Plugin system for extensibility
- ๐ฑ Mobile-first optimization
- ๐ก๏ธ Ethics and security hooks
- ๐งช Comprehensive test suite
- ๐ค VSCode extension with syntax highlighting and snippets
- ๐ CI/CD pipeline with quality, security, and integration checks
๐ฎ Roadmap
v0.5.0 (Planned)
- ๐ Python/FastAPI generator
- ๐ฆ Go/Fiber generator
- ๐งช Auto-testing generator from intents
- ๐ Live API documentation generation
- ๐ฉบ
madi doctorcommand for environment diagnostics
v1.0.0 (Vision)
- ๐ Multi-language parity (Node.js, Python, Go)
- ๐ Pi Network integration for decentralized deployment
- ๐ง Sovereign-Cognition-Engine deep integration
- ๐ฆ PyPI publication and stable API
- ๐ Community plugin ecosystem
๐ Citation
If you use MadiLang in your work, please cite it:
cff-version: 1.2.0
title: "MadiLang"
authors:
- family-names: "El Mkhitar"
given-names: "El Madani"
email: "madani004@proton.me"
version: "0.4.0"
date-released: 2026-06-14
license: "MIT"
repository-code: "https://github.com/madanimkhitar22-beep/madilang"
๐ค Author
El Madani El Mkhitar
๐ง madani004@proton.me
๐ GitHub Profile
"Building sovereign tools for a decentralized future, one intent at a time."
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file madilang-0.5.0.tar.gz.
File metadata
- Download URL: madilang-0.5.0.tar.gz
- Upload date:
- Size: 27.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a1b01022bfbd388c0ce9e25ad22c72a13da56a7801af6ff56e1c5f384c3766a4
|
|
| MD5 |
c287b027c205b815d990562618f33c9f
|
|
| BLAKE2b-256 |
9d0a86f1cc398dafb445f29dc2f0fda4f579192db8c4e2182cd9d1557e68d06c
|
File details
Details for the file madilang-0.5.0-py3-none-any.whl.
File metadata
- Download URL: madilang-0.5.0-py3-none-any.whl
- Upload date:
- Size: 84.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3ad363e2fdd8d787c62149a037c1c23e83ef58ed79ab2c9f8fc59cac5eb1dff0
|
|
| MD5 |
2c0bcb198fcc09d7a625150b1936dd23
|
|
| BLAKE2b-256 |
e0ea35ace178826a482638e4e046bb2df810d8702cd10eaeb9f80e69d37e85f5
|