opensi·si

This document contains the help content for the kernel-builder command-line program.

CLI reference for kernel-builder

This document contains the help content for the kernel-builder command-line program.

Command Overview:

  • kernel-builder↴
  • kernel-builder completions↴
  • kernel-builder init↴
  • kernel-builder build↴
  • kernel-builder build-and-copy↴
  • kernel-builder build-and-upload↴
  • kernel-builder upload↴
  • kernel-builder check-config↴
  • kernel-builder check-abi↴
  • kernel-builder check-builds↴
  • kernel-builder create-pyproject↴
  • kernel-builder devshell↴
  • kernel-builder list-variants↴
  • kernel-builder hash↴
  • kernel-builder testshell↴
  • kernel-builder update-build↴
  • kernel-builder skills↴
  • kernel-builder skills add↴
  • kernel-builder clean-pyproject↴

kernel-builder

Build Hugging Face Hub kernels

Usage: kernel-builder <COMMAND>

Subcommands:
  • completions — Generate shell completions
  • init — Initialize a new kernel project from template
  • build — Build the kernel locally (alias for build-and-copy)
  • build-and-copy — Build the kernel and copy artifacts locally
  • build-and-upload — Build the kernel and upload to Hugging Face Hub
  • upload — Upload kernel build artifacts to the Hugging Face Hub
  • check-config — Validate the build.toml file
  • check-abi — Check the ABI compatibility of a kernel extension
  • check-builds — Validate kernel builds
  • create-pyproject — Generate CMake files for a kernel extension build
  • devshell — Spawn a kernel development shell
  • list-variants — List build variants
  • hash — Hash the builds of a kernel
  • testshell — Spawn a kernel test shell
  • update-build — Update a build.toml to the current format
  • skills — Install skills for AI coding assistants (Claude, Codex, OpenCode)
  • clean-pyproject — Clean generated artifacts

kernel-builder completions

Generate shell completions

Usage: kernel-builder completions <SHELL>

Arguments:
  • <SHELL>

    Possible values: bash, elvish, fish, powershell, zsh

kernel-builder init

Initialize a new kernel project from template

Usage: kernel-builder init [OPTIONS] [PATH]

Arguments:
  • <PATH> — Directory to initialize (defaults to current directory)
Options:
  • --license <LICENSE> — The kernel's license

    Default value: Apache-2.0

  • --name <OWNER/REPO> — Name of the kernel repo (e.g. drbh/my-kernel)

  • --backends <BACKENDS> — Backends to enable (all, cpu, cuda, metal, rocm, xpu)

  • --overwrite — Overwrite existing scaffold files (preserves other files)

kernel-builder build

Build the kernel locally (alias for build-and-copy)

Usage: kernel-builder build [OPTIONS] [KERNEL_DIR]

Arguments:
  • <KERNEL_DIR> — Directory of the kernel project (defaults to current directory)
Options:
  • --variant <VARIANT> — Build a specific variant
  • --max-jobs <MAX_JOBS> — Maximum number of parallel Nix build jobs
  • --cores <CORES> — Number of CPU cores to use for each build job
  • -L, --print-build-logs — Print full build logs on standard error

kernel-builder build-and-copy

Build the kernel and copy artifacts locally

Usage: kernel-builder build-and-copy [OPTIONS] [KERNEL_DIR]

Arguments:
  • <KERNEL_DIR> — Directory of the kernel project (defaults to current directory)
Options:
  • --max-jobs <MAX_JOBS> — Maximum number of parallel Nix build jobs
  • --cores <CORES> — Number of CPU cores to use for each build job
  • -L, --print-build-logs — Print full build logs on standard error

kernel-builder build-and-upload

Build the kernel and upload to Hugging Face Hub

Usage: kernel-builder build-and-upload [OPTIONS] [KERNEL_DIR]

Arguments:
  • <KERNEL_DIR> — Directory of the kernel project (defaults to current directory)
Options:
  • --variant <VARIANT> — Build a specific variant

  • --max-jobs <MAX_JOBS> — Maximum number of parallel Nix build jobs

  • --cores <CORES> — Number of CPU cores to use for each build job

  • -L, --print-build-logs — Print full build logs on standard error

  • --repo-id <REPO_ID> — Repository ID on the Hugging Face Hub (e.g. user/my-kernel)

  • --branch <BRANCH> — Upload to a specific branch (defaults to v{version} from metadata)

  • --private — Create the repository as private

  • --repo-type <REPO_TYPE> — Repository type on Hugging Face Hub (kernel by default, or model for legacy repos)

    Default value: kernel

    Possible values: model, kernel

  • --create-pr — Open a pull request with the changes rather than committing them directly (does not require write access to the repository). The target branch must already exist. An open pull request of an earlier upload by the same user is updated instead

  • --output-json <PATH> — Write a machine-readable JSON summary of the upload to this path

  • -q, --quiet — Suppress progress output

kernel-builder upload

Upload kernel build artifacts to the Hugging Face Hub

Usage: kernel-builder upload [OPTIONS] [KERNEL_DIR]

Arguments:
  • <KERNEL_DIR> — Directory of the kernel build (defaults to current directory)
Options:
  • --repo-id <REPO_ID> — Repository ID on the Hugging Face Hub (e.g. user/my-kernel). Defaults to general.hub.repo-id from build.toml

  • --branch <BRANCH> — Upload to a specific branch (defaults to v{version} from metadata)

  • --private — Create the repository as private

  • --repo-type <REPO_TYPE> — Repository type on Hugging Face Hub (kernel by default, or model for legacy repos)

    Default value: kernel

    Possible values: model, kernel

  • --create-pr — Open a pull request with the changes rather than committing them directly (does not require write access to the repository). The target branch must already exist. An open pull request of an earlier upload by the same user is updated instead

  • --output-json <PATH> — Write a machine-readable JSON summary of the upload to this path

  • -q, --quiet — Suppress progress output