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 testshell↴kernel-builder update-build↴kernel-builder skills↴kernel-builder skills add↴kernel-builder clean-pyproject↴Build Hugging Face Hub kernels
Usage: kernel-builder <COMMAND>
completions — Generate shell completionsinit — Initialize a new kernel project from templatebuild — Build the kernel locally (alias for build-and-copy)build-and-copy — Build the kernel and copy artifacts locallybuild-and-upload — Build the kernel and upload to Hugging Face Hubupload — Upload kernel build artifacts to the Hugging Face Hubcheck-config — Validate the build.toml filecheck-abi — Check the ABI compatibility of a kernel extensioncheck-builds — Validate kernel buildscreate-pyproject — Generate CMake files for a kernel extension builddevshell — Spawn a kernel development shelllist-variants — List build variantstestshell — Spawn a kernel test shellupdate-build — Update a build.toml to the current formatskills — Install skills for AI coding assistants (Claude, Codex, OpenCode)clean-pyproject — Clean generated artifactsGenerate shell completions
Usage: kernel-builder completions <SHELL>
<SHELL>
Possible values: bash, elvish, fish, powershell, zsh
Initialize a new kernel project from template
Usage: kernel-builder init [OPTIONS] [PATH]
<PATH> — Directory to initialize (defaults to current directory)--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, neuron, rocm, xpu)
--overwrite — Overwrite existing scaffold files (preserves other files)
Build the kernel locally (alias for build-and-copy)
Usage: kernel-builder build [OPTIONS] [KERNEL_DIR]
<KERNEL_DIR> — Directory of the kernel project (defaults to current directory)--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 errorBuild the kernel and copy artifacts locally
Usage: kernel-builder build-and-copy [OPTIONS] [KERNEL_DIR]
<KERNEL_DIR> — Directory of the kernel project (defaults to current directory)--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 errorBuild the kernel and upload to Hugging Face Hub
Usage: kernel-builder build-and-upload [OPTIONS] [KERNEL_DIR]
<KERNEL_DIR> — Directory of the kernel project (defaults to current directory)--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
-q, --quiet — Suppress progress output
Upload kernel build artifacts to the Hugging Face Hub
Usage: kernel-builder upload [OPTIONS] [KERNEL_DIR]
<KERNEL_DIR> — Directory of the kernel build (defaults to current directory)--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
-q, --quiet — Suppress progress output
Validate the build.toml file
Usage: kernel-builder check-config [KERNEL_DIR]
<KERNEL_DIR>Check the ABI compatibility of a kernel extension
Usage: kernel-builder check-abi [OPTIONS] [KERNEL_DIR]
<KERNEL_DIR> — Directory with kernels-m, --manylinux <VERSION> — Manylinux version
Default value: manylinux_2_28
--macos <VERSION> — macOS version
Default value: 15.0
-p, --python-abi <VERSION> — Python ABI version
Default value: 3.9
--torch-stable-abi <VERSION> — Torch stable ABI version
Validate kernel builds
Usage: kernel-builder check-builds [KERNEL_DIR]
<KERNEL_DIR>Generate CMake files for a kernel extension build
Usage: kernel-builder create-pyproject [OPTIONS] [KERNEL_DIR] [TARGET_DIR]
<KERNEL_DIR><TARGET_DIR> — The directory to write the generated files to (directory of BUILD_TOML when absent)-f, --force — Force-overwrite existing files--unique-id <UNIQUE_ID> — This is an optional unique identifier that is suffixed to the kernel name to avoid name collisions. (e.g. Git SHA)Spawn a kernel development shell
Usage: kernel-builder devshell [OPTIONS] [KERNEL_DIR]
<KERNEL_DIR>--variant <VARIANT> — Use 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 errorList build variants
Usage: kernel-builder list-variants [OPTIONS] [KERNEL_DIR]
<KERNEL_DIR>--arch — Only list variants for the current architectureSpawn a kernel test shell
Usage: kernel-builder testshell [OPTIONS] [KERNEL_DIR]
<KERNEL_DIR>--variant <VARIANT> — Use 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 errorUpdate a build.toml to the current format
Usage: kernel-builder update-build [KERNEL_DIR]
<KERNEL_DIR>Install skills for AI coding assistants (Claude, Codex, OpenCode)
Usage: kernel-builder skills <COMMAND>
add — Install a kernels skill for an AI assistantInstall a kernels skill for an AI assistant
Usage: kernel-builder skills add [OPTIONS]
--skill <SKILL> — Skill to install
Default value: cuda-kernels
Possible values: cuda-kernels, rocm-kernels, xpu-kernels
--claude — Install for Claude
--codex — Install for Codex
--opencode — Install for OpenCode
-g, --global — Install globally (user-level) instead of in the current project directory
--dest <DEST> — Install into a custom destination (path to skills directory)
--force — Overwrite existing skills in the destination
Clean generated artifacts
Usage: kernel-builder clean-pyproject [OPTIONS] [KERNEL_DIR] [TARGET_DIR]
<KERNEL_DIR><TARGET_DIR> — The directory to clean from (directory of BUILD_TOML when absent)-d, --dry-run — Show what would be deleted without actually deleting-f, --force — Force deletion without confirmation--ops-id <OPS_ID> — This is an optional unique identifier that is suffixed to the kernel name to avoid name collisions. (e.g. Git SHA)clap-markdown. Update on GitHub