An offline CLI for inspecting Xget's bundled platform contract and converting upstream URLs. Requires Node.js 22 or newer and has no runtime dependencies.
This first release provides URL conversion and platform discovery. It does not execute package managers, modify configuration, test instance availability, or download resources.
npm run build:cli
node packages/cli/bin/xget.js capabilities
node packages/cli/bin/xget.js resolve https://github.com/microsoft/vscode --base-url https://xget.example.comAll commands work without network access. The placeholder instance above is for
examples; supply your own instance to produce usable URLs. Only root HTTP(S)
instance URLs are supported. --base-url takes precedence over XGET_BASE_URL.
To build a standalone npm tarball from the Xget checkout:
npm run pack:cli
npm install --global ./xixu-me-xget-cli-0.1.0.tgz
xget versionThe tarball includes the platform contract and conversion implementation; the installed package needs neither the Xget checkout nor repository build scripts. Packaging locally does not publish the package to a registry.
| Command | Behavior |
|---|---|
capabilities |
List the bundled platform descriptors and contract versions. |
resolve <URL> |
Convert an upstream URL using the bundled contract. |
version / --version |
Report CLI, release, catalog, and schema versions. |
help / --help |
Show usage. |
platforms aliases capabilities. convert --url <URL> aliases
resolve <URL>. These aliases retain the old command spelling, but use the new
versioned JSON envelope. topics, snippet, --source-url, and --readme-url
are no longer supported. Human documentation is not an executable contract.
JSON is the default, and --json is shorthand for --format json.
--format text prints the converted URL or version, or a tab-separated platform
list. capabilities --format table adds column headings. Help prints text
unless JSON is explicitly requested.
{
"schemaVersion": 1,
"cliVersion": "0.1.0",
"catalogVersion": "1.0.0",
"ok": false,
"error": {
"code": "MISSING_BASE_URL",
"message": "Supply --base-url or set XGET_BASE_URL to your Xget instance root URL."
}
}Successful JSON responses have ok: true and data instead of error.
capabilities and resolve data include source: "bundled"; they do not claim
to describe a running instance. Errors go to stdout in JSON mode and stderr in
text mode. Exit codes are 0 for success, 2 for invalid arguments or input, 3 for
unsupported resources/conversions, and 1 for unexpected internal errors.
Conversion preserves query strings and fragments, including signed query parameters. Treat successful output as sensitive when its input is sensitive. Embedded username/password credentials are rejected, and error messages do not echo input URLs. Conversion is limited to origins and paths in the bundled catalog; an unsupported host is never guessed from a platform's brand name.
See the version contract in the source repository for compatibility rules and instance discovery.