Python Library - Command-Line Interface
Available command-line tools provided by the Garden Linux Python Library
Features Commands
gl-cname
Generate a canonical name (cname) from feature sets.
gl-cname
Generate a canonical name (cname) from feature sets.
usage: gl-cname [-h] [--arch ARCH] [--commit COMMIT] [--feature-dir FEATURE_DIR] [--version VERSION] cnamecname
Canonical name (cname) to process. Must be a valid GardenLinux canonical name format.
-h, --help
show this help message and exit
--arch <arch>
Target architecture (e.g., amd64, arm64). If not specified, will be determined from the cname or feature set.
--commit <commit>
Git commit hash. If not specified, will be read from COMMIT file in the GardenLinux root directory.
--feature-dir <feature_dir>
Path to the features directory (default: ‘features’).
--version <version>
Version string. If not specified, will be read from VERSION file in the GardenLinux root directory.
gl-features-parse
Parse and extract information from GardenLinux features.
gl-features-parse
Parse and extract information from GardenLinux features.
usage: gl-features-parse [-h] [--arch ARCH] --cname CNAME [--commit COMMIT] [--feature-dir FEATURE_DIR] [--release-file RELEASE_FILE] [--default-arch DEFAULT_ARCH] [--default-version DEFAULT_VERSION] [--version VERSION] [--ignore IGNORE] [{cname,cname_base,container_name,container_tag,commit_id,features,platform,platforms,flags,flavor,elements,arch,version,version_and_commit_id,graph}]type
Type of output to generate. Choices: cname, cname_base, container_name, container_tag, commit_id, features, platform, platforms, flags, flavor, elements, arch, version, version_and_commit_id, graph. Default: ‘cname’.
-h, --help
show this help message and exit
--arch <arch>
Target architecture (e.g., amd64, arm64). Overrides architecture from cname.
--cname <cname>
Canonical name (cname) to parse. Must be a valid GardenLinux canonical name.
--commit <commit>
Git commit hash. If not specified, will be read from COMMIT file or release file.
--feature-dir <feature_dir>
Path to the features directory (default: ‘features’). Either –feature-dir or –release-file must be provided.
--release-file <release_file>
Path to a release file containing cname metadata. Either –feature-dir or –release-file must be provided.
--default-arch <default_arch>
Default architecture to use if architecture cannot be determined from cname or other sources.
--default-version <default_version>
Default version to use if version cannot be determined from files or other sources.
--version <version>
Version string. If not specified, will be read from VERSION file or release file.
--ignore <ignore>
Comma-separated list of features to ignore when processing (e.g., ‘feature1,feature2’).
Flavors Commands
gl-flavors-parse
Parse flavors.yaml and generate combinations.
python3 -m sphinx
Parse flavors.yaml and generate combinations.
usage: python3 -m sphinx [-h] [--commit COMMIT] [--no-arch] [--include-only INCLUDE_ONLY] [--exclude EXCLUDE] [--build] [--publish] [--test] [--test-platform] [--category CATEGORY] [--exclude-category EXCLUDE_CATEGORY] [--json-by-arch] [--markdown-table-by-platform]-h, --help
show this help message and exit
--commit <commit>
Commit hash to fetch flavors.yaml from GitHub. An existing ‘flavors.yaml’ file will be preferred.
--no-arch
Exclude architecture from the flavor output.
--include-only <include_only>
Restrict combinations to those matching wildcard patterns (can be specified multiple times).
--exclude <exclude>
Exclude combinations based on wildcard patterns (can be specified multiple times).
--build
Filter combinations to include only those with build enabled.
--publish
Filter combinations to include only those with publish enabled.
--test
Filter combinations to include only those with test enabled.
--test-platform
Filter combinations to include only platforms with test-platform: true.
--category <category>
Filter combinations to include only platforms belonging to the specified categories (can be specified multiple times).
--exclude-category <exclude_category>
Exclude platforms belonging to the specified categories (can be specified multiple times).
--json-by-arch
Output a JSON dictionary where keys are architectures and values are lists of flavors.
--markdown-table-by-platform
Generate a markdown table by platform.
OCI Commands
gl-oci
Push OCI artifacts to a registry and manage manifests.
S3 Commands
gl-s3
Upload and download artifacts from S3 buckets.
gl-s3
usage: gl-s3 [-h] [--bucket BUCKET] [--path PATH] [--dry-run] {download-artifacts-from-bucket,upload-artifacts-to-bucket} ...-h, --help
show this help message and exit
--bucket <bucket>
S3 bucket name to upload to or download from.
--path <path>
Local directory path for upload (source) or download (destination).
--dry-run
Perform a dry run without actually uploading or downloading files.
gl-s3 download-artifacts-from-bucket
usage: gl-s3 download-artifacts-from-bucket [-h] [--cname CNAME]-h, --help
show this help message and exit
--cname <cname>
Canonical name (cname) used as the S3 key prefix for artifacts.
gl-s3 upload-artifacts-to-bucket
usage: gl-s3 upload-artifacts-to-bucket [-h] [--artifact-name ARTIFACT_NAME]-h, --help
show this help message and exit
--artifact-name <artifact_name>
S3 artifact base name.
GitHub Commands
gl-gh-release
Create and manage GitHub releases.
gl-gh-release
Create and manage GitHub releases.
usage: gl-gh-release [-h] {create,create-with-gl-release-notes,upload} ...-h, --help
show this help message and exit
gl-gh-release create
usage: gl-gh-release create [-h] [--owner OWNER] [--repo REPO] --tag TAG [--name NAME] --body BODY [--commit COMMIT] [--pre-release] [--latest]-h, --help
show this help message and exit
--owner <owner>
GitHub repository owner (default: ‘gardenlinux’).
--repo <repo>
GitHub repository name (default: ‘gardenlinux’).
--tag <tag>
Git tag name for the release (required).
--name <name>
Release name/title. If not specified, the tag will be used.
--body <body>
Release notes/description body (required).
--commit <commit>
Git commit hash. If not specified, the tag will be used to find the commit.
--pre-release
Mark the release as a pre-release (default: True).
--latest
Mark this release as the latest release (default: False).
gl-gh-release create-with-gl-release-notes
usage: gl-gh-release create-with-gl-release-notes [-h] [--owner OWNER] [--repo REPO] --tag TAG --commit COMMIT [--latest] [--dry-run]-h, --help
show this help message and exit
--owner <owner>
GitHub repository owner (default: ‘gardenlinux’).
--repo <repo>
GitHub repository name (default: ‘gardenlinux’).
--tag <tag>
Git tag name for the release (required).
--commit <commit>
Git commit hash used to generate release notes (required).
--latest
Mark this release as the latest release (default: False).
--dry-run
Perform a dry run without actually creating the release.
gl-gh-release upload
usage: gl-gh-release upload [-h] [--owner OWNER] [--repo REPO] --release_id RELEASE_ID --file_path FILE_PATH [--dry-run]-h, --help
show this help message and exit
--owner <owner>
GitHub repository owner (default: ‘gardenlinux’).
--repo <repo>
GitHub repository name (default: ‘gardenlinux’).
--release_id <release_id>
GitHub release ID to upload the file to (required).
--file_path <file_path>
Path to the file to upload (required).
--dry-run
Perform a dry run without actually uploading the file.