An open API service indexing awesome lists of open source software.

https://github.com/siguici/phi

A modern, high-performance scripting language with PHP-inspired syntax and TypeScript-like strong typing.
https://github.com/siguici/phi

general-purpose programming-language scripting-language siguici siguilang web-development

Last synced: about 7 hours ago
JSON representation

A modern, high-performance scripting language with PHP-inspired syntax and TypeScript-like strong typing.

Awesome Lists containing this project

README

          

# Phi Ο†

**Phi** is a modern, high-performance programming language
designed for simplicity, clarity, and expressive power.
Built with ❀️ in [Vlang](https://vlang.io).

[![Build Status](https://github.com/siguici/phi/workflows/CI/badge.svg)](https://github.com/siguici/phi/actions)

---

## πŸš€ Features

- βœ… Lightweight and fast by design
- βœ… Optional, strong, or dynamic typing
- βœ… Clean and minimal syntax
- βœ… `.phi` source files
- βœ… Web and general-purpose scripting
- βœ… Built-in HTTP server
- βœ… Native routing, templating, and middleware

---

## 🌟 Vision

**Phi** redefines how code feels to write and read β€”
expressive, concise, and powerful.
Its architecture is designed for **multi-runtime execution**,
paving the way for native support in environments like TypeScript, PHP, and Vlang.

---

## πŸ“¦ Installation

> ⚠️ **Requires [Vlang](https://vlang.io)**

```bash
git clone https://github.com/siguici/phi
cd phi
v src -o phi
./phi examples
````

Or build for production:

```bash
v -prod src -o phi
./phi examples
```

## πŸ§ͺ Quick Start

Create a file `hello.phi`:

```phi
string name = scan 'Enter your name: '
if name {
print 'Hello ', name, '!'
} else {
print "Hello World!"
}
```

Then run it:

```bash
./phi run hello
```

---

## πŸ“„ Language Overview

**Phi** combines clarity and expressiveness in a clean syntax:

```phi
string hello(string name) {
return 'Hello ', name, '!'
}

print hello("World")
```

### Language Features

- `print`, `echo`
- Functions, conditionals, and loops
- Optional `$` variable prefix
- Inline templates (HTML + Phi)
- Optional and strong typing
- Built-in access to HTTP and environment data

---

## πŸ”§ Roadmap

- [x] Core parser and runtime
- [x] Built-in HTTP server
- [x] Template rendering
- [ ] Ahead-of-time compilation
- [ ] Optional VM execution model
- [ ] Extended standard library
- [ ] WebSocket support
- [ ] Session & authentication modules
- [ ] CLI tooling for scaffolding and dev mode

---

## 🧠 Philosophy

**Phi** is about writing **natural, structured, and elegant code**.

- No tags
- No semicolons
- Just code that feels right

A minimal language for a maximal experience.

> Designed to be **clear to read**, **pleasant to write**, and **powerful to run**.

---

## 🀝 Contributing

We welcome contributions and ideas!

- πŸ›  Fork this repo
- πŸ”§ Make improvements
- βœ… Test (`v test .`)
- πŸ“¬ Open a pull request

---

## πŸ“œ License

[MIT](./LICENSE.md) Β© [Sigui KessΓ© Emmanuel](https://github.com/siguici)