Covariant Script Programming Language: The Interpreter
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.

Covariant Script Programming Language: The Interpreter

Build Status
Welcome to the Covariant Script programming language!
Covariant Script is an open source, cross-platform programming language
This project is an officially maintained Covariant Script interpreter

Switch language


  • Cross-platform, supporting most mainstream operating systems
  • The extension system is powerful and easy to use
  • Written in C++ 11, which compatibility is better
  • Independent and efficient compiler front end
  • The compilation results can be exported
  • Efficient memory management system
  • Support compile-time optimization
  • Reference count garbage collector
  • C/C++ Native Interface(CNI)



CovScript Online Documents



Download the precompiled executable on the Latest Release.
You can also use other tools (like MinGW) to compile. If you already have a G++ compiler installed, you can use make.bat. Make sure the compiler supports C++11.
Note: The Covariant Script interpreter supports the MSVC compiler, but due to the restrictions imposed by the Windows system on DLL export symbols, the current Covariant Script extension mechanism is almost completely paradoxical on MSVC. Although we provide make_msvc.bat, it is not recommended and is for reference only. Windows developers who need to embed Covariant Script please compile the source code directly, but all extension libraries are temporarily unavailable.


First, download source from CovScript Github Page.
Then you have two choices:

  • With G++ and makefile
$ sh ./
  • With CMake toolchain
    We've provided a CMakeLists.txt.

Note: Some distributions' G++ are too old to support C++11, make sure you G++ compiler is up to date.

Mac OS

All the steps are the same as Linux, tested under macOS Sierra 10.12.5.



cs [arguments..] <file> <args...>


  • --compile-only Only compile
  • --dump-ast Export abstract syntax tree
  • --wait-before-exit Wait before process exit
  • --log-path PATH Set the log and AST exporting path
  • --import-path PATH Set the import path

Note that if you do not set the log and AST exporting path, both will be output directly to the standard output stream.


cs_repl [arguments..]


  • --args Specify the operating parameters
  • --silent Does not display the version info
  • --wait-before-exit Wait before process exit
  • --log-path PATH Set the log path
  • --import-path PATH Set the import path

Note that if you do not set a log path, it will be output directly to the standard output stream.


Covariant Script Installer provides a simple toolchain configuration method for the Microsoft Windows platform. You can download, install, upgrade and uninstall the toolchain by simply push a button. You can download the latest installer from the CovScript Programming Language Home. For more information, visit the Covariant Script Installer.


Covariant Script provides a one-stop code editing, running, debugging experience for the Microsoft Windows platform . The CovScript Installer will automatically downloads the CovScript GUI for you. For more information, please visit Covariant Script GUI.

Package Manager

cspkg is a package manager written in Covariant Script whose main function is to manage extensions or packages for Covariant Script. cspkg will be released with the latest version of Covariant Script. For more information, please visit Covariant Script Package Manager.

IntelliJ Plugin

The IntelliJ Plugin is available now:


The examples folder contains several example programs written by CovScript.


The author of the Covariant Script Programming Language is @mikecovlee.
Copyright © 2018 Michael Lee


Ranked by contribution.


Comments by @ice1000:

This is a programming language created by my friend Michael Lee, written in C++. The detailed description is on it’s website so I’ll just put some comments here. This is a C-like language (at least the function call syntax is of C style), while functions, structs, namespaces are ends with end like Ruby, and it has the concepts of package import using (the module system).
Its parser is hand-written (very complex, although parsers are trivial), which impressed me (I didn’t even think of that when working on Lice, I just wrote an AST evaluator).
This language supports invoking functions written in C++, like JNI.
CovScript mostly features its powerful standard library, which has database, GUI, web access, regular expressions.