Publishing a package

The xs CLI talks to this registry for installs and publishes. Sign in once, fill in xs.toml, run xs publish. Plugins follow the same flow.

1. Install xs

If you do not already have it:

curl -fsSL https://xslang.org/install | sh

Windows:

irm https://xslang.org/install.ps1 | iex

2. Sign in

Create an account at /signup, then log in from the CLI:

xs login

3. Set up your project

Each package needs an xs.toml at the root:

name = "my-package"
version = "0.1.0"
description = "what it does in one line"
license = "MIT"
repo = "https://github.com/you/my-package"
type = "package"   -- or "plugin"

The entry point is main.xs or lib.xs. Subdirs under src/ are bundled as-is.

4. Publish

xs publish

Each version can only be published once. Bump the version in xs.toml before publishing again. Old versions stay available.

Naming and versioning

  • Names are globally unique and first come first served.
  • Lowercase letters, digits, dashes, dots, underscores; max 100 chars.
  • Versions follow semver (1.0.0).

Publishing a plugin

Set type = "plugin" in xs.toml. Everything else is the same. Plugins land at /plg/<name>; install with xs install --plugin <name>.

Other commands

xs search math
xs install my-package
xs install my-package@1.2.3
xs remove my-package
xs list
xs whoami
xs logout