DBBasic-Compiler
The compiler that understands English.
Traditional compilers check syntax and throw errors. DBBasic-Compiler understands what you want and generates optimal code.
For 70 years, compilers have been mechanical syntax checkers. Now there's one that thinks.
Quick Start
1. Install:
pip install -r requirements.txt
2. Set your API key:
export ANTHROPIC_API_KEY='your-api-key'
3. Write an intent file (describe what you want):
# Calculator
Create a simple calculator program.
## Features
- Add, subtract, multiply, divide
- Handle division by zero
- Loop until user types "quit"
4. Compile:
python ai_compiler.py compile intent/calculator.intent.md
5. Run:
python ai_compiler.py run calculator.intent
That's it. No code written. Just intent compiled to execution.
What Is This?
A compiler that:
- Understands natural language (no syntax to learn)
- Asks clarifying questions (no cryptic error messages)
- Generates optimal code (not just syntax checking)
- Validates correctness (against your intent)
Traditional Compiler vs DBBasic-Compiler
Traditional Compiler (GCC, Python, etc):
$ gcc program.c
program.c:42:5: error: expected ';' before 'return'
Dumb syntax checker. You fix semicolons.
DBBasic-Compiler:
$ python ai_compiler.py compile intent/myapp.intent.md
[AI Compiler] Understanding problem description...
[AI Compiler] ✓ Compilation successful!
Intelligent translator. It understands intent.
Examples
Hello World
Intent file (intent/hello_world.intent.md):
# Hello World - Greeting Program
Create a simple program that greets users.
## What It Should Do
1. Ask the user for their name
2. Greet them with a friendly message
3. Ask if they want to greet someone else
4. If yes, repeat; if no, say goodbye
Compile and run:
python ai_compiler.py compile intent/hello_world.intent.md
python ai_compiler.py run hello_world.intent
Output:
What's your name? Alice
Hello, Alice! Nice to meet you!
Greet someone else? (yes/no): no
Goodbye! Have a great day!
More Examples
See intent/ directory for example intent files.
How It Works
Intent Description (.intent.md)
↓
AI Compiler (Claude Sonnet 4.5)
- Understands natural language
- Generates optimal implementation
- Handles edge cases
↓
Executable Code (.py)
↓
Runs!
Commands
# Compile an intent file
python ai_compiler.py compile intent/<name>.intent.md
# Run a compiled program
python ai_compiler.py run <name>.intent
# List all compiled programs
python ai_compiler.py list
Philosophy
Code is a liability, not an asset. Intent is the asset.
Programming should be about clearly describing problems, not fighting syntax errors.
DBBasic-Compiler makes problem description the programming language.
The Paradigm Shift
Old Way:
- Think of solution
- Translate to Python syntax
- Fix syntax errors
- Fix logic errors
- Add error handling
- Test
New Way:
- Describe the problem clearly
- Compile
- Run
Why "Compiler"?
For 70 years, compilers have been:
- Syntax validators
- Mechanical translators
- Rule followers
But now we have AI that can:
- Understand intent
- Make decisions
- Learn patterns
- Ask questions
We're not misusing the term "compiler." We're using it correctly for the first time.
A compiler should compile ideas into code, not just check syntax.
Part of DBBasic
DBBasic is about simplicity:
- DBBasic framework: Simple Python web framework
- DBBasic-Compiler: Simple way to write programs
Both share:
- Minimalism over complexity
- Readability over magic
- Simplicity over features
Requirements
- Python 3.7+
- Anthropic API key (Claude Sonnet 4.5)
Get your API key: https://console.anthropic.com/
Installation
pip install -r requirements.txt
export ANTHROPIC_API_KEY='your-api-key'
Contributing
This is experimental. We're exploring:
- What does programming look like with intelligent compilation?
- How should intent be structured?
- What are the patterns in problem descriptions?
- Can this scale to complex systems?
Ideas and feedback welcome.
License
MIT
Tagline
"The first compiler that compiles ideas into code."
From the makers of DBBasic - because simple is better.
Metadata
Release files for dbbasic-compiler 0.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 | Provenance | Actions |
|---|---|---|---|---|
| dbbasic_compiler-0.1.0.tar.gz | 9.2 kB | Without provenance | Details for dbbasic_compiler-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dbbasic_compiler-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for dbbasic_compiler-0.1.0-py3-none-any.whl |
Total release size: 17.3 kB
Release files / dbbasic_compiler-0.1.0.tar.gz
| Download URL | dbbasic_compiler-0.1.0.tar.gz |
|---|---|
| Size | 9.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
05d4900f934bf1c4bb9520de2167f53de07f579be6708a3d65207e6bfdd19f9c
|
|
BLAKE2b-256 checksum How to use checksums |
34fd3f5b0bdcf537a8bb27955db9dee8eea40d52fc60b50ab2efed956f60ecc3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.1
|
Release files / dbbasic_compiler-0.1.0-py3-none-any.whl
| Download URL | dbbasic_compiler-0.1.0-py3-none-any.whl |
|---|---|
| Size | 8.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e945ea0cc0b3dbfe599faa1ece99b58739e64acbf222834116908fd054eef6be
|
|
BLAKE2b-256 checksum How to use checksums |
3824993d6771bc25d21b98552be129f6987ad87896c52a899579edbc00f24d7e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.1
|
Security for dbbasic-compiler 0.1.0
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.