ai-lang 0.0.6
DotAI - Natural Language Programming Language
License: MIT
Requires Python: <4.0,>=3.10
Keywords: artificial intelligence, deep learning, natural language processing, prompt engineering


# 🤖 DotAI - Natural Language Programming Language

[![Join our Discord](https://img.shields.io/badge/Discord-Join%20our%20server-5865F2?style=for-the-badge&logo=discord&logoColor=white)](https://discord.gg/agora-999382051935506503) [![Subscribe on YouTube](https://img.shields.io/badge/YouTube-Subscribe-red?style=for-the-badge&logo=youtube&logoColor=white)](https://www.youtube.com/@kyegomez3242) [![Connect on LinkedIn](https://img.shields.io/badge/LinkedIn-Connect-blue?style=for-the-badge&logo=linkedin&logoColor=white)](https://www.linkedin.com/in/kye-g-38759a207/) [![Follow on X.com](https://img.shields.io/badge/X.com-Follow-1DA1F2?style=for-the-badge&logo=x&logoColor=white)](https://x.com/kyegomezb)


[![PyPI version](https://badge.fury.io/py/dotai.svg)](https://badge.fury.io/py/dotai)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Python 3.8+](https://img.shields.io/badge/python-3.8+-blue.svg)](https://www.python.org/downloads/)

DotAI is a revolutionary natural language programming framework that allows you to write code and create content using plain English. Simply describe what you want to create, and DotAI will generate, save, and execute the appropriate files.

## ✨ Features

- 📝 Write code in natural language
- 🔄 Automatic code generation and execution
- 📊 Multi-threaded task processing
- 🛠 Enterprise-grade error handling
- 📋 Supports multiple output formats
- 📜 Comprehensive logging system

## 🚀 Quick Start

### Installation

```bash
pip3 install ai-lang
```

### Create Your First .ai File

Create a file `example.ai` with your requests:

```plaintext
Create a Python function that generates the Fibonacci sequence up to n=10 and prints it.

Create a text file containing a haiku about programming.

Create a JSON file with data about three planets including their name, distance from sun, and mass.
```

### Run Your .ai File

```bash
ai-lang run example.ai

```

## CLI Commands

```bash
Usage: ai-lang [OPTIONS] COMMAND [ARGS]...

  DotAI - Natural Language Programming Language CLI

Options:
  --help  Show this message and exit.

Commands:
  init     Initialize a new .ai file with example content
  run      Execute a .ai file and generate the requested files/code
  version  Show the installed version

```

## 📖 Usage Examples

### 1. Generate and Execute Python Code

```plaintext
# script.ai
Create a Python script that:
1. Generates 100 random numbers
2. Calculates their mean and standard deviation
3. Creates a histogram visualization
Execute the script and show the results.
```

### 2. Create Content Files

```plaintext
# content.ai
Write a technical blog post about the future of AI in software development.
Save it as a markdown file with proper formatting.
```

### 3. Data Processing

```plaintext
# data.ai
Create a Python script that reads a CSV file, performs data cleaning,
and outputs summary statistics. Include error handling for missing values.
Execute the script with sample data.
```

## 🛠 Advanced Features

- **Multi-threading**: Process multiple requests in parallel
- **Smart Task Analysis**: Automatic detection of task type and requirements
- **Execution Management**: Safe execution environment for generated code
- **Comprehensive Logging**: Detailed logs for debugging and monitoring

## 🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.

```bash
git clone https://github.com/The-Swarm-Corporation/.ai.git
cd .ai
pip install -e ".[dev]"
```

## 📝 License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## 🔗 Links

- [Documentation](https://dotai.readthedocs.io/)
- [PyPI Package](https://pypi.org/project/dotai/)
- [Issue Tracker](https://github.com/yourusername/dotai/issues)

## 💡 Examples Repository

Check out our [examples repository](https://github.com/The-Swarm-Corporation/.ai) for more use cases and implementation patterns.

## ⚠️ Note

DotAI requires an OpenAI API key to function. Set your API key as an environment variable:

```bash
export OPENAI_API_KEY='your-api-key-here'
```

Or use a `.env` file in your project directory:

```plaintext
OPENAI_API_KEY=your-api-key-here
```

# Todo

- [ ] Add support for more LLMs (Function calling, and local models, you should have a config option to choose which one to use in the cli)
- [ ] Add support for more file types (images, audio, video, etc, integrate with createnow.xyz)
- [ ] Add support for more output formats (pdf, docx, etc)
- [ ] Add support for more input types (image, audio, video, etc)
- [ ] Add support for more task types (data analysis, data processing, data cleaning, etc)

---
Made with ❤️ by the DotAI Team