Skip to content

calebbuening/english

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ENGLISH: the programming language

Compile .eng files into any other language

Prerequisites

Before building the compiler, you need to install the following dependencies:

  • libcurl (for HTTP requests)
  • libjson-c (for JSON parsing)
  • Ollama (for local AI model execution)

On macOS, you can install these dependencies using Homebrew:

brew install curl json-c
brew install ollama

After installing Ollama, start the service and pull a model:

ollama serve
ollama pull codellama  # or any other model you prefer

Installation

# Clone the repository
git clone <repository-url>
cd english

# Build the project
make

# Install the binary (optional)
sudo make install

Usage

Setting up your Ollama Model

Before using the compiler, you should set up your preferred Ollama model:

english set model codellama  # or llama3, mistral, etc.

By default, the compiler will connect to Ollama at http://localhost:11434/api/generate. If your Ollama instance is running elsewhere, you can set the endpoint:

english set endpoint http://your-server:11434/api/generate

Compiling ENGLISH

You can compile English descriptions to code in several ways:

  1. From a file:
english compile python --file input.txt --output output.py
  1. From standard input:
echo "Create a function that calculates the factorial of a number" | english compile python
  1. Interactive mode:
english compile javascript
# Then type your description and press Ctrl+D when done

The compiler will send your request to the local Ollama instance, which will generate code based on your description.

Verbose Mode

For debugging purposes, you can enable verbose mode with the -v or --verbose flag:

english -v compile python --file input.txt

This will print detailed information about the compilation process, including API requests and responses.

Supported Languages

The compiler supports various programming languages including:

  • Python
  • JavaScript
  • Java
  • C++
  • Go
  • Ruby
  • And more...

How It Works

The English-to-code compiler uses Ollama's local AI models to translate natural language descriptions into executable code. The quality of the generated code depends on the clarity and specificity of your English description and the capabilities of the model you've selected.

Ollama runs entirely on your local machine, so there's no need for API keys or internet connectivity once you've downloaded the models.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published