Skip to main content

szcdfi

The cross-platform installer for the szcdf dotfiles framework.

szcdfi reads a .szcdfis manifest. It provisions files into your config root. It is one engine for every shell and every platform.

  • It is a standalone Python package.
  • It uses only the Python standard library. It has no third-party run-time dependencies.
  • You run it with uv. uv supplies a managed Python. You do not need a system Python.

See ADR-0003 for the decision behind this design.

Prerequisite: uv

You need uv. Install it one time.

  • On Windows:

    winget install astral-sh.uv
    
  • On macOS or Linux:

    curl -LsSf https://astral.sh/uv/install.sh | sh
    

How to run szcdfi

Go to your szcdf package directory first. The package directory holds the .szcdfis manifest.

  • To run the latest version one time:

    uvx szcdfi@latest
    
  • To install a persistent command:

    uv tool install szcdfi
    szcdfi
    

The installer does these steps:

  1. It finds your config root.
  2. It reads the manifest.
  3. It shows you the planned changes.
  4. It asks you to continue. (Use -I to skip the question.)
  5. It applies the changes.

Options

Option Effect
-p, --package-dir <dir> Set the package directory. The default is the current directory, searched upward for a .szcdfis.
-s, --spec <file> Set the manifest file.
-m, --mode quick|custom quick confirms once. custom confirms each step. The default is quick.
-I, --non-interactive Apply without a question. Use this for scripts and CI.
-e, --editable Make symbolic links instead of copies. Use this for development.
-g, --guard <id> Set a guard token. Repeat the option for more than one. This overrides the platform default.
-n, --dry-run Show the plan only. Change nothing.
-V, --version Show the version.

The config root

The installer writes into one config root. It finds the root in this order:

  • Use ~/.config/szcdf if that directory exists.
  • Else use ~/.szcdf if that directory exists.
  • Else create ~/.config/szcdf and use it.

In a manifest, $CONFIG_ROOT means this root. $HOME means your home directory.

The manifest: .szcdfis

A manifest is a list of lines. Each line is a directive, a guarded directive, or a comment.

Directives

  • COPY <source> <dest>
    • It copies one file or one directory.
    • <source> is relative to the package directory.
    • <dest> can use $CONFIG_ROOT and $HOME.
  • COPYALL <source_dir> <dest_dir>
    • It copies each direct child of <source_dir> into <dest_dir>.
    • It is not recursive at the top level. A child directory copies as a unit.
  • PREPENDTEXT <source> <dest> <section_id> [comment]
    • It adds a managed section to the top of <dest>.
    • <source> supplies the section body.
    • [comment] is the comment marker. The default is #.
  • APPENDTEXT <source> <dest> <section_id> [comment]
    • It adds a managed section to the end of <dest>.
    • The arguments match PREPENDTEXT.

A managed section has two markers:

# >>>>>>> SZCDF_GENERATED_TEXT // BEGIN SECTION_ID=<id> // DO NOT EDIT MANUALLY
...your section body...
# <<<<<<< SZCDF_GENERATED_TEXT // END SECTION_ID=<id> // DO NOT EDIT MANUALLY

A re-run updates the body between the markers. It keeps the section in place. It does not add a second copy.

The guard model

One manifest serves every shell and every platform. A guard controls this.

  • A line with no guard is shared. Every installer applies it.
  • A line #@<guard> <directive> ... is guarded.
    • The installer applies it only when <guard> is in the active guard set.
    • To every other installer, the line is a comment.
  • A line # ... is an ordinary comment. Every installer ignores it.

The active guard set has a default. The default depends on the platform.

  • On Windows: pwsh, powershell, windows, nt, win.
  • On macOS: bash, sh, zsh, posix, unix, darwin, macos, mac, osx.
  • On Linux: bash, sh, zsh, posix, unix, linux.

Use --guard to set the active guard set yourself.

Example:

COPYALL src/core-modules $CONFIG_ROOT/modules
#@bash PREPENDTEXT src/entry-bash.sh $HOME/.bashrc ENTRY-BASH
#@pwsh PREPENDTEXT src/entry-pwsh.ps1 $PROFILE ENTRY-PWSH

Text handling

The installer writes text with strict rules. The rules keep managed files correct on every platform.

  • It writes UTF-8. It never writes a byte order mark (BOM).
  • It keeps the line ending of the destination file.
    • A CRLF file stays CRLF.
    • A LF file stays LF.
    • A new file uses LF.
  • It puts each marker on its own line.

Development

Run the tests with uv or the Makefile:

make test

Run the tests with coverage:

make test-coverage

The tests cover the directive engine, the guard parser, and the text-handling rules. They include regression tests for known parity bugs: a BOM, an ANSI read, CRLF normalization, and a glued END marker. CI runs the suite on Windows, macOS and Linux, and gates on a coverage minimum set in pyproject.toml.

Versioning and release

The version has one source of truth: __version__ in src/szcdfi/__init__.py. bump-my-version keeps it and the [tool.bumpversion] block in pyproject.toml in step. Three workflows run the release:

  • Tests (tests.yml): runs on every push and pull request.
  • Bump Version (bumpversion.yml): on a merge to main, it reads the merged pull request's label to pick the bump part.
    • bumpversion=major, bumpversion=minor, bumpversion=patch, or bumpversion=none.
    • No label means a patch bump.
    • It commits the bump and pushes a vX.Y.Z tag.
  • Publish to PyPI (publish.yml): after a successful Bump Version run, it publishes the one new tag. You can also run it by hand with an exact tag.
    • It checks that the tag matches the version in the tree.
    • It publishes with PyPI Trusted Publishing. It then makes a GitHub pre-release.

To make a release:

  1. Merge a pull request to main with the right bumpversion=* label.
  2. Bump Version tags the new version.
  3. Publish to PyPI uploads it.

To bump the version by hand, for local use:

make bump-version PART=patch

Metadata

Release files for szcdfi 0.1.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 szcdfi 0.1.1
File Size Uploaded Provenance Actions
szcdfi-0.1.1.tar.gz 13.1 kB With provenance Details for szcdfi-0.1.1.tar.gz

Built distribution (wheel)

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

Total release size: 28.4 kB

Release files / szcdfi-0.1.1.tar.gz

Download URL szcdfi-0.1.1.tar.gz
Size 13.1 kB
Tags Source
SHA-256 checksum
How to use checksums
647a8c2771c0c1f0217f4c1b166f33dfd7892b2567f2ff92ab091dd72d3bf3fe
BLAKE2b-256 checksum
How to use checksums
4a5bbea06fe7f903124ad32ba95f4027835d8f8ff93824ffe8e4c3bf12f650b4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 23, 2026.

Transparency log

Release files / szcdfi-0.1.1-py3-none-any.whl

Download URL szcdfi-0.1.1-py3-none-any.whl
Size 15.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
401a1ea64382eb57220a0dad895b4c1a4c1c50fcc00d9b70ac8d210ce7715481
BLAKE2b-256 checksum
How to use checksums
dda039ceb8b4d173877c28d219c183da27e0cb69e2f81a616941362aef1c8f58
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 23, 2026.

Transparency log

Security for szcdfi 0.1.1

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for szcdfi-0.1.1.tar.gz

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 Nov 23, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files Full provenance

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