Manifest Reference (gitx.toml)
To make a repository installable by gitx, you MUST include a gitx.toml (or .gitx.toml) file at the root of the repository. This file defines the package metadata, installation rules, and platform-specific binaries.
Example
toml
[package]
name = "mytool"
version = "1.2.0"
description = "A powerful CLI tool"
authors = ["Your Name <you@example.com>"]
license = "MIT"
homepage = "https://example.com/mytool"
repository = "https://github.com/user/mytool"
[install]
bin = ["mytool"]
force = false
skip_verify = false
shim = true
[scripts]
pre_install = ["echo 'Starting installation...'"]
post_install = ["echo 'Installation complete!'"]
# Platform-specific configurations
# Format: [platform.<os>-<arch>]
# OS: windows, linux, macos (or darwin)
# Arch: x86_64, aarch64
[platform.windows-x86_64]
url = "https://example.com/releases/v1.2.0/mytool-windows.zip"
sha256 = "a1b2c3d4..."
[platform.linux-x86_64]
url = "https://example.com/releases/v1.2.0/mytool-linux.tar.gz"
sha256 = "e5f6g7h8..."
[platform.macos-x86_64]
url = "https://example.com/releases/v1.2.0/mytool-macos.tar.gz"
sha256 = "i9j0k1l2..."
[platform.macos-aarch64]
url = "https://example.com/releases/v1.2.0/mytool-macos-arm64.tar.gz"
sha256 = "m3n4o5p6..."Configuration Sections
[package]
Metadata about the package.
| Field | Type | Required | Description |
|---|---|---|---|
name | String | Yes | The name of the package. |
version | String | Yes | The semantic version of the package. |
description | String | No | A brief description. |
authors | Array | No | List of authors. |
license | String | No | License identifier (e.g., "MIT"). |
homepage | String | No | Project homepage URL. |
repository | String | No | Source code repository URL. |
[install]
Installation behavior settings.
| Field | Type | Default | Description |
|---|---|---|---|
bin | Array | [] | List of binary names to expose (create shims for). |
force | Bool | false | If true, overwrites existing installations. |
skip_verify | Bool | false | If true, skips checksum verification (NOT recommended). |
shim | Bool | true | If true, creates shims in ~/.gitx/bin. |
extract | Array | [] | Specific files to extract (empty means all). |
[scripts]
Lifecycle hooks to run shell commands.
| Field | Description |
|---|---|
pre_install | Runs before download/extraction. |
post_install | Runs after installation and shim creation. |
pre_uninstall | Runs before removal. |
post_uninstall | Runs after removal. |
[platform.<os>-<arch>]
Platform-specific download instructions. You must define this for every platform you wish to support.
| Field | Type | Required | Description |
|---|---|---|---|
url | String | Yes | Direct download URL for the archive/binary. |
sha256 | String | No | SHA256 checksum for verification. |
bin | Array | No | Override binary names for this platform. |
format | String | Auto | Explicit archive format (tar.gz, zip, etc.) if detection fails. |
Supported OS: windows, linux, macos (or darwin) Supported Arch: x86_64, aarch64
