Skip to main content

A simple CLI utility for Vulkan SDK operations

Project description

Vulkan Utils

Python 3.10+ License Version

A simple yet powerful command-line utility for managing Vulkan SDK operations. This tool simplifies downloading, installing, and managing Vulkan SDK versions across different platforms.

🚀 Features

  • Cross-platform support: Works on Linux, macOS, and Windows
  • Automatic platform detection: Intelligently detects your current platform
  • Version management: Download specific versions or always get the latest
  • Download-only mode: Download SDKs without installation for offline use
  • SHA verification: Built-in integrity checking for downloaded files
  • Progress tracking: Real-time download progress indicators
  • Smart installation: Platform-specific installation with helpful setup instructions

📦 Installation

Using uvx (One-time execution)

Run vulkan_utils directly without installing it globally:

# Run commands directly with uvx
uvx vulkan_utils install-sdk
uvx vulkan_utils latest-version
uvx vulkan_utils sdk-info

Using uv (Project installation)

uv add vulkan_utils

Using pip

pip install vulkan_utils

Development Installation

# Clone the repository
git clone https://github.com/your-username/vulkan_utils.git
cd vulkan_utils

# Install in development mode
uv sync

🛠️ Usage

After installation, the vulkan-utils command will be available in your terminal. Alternatively, you can run commands directly with uvx vulkan_utils without installing.

Basic Commands

# Show help
vulkan-utils --help
# or with uvx
uvx vulkan_utils --help

# Show version
vulkan-utils --version
# or with uvx
uvx vulkan_utils --version

Installing Vulkan SDK

Quick Start (Recommended)

# Download and install the latest Vulkan SDK for your platform
vulkan-utils install-sdk

# or run directly with uvx (no installation required)
uvx vulkan_utils install-sdk

Advanced Usage

# Install a specific version
vulkan-utils install-sdk --version 1.3.224.0
# or with uvx
uvx vulkan_utils install-sdk --version 1.3.224.0

# Install for a specific platform
vulkan-utils install-sdk --platform linux

# Install to a custom directory
vulkan-utils install-sdk --install-path /opt/vulkan-sdk

# Download only (don't install)
vulkan-utils install-sdk --download-only --install-path ./downloads

Getting Version Information

# Get the latest available version for your platform
vulkan-utils latest-version
# or with uvx
uvx vulkan_utils latest-version

# Get latest version for a specific platform
vulkan-utils latest-version --platform windows

# Get detailed SDK information
vulkan-utils sdk-info
# or with uvx
uvx vulkan_utils sdk-info

# Get info for a specific version
vulkan-utils sdk-info --version 1.3.224.0 --platform mac

🔧 Command Reference

install-sdk

Downloads and installs the Vulkan SDK.

Options:

  • --version: SDK version to download (default: "latest")
  • --platform: Target platform - linux, mac, windows, or auto (default: "auto")
  • --install-path: Installation directory (default: ~/vulkan-sdk)
  • --download-only: Only download, don't extract/install

Examples:

# Basic installation
vulkan-utils install-sdk
# or with uvx
uvx vulkan_utils install-sdk

# Specific version for Linux
vulkan-utils install-sdk --version 1.3.224.0 --platform linux
# or with uvx
uvx vulkan_utils install-sdk --version 1.3.224.0 --platform linux

# Download to custom location without installing
vulkan-utils install-sdk --download-only --install-path ./my-downloads

latest-version

Get the latest available Vulkan SDK version.

Options:

  • --platform: Target platform (default: auto-detect)

Examples:

vulkan-utils latest-version
# or with uvx
uvx vulkan_utils latest-version

vulkan-utils latest-version --platform windows

sdk-info

Get detailed information about a Vulkan SDK version.

Options:

  • --version: SDK version (default: "latest")
  • --platform: Target platform (default: auto-detect)

Examples:

vulkan-utils sdk-info
# or with uvx
uvx vulkan_utils sdk-info

vulkan-utils sdk-info --version 1.3.224.0

🖥️ Platform-Specific Notes

macOS

After installation, you may need to set environment variables if system-wide installation fails:

export VULKAN_SDK=~/vulkan-sdk
export PATH=$VULKAN_SDK/bin:$PATH
export DYLD_LIBRARY_PATH=$VULKAN_SDK/lib:$DYLD_LIBRARY_PATH
export VK_LAYER_PATH=$VULKAN_SDK/share/vulkan/explicit_layer.d

Add these to your ~/.zshrc or ~/.bash_profile for persistence.

Linux

Set the following environment variables:

export VULKAN_SDK=~/vulkan-sdk
export PATH=$VULKAN_SDK/bin:$PATH
export LD_LIBRARY_PATH=$VULKAN_SDK/lib:$LD_LIBRARY_PATH
export VK_LAYER_PATH=$VULKAN_SDK/share/vulkan/explicit_layer.d

Windows

Windows installations should work system-wide automatically. No additional configuration typically required.

🔍 Examples

Complete Workflow Example

# Check latest available version
vulkan-utils latest-version
# or with uvx
uvx vulkan_utils latest-version
# Output: Latest Vulkan SDK version for mac: 1.3.250.1

# Get detailed information about the latest SDK
vulkan-utils sdk-info
# or with uvx
uvx vulkan_utils sdk-info
# Output: 
# SDK Version: 1.3.250.1
# Platform: mac
# Filename: vulkan_sdk.zip
# Download URL: https://sdk.lunarg.com/sdk/download/latest/mac/vulkan_sdk.zip?Human=true
# SHA Hash: abc123...

# Download and install
vulkan-utils install-sdk
# or with uvx
uvx vulkan_utils install-sdk
# Downloads, extracts, and installs with progress indicators and platform-specific instructions

Download for Offline Installation

# Download multiple versions for different platforms
vulkan-utils install-sdk --version 1.3.250.1 --platform linux --download-only --install-path ./offline-sdks
vulkan-utils install-sdk --version 1.3.250.1 --platform windows --download-only --install-path ./offline-sdks
vulkan-utils install-sdk --version 1.3.250.1 --platform mac --download-only --install-path ./offline-sdks

# or with uvx (useful for CI/CD or one-time usage)
uvx vulkan_utils install-sdk --version 1.3.250.1 --platform linux --download-only --install-path ./offline-sdks
uvx vulkan_utils install-sdk --version 1.3.250.1 --platform windows --download-only --install-path ./offline-sdks
uvx vulkan_utils install-sdk --version 1.3.250.1 --platform mac --download-only --install-path ./offline-sdks

🧪 Development

Setting Up Development Environment

# Clone the repository
git clone https://github.com/your-username/vulkan_utils.git
cd vulkan_utils

# Install dependencies with uv
uv sync

# Run in development mode
uv run vulkan-utils --help

Running Tests

# Install development dependencies
uv sync --dev

# Run tests
uv run pytest

Code Style

This project follows Python best practices:

  • Type hints: Full type annotations using modern Python syntax
  • Documentation: NumPy-style docstrings for all public functions
  • Data validation: Pydantic models for robust data structures
  • Testing: pytest framework with fixtures for reusable test data
  • Dependency management: Uses uv for fast, reliable dependency resolution

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.

Development Guidelines

  1. Follow the existing code style and conventions
  2. Add type hints to all function parameters and return values
  3. Write comprehensive docstrings using NumPy format
  4. Use Pydantic models for data structures
  5. Write tests for new functionality using pytest
  6. Update documentation as needed

📝 License

This project is licensed under the MIT License - see the LICENSE file for details.

🆘 Support

If you encounter any issues or have questions:

  1. Check the Issues page
  2. Create a new issue with detailed information about your problem
  3. Include your platform, Python version, and error messages

🔗 Related Projects


Note: This tool is not affiliated with the Khronos Group or LunarG. It's a community tool designed to simplify Vulkan SDK management.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vulkan_utils-0.1.5.tar.gz (14.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vulkan_utils-0.1.5-py3-none-any.whl (13.0 kB view details)

Uploaded Python 3

File details

Details for the file vulkan_utils-0.1.5.tar.gz.

File metadata

  • Download URL: vulkan_utils-0.1.5.tar.gz
  • Upload date:
  • Size: 14.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.29

File hashes

Hashes for vulkan_utils-0.1.5.tar.gz
Algorithm Hash digest
SHA256 e81055e548ef5c7edc9b57a1a1cec0d0fdf9ae6e5c718517aebd7d1b7bfd607b
MD5 26d6cbf3610341a2dda4c2b17f19c4ce
BLAKE2b-256 3c529545b79b0e7336053ff2527e69060aab7283698da0edc3875c632d50a328

See more details on using hashes here.

File details

Details for the file vulkan_utils-0.1.5-py3-none-any.whl.

File metadata

File hashes

Hashes for vulkan_utils-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 beab4e3ecea8aaa982d468771ae64d3500f3e275f94ff61ea0d820c1d2545c32
MD5 7be6c2e18bb365ed7ec0b2762fcc3b11
BLAKE2b-256 88ba705e5d664e59192296acca50906054d70acec4f53aa8abf565e258cae92a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page