File Associations
zolo associate is a command-line tool that registers the .zex and .zar
extensions with the operating system — Windows, macOS, and Linux. Once run,
double-clicking a .zex file automatically invokes
zolo run "<file>" %*, making the executable behave like a natively installed
application.
By default, registration is per-user (on Windows, written to HKCU; on
macOS/Linux, to per-user handlers). Use --system to register at the machine
level — this option requires administrator or root privileges.
The four operating modes are:
zolo associate— installs the associations for the current user.zolo associate --status— shows what is currently registered, without changing anything.zolo associate --uninstall— removes only the entries created byassociate.zolo associate --system— registers for all users (requires elevation).
Inline documentation of the zolo associate command: install, check status,
uninstall, and system-wide OS registration.
// Feature: register OS file associations — `zolo associate`
// Syntax: `zolo associate [--uninstall] [--status] [--system]`
// When to use: make double-clicking a `.zex` run it, and give
// `.zex`/`.zar` files the Zolo icon, on Windows / macOS / Linux.
// This is a CLI command, not in-language syntax — there is nothing to
// `zolo run` here. The commands:
//
// zolo associate # install for the current user
// zolo associate --status # show what is currently registered
// zolo associate --uninstall # remove associations this command created
// zolo associate --system # apply for all users (needs admin/root)
//
// After installing, double-clicking a .zex invokes:
// "<path>/zolo(.exe)" run "%1" %*
// so a standalone .zex (31-distribution/03) behaves like a native app.
//
// Per-user by default (Windows: HKCU; macOS/Linux: per-user handlers).
// Pass --system to register machine-wide.
print("Run `zolo associate` from a terminal — see this file's header.")
// expected: the line above (this file is documentation for the command).
Requires the Zolo CLI/host — open in the playground or run locally.
After associating the files, combine this with a .zex generated by the
distribution flow (chapter 31) so that your application behaves like any other
installed program, without requiring the user to know about zolo run.
See also