Codetje docs

rt, the command line

rt publishes packages and manages their tags and settings. It isn't released as a binary yet: build it from the runtime-runner repository with cargo install --path crates/cli.

Every command takes --registry (or RT_REGISTRY_URL, default https://registry.codetje.com) and --token (or RT_REGISTRY_TOKEN), which overrides the saved token.

Signing in

Command
rt login Paste an access token, created at accounts.codetje.com/tokens. It's checked and saved for this registry (mode 0600, under $XDG_CONFIG_HOME/rt/)
rt logout Forget the saved token. It stays valid until you revoke it
rt whoami Your account and the namespaces you can publish to
rt token list Your access tokens
rt token revoke <id> Revoke one

Tokens are created on the accounts site, not by rt: creating one needs a confirmation by email, so neither a stolen session nor a leaked token can make more. They can expire after 30, 90 or 365 days, or never.

Publishing

rt publish <file.wasm> <ns/name@version> [--source app.source.json] [--manifest manifest.json]
           [--tag preview]... [--dep ns/name@version]...
Option
--source Store the source the module was built from (codetje-as build writes it)
--manifest Embed a manifest, for toolchains other than the SDK
--tag Point these tags at the new version
--dep Pin an exact version of an imported package, instead of the newest compatible one
Command
rt versions <ns/name> Versions and tags
rt info <ns/name[@version]> A version's metadata as JSON (default latest)
rt wit <ns/name[@version]> The WIT of what it exports for other packages
rt source set <ns/name@version> <file> Store a version's source, once
rt source get <ns/name[@version]> Print it
rt version delete <ns/name@version> Delete a version, to free storage. Refused while a tag points at it, another version imports it, or a published graph uses it

Tags

Command
rt tag set <ns/name> <tag> <target> Point a tag at a version, latest, or another tag (resolved now)
rt tag rm <ns/name> <tag> Remove a tag. Without stable, module hosts serve latest

Usage

Command
rt usage [namespace] This month's runs, CPU, outgoing requests and storage, the limits, what's left and when it resets, and the busiest packages. Without a namespace, your only one
rt usage --period <YYYY-MM-DD> The month that started that day
rt usage --json The registry's answer as JSON

See Limits for what's counted.

Settings

rt settings show <ns/name>
rt settings set <ns/name> [--public true|false] [--importable true|false]
                [--env NAME=value | --env NAME]... [--unset NAME]...
                [--allow-fetch origin,...] [--no-fetch]

--env NAME without a value asks for it, which keeps it out of your shell history. --allow-fetch replaces the list. See Settings and secrets.

Imports

rt imports show <ns/name>
rt imports set <ns/name> <provider ns/name> [--env ...] [--unset ...] [--allow-fetch ...] [--no-fetch]

What your package gives a package it imports, directly or further down. See Imports.

codetje-as

The AssemblyScript SDK's build command:

codetje-as build [dir] [-o out.wasm] [--debug] [--package ns/name@version]
                 [--registry url] [--wit ns/name=file.wit]

It builds dir/assembly/index.ts (default .) and writes <out>.source.json next to the module. --package is needed when the module exports functions for other packages. --wit uses a local WIT file for an imported package instead of fetching it. It reads CODETJE_REGISTRY and, for private imports, CODETJE_TOKEN.