Repolode
goplus

goplus/xgo

XGo is a Go-based programming language with plain-English command-style syntax that can call C, Python, and JavaScript libraries.

Stars
9,481
Forks
564
Open issues
46
Last commit
13 hours ago

What is it?

XGo is a programming language derived from Go that uses a simpler, more natural syntax. It supports command-style calls such as `echo "Hello"`, lighter list, map and lambda literals, and string interpolation with `${expr}`. Its syntax is intentionally small, aimed at beginners, STEM education and data science work.

XGo code can be mixed with Go code in the same package. Through the LLGo compiler, XGo can also call C/C++ and Python libraries, and the project provides examples using raylib, SQLite and PyTorch. Classfiles let domain-specific frameworks be built on top of the language, with existing ones covering 2D game development, HTTP web apps, CLI tools and MCP implementations.

Installation is available through winget, apt, yum, Homebrew, or building from source, and an editor plugin exists for Visual Studio Code.

Key features

  • 01Command-style syntax that reduces parentheses, e.g. `echo "Hi"`.
  • 02Go/XGo hybrid code can coexist in the same package.
  • 03Calls C/C++ and Python libraries through the LLGo compiler.
  • 04Classfiles let domain frameworks be built on the language.
  • 05Supports installation via winget, apt, yum, Homebrew, or source build.

Use cases

  • Teaching programming and STEM concepts with a readable syntax.
  • Building 2D games or interactive demos with the spx engine.
  • Writing shell-style DevOps scripts that run without a go.mod file.
  • Prototyping data science workflows that call Python libraries.

Quick start

  1. 1

    Install the XGo toolchain (follow the official docs)

  2. 2

    Initialize a module named hello

    xgo mod init hello
  3. 3

    Create a file get.yap containing: html `<html><body>Hello, YAP!</body></html>`

  4. 4

    Run the program and visit http://localhost:8080

    xgo run .

Things to know

  • Calling C and Python libraries requires the separate llgo compiler, which is not the default.
  • The language is young and uses its own xgo toolchain on top of Go.

Topics

FAQ

What is xgo?
XGo is a Go-based programming language with plain-English command-style syntax that can call C, Python, and JavaScript libraries. XGo is a programming language derived from Go that uses a simpler, more natural syntax. It supports command-style calls such as `echo "Hello"`, lighter list, map and lambda literals, and string interpolation with `${expr}`. Its syntax is intentionally small, aimed at beginners, STEM education and data science work.
Is xgo free to use? What license does it have?
xgo is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
Is xgo still maintained?
Actively maintained. The last commit to xgo was on Oct 21, 2026.
What can I use xgo for?
Teaching programming and STEM concepts with a readable syntax. Building 2D games or interactive demos with the spx engine. Writing shell-style DevOps scripts that run without a go.mod file. Prototyping data science workflows that call Python libraries.
How do I install xgo?
Install the XGo toolchain (follow the official docs) Initialize a module named hello: xgo mod init hello Create a file get.yap containing: html `<html><body>Hello, YAP!</body></html>` Run the program and visit http://localhost:8080: xgo run .
Where can I get xgo?
The source code and installation instructions are on GitHub: https://github.com/goplus/xgo

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects