Installing modules: ton618 install

ton618 install greetings

This looks greetings up in the TON618 module registry — a small, separately-hosted index of community modules that stores only a module's name, GitHub link, and version (never its actual code) — then downloads greetings.ton straight from that GitHub repo's default branch into ./modules/greetings.ton, right where IMPORT://greetings already looks for it (see Creating a TON618 module).

The registry's URL defaults to a value baked into include/Version.hpp (TON618_REGISTRY_URL) and can be pointed at a different deployment without rebuilding, via the TON618_REGISTRY_URL environment variable:

TON618_REGISTRY_URL=https://your-registry.example ton618 install greetings

Like --update, install has no bundled TLS client of its own — it shells out to curl (or wget/PowerShell) for both the registry lookup and the GitHub download, the same as every other network operation in the CLI itself (as opposed to ton.requests, which is a separate, sandboxed HTTP client exposed to scripts — see Built-in system modules).

A module author doesn't need anything special to be installable this way: just a public GitHub repo with <name>.ton at its root, registered once in the registry with that repo's link and a version string.

To remove a module fetched this way, use ton618 uninstall <module> — it just deletes ./modules/<module>.ton (the exact file install created), no registry lookup involved:

ton618 uninstall greetings

(Not to be confused with ton618 --uninstall-ton, which removes the ton618 interpreter itself — see Installing & building the interpreter. That command also wipes out the current directory's whole ./modules/ folder, so a single ton618 uninstall <module> and a full --uninstall-ton remove different amounts: one module vs. every module fetched into this project.)

Edit this page on GitHub