Follow the steps below to easily install VintLang on your Linux or macOS system.
-
Download the Binary:
First, download the VintLang binary for Linux. You can do this using the
curlcommand. This will download thetar.gzfile containing the binary to your current directory.curl -O -L https://github.com/vintlang/vintlang/releases/download/v0.2.0/vintLang_linux_amd64.tar.gz
-
Extract the Binary to a Global Location:
After downloading the binary, you need to extract it into a directory that is globally accessible.
/usr/local/binis a commonly used directory for this purpose. Thetarcommand will extract the contents of thetar.gzfile and place them in/usr/local/bin.sudo tar -C /usr/local/bin -xzvf vintLang_linux_amd64.tar.gz
This step ensures that the VintLang command can be used from anywhere on your system.
-
Verify the Installation:
Once the extraction is complete, confirm that VintLang was installed successfully by checking its version. If the installation was successful, it will display the installed version of VintLang.
vint -v
-
Initialize a vint project
Create a simple boilerplate vint project
vint <optional:project-name>
Note: Install the vintlang VSCode extension for language support (syntax highlighting, snippets, and tooling).
-
Download the Binary:
Begin by downloading the VintLang binary for macOS using the following
curlcommand. This will download thetar.gzfile for macOS to your current directory.curl -O -L https://github.com/vintlang/vintlang/releases/download/v0.2.0/vintLang_mac_amd64.tar.gz
-
Extract the Binary to a Global Location:
Next, extract the downloaded binary to a globally accessible location. As with Linux, the standard directory for this on macOS is
/usr/local/bin. Use the following command to extract the binary:sudo tar -C /usr/local/bin -xzvf vintLang_mac_amd64.tar.gz
This allows you to run VintLang from any terminal window.
-
Verify the Installation:
To check that the installation was successful, run the following command. It will output the version of VintLang that was installed:
vint -v
-
Initialize a vint project
Create a simple boilerplate vint project
vint init <optional:project-name>
Note: Install the vintlang VSCode extension for language support (syntax highlighting, snippets, and tooling).
- Download the Binary using
curlfor your system (Linux or macOS). - Extract the Binary to
/usr/local/bin(or another globally accessible directory). - Verify the Installation by checking the version with
vint -v. - Initialize a vintlang project by running
vint init <projectname>. - Install the vintlang extension from vscode install vintlang extension in vscode
The simple examples below have been replaced with a single, richer example that demonstrates several recent and powerful VintLang features: packages, dynamic import() at runtime, YAML and JSON handling, file I/O, and reusable functions.
import os
import json
// If you have a local package (see `examples/packages_example`) you can import it
// using a package name. The example package defines `greeter_pkg.greet()`.
// import greeter_pkg
// Dynamic import() lets you load modules at runtime (useful for plugins)
let yaml = import("yaml")
let time = import("time")
let math = import("math")
// Load a YAML configuration if present; otherwise write a sensible default
let cfgStr = ""
if (os.fileExists("config.yaml")) {
cfgStr = os.readFile("config.yaml")
print("Loaded config.yaml")
} else {
let defaultCfg = {
"app": {"name": "vint-app", "port": 8080},
"features": ["web", "logging", "yaml"]
}
cfgStr = yaml.encode(defaultCfg)
os.writeFile("config.yaml", cfgStr)
print("Wrote default config.yaml")
}
let cfg = yaml.decode(cfgStr)
print("App name:", yaml.get(cfg, "app.name"))
// Use dynamic math module
let pow = math.pow(2, 10) // 2^10
print("2^10 =", pow)
// Optional: call into a package if available (see examples/packages_example)
// Example package API (greeter_pkg): sayHello, setGreeting, getPackageInfo
// To use it uncomment and run:
// import greeter_pkg
// greeter_pkg.sayHello("Vint User")
// print(greeter_pkg.getPackageInfo())
// Produce a JSON summary
let summary = {
"generated_at": time.format(time.now(), "2006-01-02T15:04:05"),
"app": yaml.get(cfg, "app.name"),
"value": pow
}
os.writeFile("summary.json", json.encode(summary))
print("Wrote summary.json")
// Small reusable function
let report = func(path) {
let content = os.readFile(path)
print("Report (" + path + ") size:", string(len(content)))
}
report("summary.json")
// End of exampleHow to run this example locally:
vint examples/comprehensive_showcase.vintNotes:
- The example above intentionally mixes static and dynamic imports to show both workflows.
- Some examples in
examples/(LLM, HTTP, enterprise integrations) require network access or API keys — they are safe to read but may need extra setup to run.
We welcome contributions to VintLang! Whether you're fixing bugs, adding features, or improving documentation, your help is appreciated.
Created by Tachera Sasi