Quickstart
You install the toolchain, make a project, then run, test, change and build it. To try Gizlang with no install, use the Playground.
1. Install
You need Node.js 20.12 or later for npm. Gizlang itself does not run on Node.
npm install -g @gizai/cli
giz init helloThe npm package is the command line of giz.ai and GizStack (giz, with your account's commands; its source is
tools/cli/npm) and holds no toolchain. The first Gizlang command, such as giz init, downloads the native toolchain
for your system into ~/.giz (about 190 MB to download, about 1.2 GB installed) and checks its SHA-256 and its
release signature (Ed25519) before it uses it. Later commands start at once. Scripts and editors can run ~/.giz/bin/giz itself (the VS Code extension
does). No administrator account and no other build tools are necessary.
If npm answers EACCES (Node from apt installs global packages as root), give npm a folder of your own once:
npm config set prefix ~/.local, with ~/.local/bin on your PATH, or install Node with nvm.
To run one command without an install: npx @gizai/cli run main.giz.
One install gives the compiler, the standard library, the libraries (gizdb, gizweb, gizfs, gizai, gizhw), the test runner, the formatter, the language server, live code swap and the GizDB server.
Platforms
The toolchain runs on Linux x86-64 with glibc 2.35 or later (Ubuntu 22.04, Debian 12 and newer). macOS and Windows come later; until then, use Linux, WSL 2 on Windows, or the Playground. The release catalog lists every published release with its target and version.
2. Make a project
giz init hello
cd hello| File | Contents |
|---|---|
main.giz | The program |
main.test.giz | Its test |
package.json | The entry file and the toolchain version |
giz init my-desk --template desk creates a standalone GizDesk AI agent workspace instead, and --template visits a web server over SQL.
3. Run it
main.giz is:
// Run it: giz run main.giz. Test it: giz test. Edit it while it runs: giz live main.giz.
export function greeting(): string {
return "Hello, Gizlang!";
}
function main(): void {
print(greeting());
}giz run main.gizHello, Gizlang!The first run compiles the program to native code against the prebuilt standard library. Later runs start from the
cache. giz main.giz is the short form.
To add a file, write it and import it by its path: import {name} from "./name.giz";. No other step is necessary.
4. Test it
giz testgiz test runs each function whose name starts with test in the .test.giz files under the folder. It keeps a pass
until the code that the test covers changes.
5. Change it live
giz live main.gizgiz live runs the program and replaces its code each time you save a file. Named state stays, and a function that
is running finishes on the code that it started with.
6. Check, format and build it
giz check main.giz # the errors, with their source lines, and no run
giz fmt main.giz # lay out the file
giz build main.giz -o hello
./helloThe result of giz build is one native executable with no runtime to install.
Keep the toolchain current
| Task | How |
|---|---|
| Upgrade | npm install -g @gizai/cli@latest |
| Pin a project's version | giz init puts "version" in the gizlang section of package.json. giz then runs that version in the folder and below, and installs it on first use. GIZ_VERSION=VERSION selects a version for one command. |
| Use an editor | giz vscode installs the Gizlang extension into VS Code; it finds VS Code where it was installed, or says how to install it. Other editors start giz lsp as their language server (command-line guide). |
| Uninstall | npm uninstall -g @gizai/cli, then remove ~/.giz. |
A version never changes after it is published. Each file of a release has a SHA-256 in an envelope signed with
Ed25519, and the third-party notices are in share/licenses/. Gizlang is open source under the Apache 2.0
license.
Choose your next step
After the first program, choose the shortest path to a useful result.
| Goal | Next page | Result |
|---|---|---|
| See the platform quickly | Learning and examples | Run one example for each major subsystem |
| Learn the language | Language guide | Write typed native programs |
| Build a web application | GizWeb guide and Todo lab | Ship routes, forms, data and tests |
| Query or operate data | GizDB guide | Store and query application data |
| Run models | Compute guide | Run tensors and generative models |
| Build an agent | Agent guide and GizDesk lab | Connect models, tools and knowledge |
The Learning page combines the platform tour with role-based paths and complete labs.
Next
- Learn Gizlang: platform tour, learning paths, examples and complete labs.
- The language: the language for a TypeScript, JavaScript or Go developer.
- Differences from TypeScript: what a TypeScript developer must know first.
- A web app: routes, forms, a database and tests in one native process.
- Deploy to GizStack: put an app at its own address.