Skip to content

Infinite-Networker/CherryScript

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

48 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

CherryScript Banner

πŸ’ CherryScript

The scripting language built for Data Science, Automation & AI β€” at the speed of thought.


Python License: MIT Version Status Made by

PRs Welcome Stars Issues


╔══════════════════════════════════════════════════════════════════╗
β•‘   collect β†’ process β†’ predict β†’ deploy  β€” in plain English.     β•‘
β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•

πŸ“– Table of Contents

Section Description
πŸ’ What is CherryScript? Overview & philosophy
✨ Feature Highlights What you can do
⚑ Quick Start Up and running in 60 seconds
πŸ”€ Language Syntax Core language constructs
πŸ—„οΈ Database Integration MySQL / PostgreSQL
πŸ€– AI & Machine Learning H2O AutoML pipelines
πŸš€ Model Deployment REST API in one line
πŸ“¦ Installation Full setup guide
πŸ—ΊοΈ Roadmap What's coming next
🀝 Contributing Join the community
πŸ“„ License MIT

πŸ’ What is CherryScript?

CherryScript is an expressive, human-readable scripting language designed to unify data collection, ML pipelines, and AI model deployment behind a single, clean syntax.

Instead of stitching together Python scripts, YAML configs, SQL queries, and deployment manifests β€” you write plain CherryScript and let the runtime handle the rest.

// Three lines from raw data to live API πŸš€
collect images from "dataset/raw"
process using "h2o_automl"
deploy model "vision_classifier" to "http://api.myapp.com/predict"

Built by Cherry Computer Ltd. β€” making data science accessible, one line at a time.


✨ Feature Highlights

πŸ—ƒοΈ Data Collection

  • Collect images, text, CSV, JSON from local paths or URLs
  • Social media scraping adapters
  • MySQL / PostgreSQL ingestion
  • Unified collect keyword β€” no boilerplate

βš™οΈ Data Processing

  • H2O AutoML integration out of the box
  • Built-in DataFrame operations (filter, sort, join)
  • Statistical functions: sum, mean, std, percentile
  • One-liner preprocessing: process using "h2o_automl"

πŸ€– AI / ML Generation

  • Train classification, regression & clustering models
  • Auto-generate Python, PHP, or Java model wrappers
  • Model leaderboard & performance comparison
  • h2o.automl() β€” zero-config model selection

πŸš€ Instant Deployment

  • Deploy any model as a FastAPI REST endpoint
  • Health-check route auto-generated
  • undeploy() for clean teardown
  • One-line: deploy(model, "http://0.0.0.0:8080/predict")

πŸ”Œ Multi-Language Export

  • Export trained models to Python, PHP, Java
  • Ready-to-use code scaffolding
  • Works with scikit-learn & H2O MOJO formats

πŸ–₯️ Developer Experience

  • Interactive REPL mode (cherryscript -i)
  • Clean CLI interface
  • Friendly error messages
  • .cherry syntax highlighting (VS Code extension coming soon)

⚑ Quick Start

Install in 30 seconds

# Clone the repository
git clone https://github.com/Infinite-Networker/CherryScript.git
cd CherryScript

# Install core package
pip install -e .

# Or with ML support
pip install -e ".[ml]"

# Verify install
cherryscript --version

Your First Script

Create a file hello.cherry:

// hello.cherry β€” your first CherryScript program

var name = "World"
var version = 1.0

print(`Hello, ${name}! Welcome to CherryScript v${version}`)

// Variables & types
var fruits  = ["cherry", "mango", "kiwi"]
var profile = { "lang": "CherryScript", "purpose": "AI Automation" }

// Loop
for fruit in fruits {
    print("πŸ’", fruit)
}

// Functions
fn greet(person) {
    return `Hi ${person}, ready to automate some AI? πŸš€`
}

print(greet("Developer"))

Run it:

cherryscript hello.cherry

Interactive REPL

cherryscript --interactive
# >>> var x = 42
# >>> print("The answer is", x)
# The answer is 42

πŸ”€ Language Syntax

Variables

var message  = "Hello CherryScript"   // mutable
let PI       = 3.14159                // constant-intent
var score    = 98.6
var active   = true
var tags     = ["ml", "automation", "ai"]
var config   = { "debug": false, "max_epochs": 100 }

Control Flow

// if / else if / else
if (score >= 90) {
    print("πŸ† Grade: A")
} else if (score >= 75) {
    print("βœ… Grade: B")
} else {
    print("πŸ“š Keep studying!")
}

// for-in loop
for tag in tags {
    print("Tag:", tag)
}

// while loop
var counter = 0
while (counter < 5) {
    print("Iteration:", counter)
    counter = counter + 1
}

Functions

fn calculate_accuracy(correct, total) {
    return (correct / total) * 100
}

fn classify_model(auc) {
    if (auc >= 0.95) { return "Excellent πŸ†" }
    else if (auc >= 0.85) { return "Good βœ…" }
    else { return "Needs Improvement ⚠️" }
}

var accuracy = calculate_accuracy(94, 100)
print("Accuracy:", accuracy, "%")
print("Rating:", classify_model(0.96))

String Interpolation

var model_name = "ChurnPredictor"
var auc        = 0.978

print(`Model ${model_name} achieved AUC of ${auc}`)
// β†’ Model ChurnPredictor achieved AUC of 0.978

πŸ—„οΈ Database Integration

// Connect to MySQL or PostgreSQL
var db = connect("mysql://user:password@localhost/sales_db")

// Query data
var customers = db.query("SELECT * FROM customers WHERE active = true")
print("Loaded", len(customers), "customers")

// Process results
var vip = []
for c in customers {
    if (c["lifetime_value"] > 5000) {
        vip.append(c["name"])
    }
}
print("VIP customers:", vip)

πŸ“Œ Supported databases: MySQL, PostgreSQL
πŸ”œ Coming soon: MongoDB, Redis, BigQuery, Snowflake


πŸ€– AI & Machine Learning

Full AutoML Pipeline

// 1. Load your data
var db     = connect("mysql://user:pass@localhost/crm")
var data   = db.query("SELECT age, income, churn FROM customers")

// 2. Build an H2O frame
var frame  = h2o.frame(data)

// 3. Train AutoML β€” zero config needed
var model  = h2o.automl(frame, "churn")

// 4. Inspect the leaderboard
print("Best model:", model.name)
print("Model type:", model.model_type)
for entry in model.leaderboard {
    print(" -", entry["model_id"], "| AUC:", entry["auc"])
}

// 5. Predict on new data
var new_data    = [{ "age": 28, "income": 72000 }]
var predictions = model.predict(h2o.frame(new_data))
print("Churn probability:", predictions[0]["confidence"])

Export Models

// Generate ready-to-ship model wrappers
export to python    // β†’ model_server.py
export to php       // β†’ ModelPredictor.php
export to java      // β†’ ModelPredictor.java

πŸš€ Model Deployment

// Deploy model as a live REST API (FastAPI under the hood)
var endpoint = deploy(model, "http://0.0.0.0:8080/predict")

print("βœ… API live at:", endpoint.url)
print("πŸ” Health check:", endpoint.url.replace("/predict", "/health"))

// Call your API
// POST http://0.0.0.0:8080/predict
// Body: { "rows": [{ "age": 35, "income": 60000 }] }
// Returns: { "predictions": [{ "prediction": 1, "confidence": 0.85 }] }

// Graceful teardown
undeploy(endpoint, 5.0)
print("πŸ›‘ API offline")

πŸ“¦ Installation

Prerequisites

Requirement Version Notes
Python β‰₯ 3.8 Required
pip β‰₯ 21.0 Required
MySQL / PostgreSQL Any Optional β€” needed for DB features
Java 8+ 8 or 11 Optional β€” needed for H2O AutoML

Installation Options

# Option 1: Core only (no ML dependencies)
pip install -e .

# Option 2: With database support
pip install -e ".[db]"

# Option 3: With ML support
pip install -e ".[ml]"

# Option 4: With deployment support
pip install -e ".[deploy]"

# Option 5: Everything
pip install -e ".[all]"

# Option 6: Development mode (includes testing tools)
pip install -e ".[dev]"

Verify Your Install

cherryscript --version
# β†’ CherryScript 1.0.0

cherryscript -c 'print("πŸ’ CherryScript is ready!")'
# β†’ πŸ’ CherryScript is ready!

πŸ“ Project Structure

CherryScript/
β”œβ”€β”€ πŸ’ cherryscript/            # Core package
β”‚   β”œβ”€β”€ __init__.py             # Version & exports
β”‚   β”œβ”€β”€ parser.py               # Tokenizer & AST parser
β”‚   β”œβ”€β”€ cli/
β”‚   β”‚   └── __init__.py         # CLI entry point & REPL
β”‚   └── runtime/
β”‚       β”œβ”€β”€ __init__.py         # Runtime exports
β”‚       β”œβ”€β”€ interpreter.py      # Statement evaluator
β”‚       └── adapters.py         # DB, H2O, Deploy adapters
β”‚
β”œβ”€β”€ πŸ“š docs/                    # Documentation
β”‚   β”œβ”€β”€ ROADMAP.md              # Feature timeline
β”‚   └── SYNTAX_GUIDE.md         # Full language reference
β”‚
β”œβ”€β”€ πŸ§ͺ examples/                # Sample .cherry scripts
β”‚   β”œβ”€β”€ test.cherry             # Full feature showcase
β”‚   β”œβ”€β”€ ml_pipeline.cherry      # ML pipeline example
β”‚   β”œβ”€β”€ data_analysis.cherry    # Business intelligence example
β”‚   └── deploy_api.cherry       # Deployment walkthrough
β”‚
β”œβ”€β”€ πŸ”¬ tests/                   # Test suite
β”‚   β”œβ”€β”€ test_parser.py
β”‚   └── test_interpreter.py
β”‚
β”œβ”€β”€ βš™οΈ  .github/
β”‚   β”œβ”€β”€ workflows/ci.yml        # GitHub Actions CI
β”‚   β”œβ”€β”€ ISSUE_TEMPLATE/         # Bug & feature templates
β”‚   └── pull_request_template.md
β”‚
β”œβ”€β”€ pyproject.toml              # Package configuration
β”œβ”€β”€ requirements.txt            # Pinned dependencies
β”œβ”€β”€ CHANGELOG.md                # Version history
β”œβ”€β”€ CONTRIBUTING.md             # Contribution guide
└── LICENSE                     # MIT License

πŸ—ΊοΈ Roadmap

See docs/ROADMAP.md for the full detailed plan.

Quarter Milestone Status
Q1 2024 βœ… v1.0 β€” Core interpreter, CLI, H2O AutoML, MySQL, REST deploy Done
Q2 2024 πŸ”œ v2.0 β€” Plugin system, VS Code extension, NoSQL support Planned
Q3 2024 πŸ”œ v3.0 β€” JIT compilation, PyTorch/TF bridge, WASM Planned
Q4 2024 πŸ”œ v3.5 β€” Enterprise: RBAC, SSO, Kubernetes deploy Planned
Q1 2025 πŸ”œ v4.0 β€” AI-assisted coding, natural language β†’ CherryScript Planned
Q2 2025 πŸ”œ v5.0 β€” CherryStudio web IDE, model marketplace Planned

🀝 Contributing

We ❀️ contributors! Check out CONTRIBUTING.md for full guidelines.

# 1. Fork the repo on GitHub
# 2. Clone your fork
git clone https://github.com/<your-username>/CherryScript.git
cd CherryScript

# 3. Create a feature branch
git checkout -b feature/my-awesome-feature

# 4. Install dev dependencies
pip install -e ".[dev]"

# 5. Make your changes, run tests
pytest tests/ -v --cov=cherryscript

# 6. Commit & push
git commit -m "feat: add my awesome feature"
git push origin feature/my-awesome-feature

# 7. Open a Pull Request πŸŽ‰

🏷️ Good First Issues

Look for issues tagged good-first-issue β€” these are specifically selected for new contributors.


🌟 Community & Support

Channel Link
πŸ› Bug Reports GitHub Issues
πŸ’‘ Feature Requests GitHub Issues
πŸ’¬ Discussions GitHub Discussions
πŸ“– Documentation /docs
πŸ“‹ Changelog CHANGELOG.md

πŸ“„ License

MIT License β€” Β© 2024 Cherry Computer Ltd.

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software to use, copy, modify, merge, publish, distribute,
sublicense, and/or sell copies of the Software.

See LICENSE for full text.


Made with πŸ’ by Cherry Computer Ltd.

"Making Data Science Accessible, One Line at a Time."


Star this repo Fork it Follow

About

A programming language for automated data collection, processing, and AI program creation

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 100.0%