CLI Reference

Scikit-build-core has a few integrated CLI tools, useful for scaffolding a project and investigating your environment.

These are available through the scikit-build command (also runnable as python -m scikit_build_core), with the modules exposed as subcommands.

The scikit-build-core CLI provides the following commands:
  scikit-build build requires        Get the build requirements
  scikit-build build project-table   Get the project table (with dynamic metadata)
  scikit-build builder               Info about the system
  scikit-build builder wheel-tag     Info about the computed wheel tag
  scikit-build builder sysconfig     Info from sysconfig
  scikit-build file-api query        Request CMake file API
  scikit-build file-api reply        Process CMake file API
  scikit-build init                  Generate a starter project

Build utilities

usage: scikit-build build [-h] {requires,project-table} ...

Build backend utilities.

positional arguments:
  {requires,project-table}
                        Commands
    requires            Get the build requirements
    project-table       Get the full project table, including dynamic metadata

options:
  -h, --help            show this help message and exit

Build requirements

usage: scikit-build build requires [-h] [--mode {sdist,wheel,editable}]

Includes the static build requirements, the dynamically generated ones, and
dynamic-metadata ones.

options:
  -h, --help            show this help message and exit
  --mode {sdist,wheel,editable}
                        The build mode to get the requirements for

Example:

$ scikit-build build requires
[
  "cmake>=3.15",
  "ninja>=1.5",
  "scikit-build-core"
]

Project table

usage: scikit-build build project-table [-h]
                                        [--state {sdist,wheel,editable,metadata_wheel,metadata_editable}]

Processes static and dynamic metadata without triggering the backend, only
handles scikit-build-core's dynamic metadata.

options:
  -h, --help            show this help message and exit
  --state {sdist,wheel,editable,metadata_wheel,metadata_editable}
                        The build state reported to [[tool.dynamic-metadata]]
                        providers

Example:

$ scikit-build build project-table
{
  "name": "example",
  "version": "0.0.1"
}

Building environment info

usage: scikit-build builder [-h] {wheel-tag,sysconfig} ...

Info about the system and build environment.

positional arguments:
  {wheel-tag,sysconfig}
                        Commands
    wheel-tag           Get the computed wheel tag for the current environment
    sysconfig           Print information about the Python environment

options:
  -h, --help            show this help message and exit

Example:

$ scikit-build builder
Scikit-build-core 0.12.3.dev166+g293e093e9 on Python 3.14.6 (main, Jun 25 2026, 18:32:52) [GCC 13.2.0]
Detected Python Library: /home/docs/.asdf/installs/python/3.14.6/lib/libpython3.14.so
Detected ABI3 Python Library: /home/docs/.asdf/installs/python/3.14.6/lib/libpython3.14.so
Detected ABI3T Python Library: /home/docs/.asdf/installs/python/3.14.6/lib/libpython3.14.so
Detected Python Include Directory: /home/docs/.asdf/installs/python/3.14.6/include/python3.14
Detected NumPy Include Directory: /home/docs/checkouts/readthedocs.org/user_builds/scikit-build-core/envs/latest/lib/python3.14/site-packages/numpy/_core/include
Detected Platform: linux-x86_64
Detected SOABI: cpython-314-x86_64-linux-gnu
Detected ABI3 SOABI: abi3
Detected ABI3T SOABI: abi3t
Detected ABI flags: 
Default Wheel Tag: cp314-cp314-linux_x86_64
 - Note: use scikit-build builder wheel-tag -h for further options
Detected CMake and Ninja (all versions):

Wheel tag

usage: scikit-build builder wheel-tag [-h] [--archs [ARCHS ...]] [--abi ABI]
                                      [--purelib]

Get the computed wheel tag for the current environment.

options:
  -h, --help           show this help message and exit
  --archs [ARCHS ...]  Specify one or more archs (macOS only currently)
  --abi ABI            Specify py-api, like 'cp38', 'cp315t', or 'py3'
  --purelib            Specify a non-platlib (pure) tag

Example:

$ scikit-build builder wheel-tag
cp314-cp314-linux_x86_64

Sysconfig

usage: scikit-build builder sysconfig [-h]

Print information about the Python environment.

options:
  -h, --help  show this help message and exit

File API tools

usage: scikit-build file-api query [-h] build_dir

Write a stateless query to a build directory.

positional arguments:
  build_dir   Path to the build directory

options:
  -h, --help  show this help message and exit
usage: scikit-build file-api reply [-h] reply_dir

Read a query written out to a build directory.

positional arguments:
  reply_dir   Path to the reply directory

options:
  -h, --help  show this help message and exit

Starter projects

The init command generates a minimal CMake + scikit-build-core project for the selected binding backend. Run it without --backend to pick one interactively.

usage: scikit-build init [-h]
                         [--backend {pybind11,nanobind,c,cython,swig,fortran,abi3,abi3t}]
                         [--name NAME] [--force]
                         [directory]

Generate a minimal CMake + scikit-build-core starter project.

positional arguments:
  directory             Directory to create the project in (default: current
                        directory)

options:
  -h, --help            show this help message and exit
  --backend {pybind11,nanobind,c,cython,swig,fortran,abi3,abi3t}
                        Binding backend to use (prompts interactively if
                        omitted)
  --name NAME           Project name (default: derived from the directory
                        name)
  --force               Generate into a non-empty directory