Skip to main content

scadm - OpenSCAD Dependency Manager

scadm is a lightweight, python-based dependency manager for OpenSCAD projects. It simplifies installing OpenSCAD (nightly or stable) and managing library dependencies through a simple scadm.json file.

Features

  • 🚀 Install OpenSCAD: Automatically downloads and installs OpenSCAD (nightly or stable builds)
  • 📦 Manage Libraries: Install OpenSCAD libraries (BOSL2, MCAD, custom libraries) from GitHub
  • 🔄 Version Tracking: Keeps dependencies in sync with your project
  • 📋 Simple Config: Define dependencies in a single scadm.json file

Installation

Requirements: Python 3.11 or newer

pip install scadm

Quick Start

1. Create scadm.json in your project root

{
  "dependencies": [
    {
      "name": "BOSL2",
      "repository": "BelfrySCAD/BOSL2",
      "version": "266792b2a4bbf7514e73225dfadb92da95f2afe1",
      "source": "github"
    }
  ]
}

2. Install OpenSCAD and dependencies

scadm install

This will:

  • Download and install OpenSCAD to bin/openscad/
  • Install all libraries defined in scadm.json to bin/openscad/libraries/

Usage

Check version

scadm --version

Install everything (OpenSCAD + libraries)

scadm install                # Install based on scadm.json config (default: nightly latest)

[!NOTE] By default, scadm installs the latest nightly build of OpenSCAD. Configure the build type and version in scadm.json (see Configuration). Nightly builds are recommended since the stable release (2021.01) is outdated and missing modern features.

Show version info

scadm install --info         # Show configured, resolved, and installed versions

Check installation status

scadm install --check

Force reinstall

scadm install --force

Install only OpenSCAD

scadm install --openscad-only

Install only libraries

scadm install --libs-only

Flatten .scad files

Flatten include trees into single files, useful for platforms that require single-file uploads (e.g. MakerWorld Customizer).

# Single file
scadm flatten models/core/parts/connector.scad -o out/connector.scad

# Batch-flatten all files configured in scadm.json
scadm flatten --all

# Compute transitive dependency checksum (for caching)
scadm flatten --checksum models/core/parts/connector.scad

Batch mode reads "flatten" entries from scadm.json:

{
  "flatten": [
    {"src": "models/core/parts", "dest": "models/core/flattened"}
  ]
}

Unchanged files are skipped via SHA256 checksums stored in models/.flatten-checksums (gitignored; cached in CI).

File structure conventions

The flattener expects source .scad files to follow OpenSCAD Customizer conventions:

Root files (the files being flattened):

  1. Parameter sections: /* [SectionName] */ blocks with customizable variables
  2. Hidden section: /* [Hidden] */ with constants/variables hidden from the Customizer UI
  3. Main code: module/function calls that generate geometry

Variable placement rules:

  • Variables inside /* [SectionName] */ blocks → preserved in their respective sections
  • Variables in /* [Hidden] */ section → included in the Hidden section
  • In root files, place top-level variables inside a section block (/* [Hidden] */ or named) so they are preserved reliably during flattening
  • In library files, variables may appear anywhere, the flattener collects them regardless of position

Library files (resolved via include <...>):

  • May contain module/function definitions, constants, and variables in any order
  • Section markers (/* [SectionName] */) in library files are silently ignored, only root file sections are preserved in the output
  • Only effectively used definitions (modules, functions, variables) from the dependency chain are included, unused code is omitted
  • Library variables appear in the Hidden section with an origin comment (e.g. // --- from constants.scad ---)

Render .scad files

Validate .scad files by rendering them through the bundled OpenSCAD binary. "Rendering" means compiling the .scad source into a binary STL, which validates syntax, geometry, and that all includes resolve correctly. A non-zero exit code means something is broken.

# Explicit files
scadm render models/core/parts/connector.scad
scadm render file1.scad file2.scad

# Render flattened output files (from scadm.json flatten dest dirs)
scadm render --flattened

# Render source files that feed into flatten (from scadm.json flatten src dirs)
scadm render --source

# Both at once
scadm render --source --flattened

# Control parallelism (default: number of CPU cores)
scadm render --flattened -j 4

Renders run in parallel by default, using one thread per CPU core. Use -j/--jobs to override the worker count (e.g. -j 1 for sequential execution, -j 4 to cap at 4 workers).

The --source and --flattened flags discover files from scadm.json "flatten" entries automatically. They cannot be combined with explicit file arguments.

Configure VS Code extensions

These are opinionated QoL improvements to install nifty VSCode extensions which improve DevEx.

scadm vscode --openscad   # Install and configure OpenSCAD extension
scadm vscode --python     # Install and configure Python extension

OpenSCAD extension will:

  • Install the Leathong.openscad-language-support extension
  • Configure VS Code settings with correct OpenSCAD paths
  • Merge with existing settings (preserves unrelated configurations)

Python extension will:

  • Install the ms-python.python extension
  • Configure default interpreter path to ${workspaceFolder}/.venv (eliminates need to manually source venv when opening project)

[!NOTE] Settings are opinionated defaults designed to streamline development experience. They're configured in .vscode/settings.json (workspace-level), not globally.

[!IMPORTANT] Requires VS Code CLI (code command) to be available in PATH. If not found, you'll receive installation instructions.

Configuration

scadm.json Schema

{
  "openscad": {
    "type": "nightly",
    "version": "latest"
  },
  "dependencies": [
    {
      "name": "BOSL2",
      "repository": "BelfrySCAD/BOSL2",
      "version": "266792b2a4bbf7514e73225dfadb92da95f2afe1",
      "source": "github"
    },
    {
      "name": "homeracker",
      "repository": "kellerlabs/homeracker",
      "version": "homeracker-v1.7.3",
      "source": "github"
    }
  ]
}

OpenSCAD fields (optional, defaults to nightly/latest if omitted):

  • type: "nightly" (default) or "stable", which build channel to use
  • version: "latest" (default) or a pinned version string (e.g., "2026.03.28")
    • "latest" resolves dynamically by scraping the OpenSCAD snapshots page (nightly) or the GitHub releases API (stable)
    • Pinned versions are used as-is without network access
    • Resolved versions are cached in bin/openscad/.resolved-version; use --force to bypass cache

Dependency fields:

  • name: Library name (creates bin/openscad/libraries/{name}/)
  • repository: GitHub repository in owner/repo format
  • version: Git tag, commit SHA, or branch name
  • source: Currently only "github" is supported

Directory Structure

After running scadm, your project will have:

your-project/
├── scadm.json
├── models/
│   └── your_model.scad
└── bin/openscad/
    ├── openscad.exe (or openscad appimage)
    └── libraries/
        ├── BOSL2/
        └── homeracker/

Use in OpenSCAD Files

include <BOSL2/std.scad>
include <homeracker/core/lib/connector.scad>

// Your code here

Renovate Integration

Keep your scadm.json dependencies automatically updated with Renovate:

Add this preset to your renovate.json:

{
  "extends": [
    "github>kellerlabs/homeracker:renovate-dependencies"
  ]
}

This preset enables automatic updates for:

  • Git commit SHAs (for tracking main/master branches)
  • Semantic version tags (v1.2.3)

License

MIT

Contributing

Issues and pull requests are welcome at kellerlabs/homeracker.

Release files for scadm 0.10.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for scadm 0.10.1
File Size Uploaded
scadm-0.10.1.tar.gz 39.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for scadm 0.10.1
File Interpreter ABI Platform
scadm-0.10.1-py3-none-any.whl Python 3 none any Details

Total release size: 67.5 kB

Release files / scadm-0.10.1.tar.gz

Download URL scadm-0.10.1.tar.gz
Size 39.7 kB
Tags Source
SHA-256 checksum
How to use checksums
d362984e5f7de4a5854a2e91606d920cb3baf598b2583923e6d180302240140b
BLAKE2b-256 checksum
How to use checksums
11b05d4b79e40c4a29c7690fd4c59fec58f43e50aad4d8710fa63b6a60fdc454
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 14, 2026.

Transparency log

Release files / scadm-0.10.1-py3-none-any.whl

Download URL scadm-0.10.1-py3-none-any.whl
Size 27.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7e8cbf57721f5e1fbc5486acaaf97e64afc84c8e9cf71a57787ecec6c5d8cf27
BLAKE2b-256 checksum
How to use checksums
7d0b7f6a1bedb1b38ca4980541fdf3c46656d32401a1eb24c4e46cd26fd77770
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 14, 2026.

Transparency log

Release history Release notifications | RSS feed

0.11.0

2 release files

This release

0.10.1 This release

2 release files

0.9.0

2 release files

0.8.0

2 release files

0.7.0

2 release files

0.6.3

2 release files

0.6.2

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.3

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.11

2 release files

0.4.9

2 release files

0.4.8

2 release files

0.4.7

2 release files

0.4.6

2 release files

0.4.5

2 release files

0.4.4

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.1

2 release files

0.2.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page