Abstract is a natural language compiler
Project description
Abstract
Abstract is a bold attempt to bridge two worlds: the accelerating pace of innovation and the enduring value of human creativity in software development. Its core mission is to keep humans in command of what we do best—designing elegant, intentional software systems—without being shackled to any specific programming language or tech stack.
Rather than acting as a generic AI assistant that mimics human work, Abstract preserves the essence of software craftsmanship. It welcomes innovation, but not at the cost of thoughtfulness. It respects efficiency, but not as an obsession. It’s about writing software with intent, clarity, and ownership—where abstraction is not just a coding technique but a philosophy.
At its heart, Abstract is a natural language compiler. You describe your architecture, logic, or components in natural language, and Abstract compiles them into your target language. The cleaner your abstractions, the more portable and robust your code becomes.
Abstract enforces the SOLID principles by modeling your software’s dependency graph. This approach encourages cleaner boundaries, eliminates circular dependencies, and reduces the likelihood of hallucinated or unintended AI outputs. It shortens model context windows, increasing clarity and precision in code generation.
Abstract is model-agnostic, IDE-independent, and aims to be completely open, free, and interoperable with any ecosystem.
Usage Examples
🔧 Features
-
Inversion of Control: Define what should be built in natural language and where it goes. Let Abstract handle the translation to the target codebase.
-
Natural Language Compilation: Write software specs in plain language and compile them to multiple supported stacks.
-
Dependency Graph-Based Compilation: Models your codebase as a graph to enforce clean module boundaries and reduce complexity.
-
Prompt Optimization via Dependency Graph: Uses the graph to build precise prompts, reducing context length and improving output quality.
-
Enforces Good Practices:
-
Encourages absence of circular dependencies
-
Promotes clean abstractions and modular architecture
-
Single Responsibility Principle by design
-
-
Language Agnostic: Target multiple languages seamlessly.
-
Model Agnostic: Compatible with any LLM provider (OpenAI, Anthropic, local models, etc.).
-
IDE Independent: Integrate with any development environment of your choice.
-
Global Context Management: Keep track of architecture-level concerns across the codebase.
-
Global Instructions: Maintain architectural or project-wide goals and constraints.
-
Auto Code Review & Suggested Next Steps (Optional): Get continuous feedback and guidance from the compiler.
-
Compilation Cache: Speeds up recompilation by storing intermediate artifacts.
-
Supported Model Providers:
- OpenAI
-
Supported Stacks:
-
React (TypeScript & JavaScript)
-
React Native (TypeScript & JavaScript)
-
Angular (TypeScript)
-
Vue (TypeScript & JavaScript)
-
Node (TypeScript & JavaScript)
-
Python
-
C#
-
Rust
-
Golang
-
Java
-
Kotlin
-
iOS (Swift)
-
HTML
-
🚧 Development Roadmap
-
Full CLI Interface
-
Support for new project bootstrapping based on stack
-
Integration with existing codebases
-
Support Model Providers APIs:
-
Ollama
-
Anthropic
-
others
-
-
Extend support and examples for:
-
Angular (TypeScript)
-
Vue (TypeScript & JavaScript)
-
Node (TypeScript & JavaScript)
-
C#
-
Rust
-
Golang
-
Java
-
Kotlin
-
iOS (Swift)
-
🛠️ Installation
pip install abstract-compiler
🚀 Usage
It is highly recommended to explore the provided examples before starting. (https://github.com/ramiroviszan/abstract-examples)
Setup
-
Add and customize the following configuration files in the root of your project:
ab.config– Project structure and stack settingsinstructions.config– Global development and architectural guidelinesab.debug– Add this file if you want Code reviews & Next steps suggestions outputed to 'ab.md'.
-
Create a
.envfile in the project root containing your LLM API key:MODEL_API_KEY=your-model-api-key -
Create
.abfiles to define your modules in natural language. -
At the top of your
.abfiles, import any dependencies or shared components you want to reference.
Compile
To translate your .ab files into code:
abstract [--verbose] [--root path/to/root/folder/]
Optional flags:
--verbose: Show detailed output of the compilation process--root: Set a custom root directory for compilation
🛠️ Development Installation
Follow these steps to set up Abstract development environment locally:
-
Clone the repository:
git clone https://github.com/ramiroviszan/abstract.git cd abstract
-
Install Python 3.12 or higher.
-
Create and activate a virtual environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
-
Setup CLI
pip install -e .
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
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 abstract_compiler-0.0.1b1-py3-none-any.whl.
File metadata
- Download URL: abstract_compiler-0.0.1b1-py3-none-any.whl
- Upload date:
- Size: 14.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
de754b269e92e15373c492dec056c0f79f8d1f48b64a80fea1bac31ce7ddc4bd
|
|
| MD5 |
2fdf2f6185393cd7fd0d2298e48c0974
|
|
| BLAKE2b-256 |
78da65bb0d3e7a004d840de4347ece60f588a3a5996fb74fcf91c7019889c6f9
|