Skip to main content

Creating auto install scripts from YAML config files

Features

  • Pydantic-like Schema validation: the YAML schema has precise syntax and the build pipeline will yield warnings or stop if your file has errors in it
  • A set of CLIs to interact with config files:
    • yamlrun shows the commands
    • yamlrun script is the script building subcommand
    • yamlrun upload is the script temp hosting subcommand
    • yamlrun pack locates a setup.yml file within the current directory and runs all the commands.

An explanation

Running the command

yamlrun ?

Or equivalently yamlrun explain will output this explanation in the terminal:


The setup file


The YAML setup file (which can also be JSON), is a way for you to describle exactly what type of package/program you want to auto-install using a single installer.


File structure


The file is structured in the following way:

<task name 1>:
    description: <textual description if you wish, OPTIONAL>
    items:
        <item name 1>:
            description: <textual description if you wish, OPTIONAL>
            type: <type description, if it's a CLI, GUI, what purpose, REQUIRED>
            priority: <how important it is to install it within the setup REQUIRED>
            commands:
                - <powershell line 1>
                - <powershell line 2>
        <item name 2>:
            ...
        <item name 3>:
            ...
    run:
        # order in which the items are going to be installed
        steps:
            - <item name 1>
            - <item name 3> # look you just swapped the order !
            - <item name 2>
<task name 2>:
    ...
<task name 3>:
    ...

Script & Executable Builder


Two options:

(1) One-liner script install. This script is equivalent to:

  • Building the PS1 core script yamlrun script build <task> <path/to/setup.yml>
  • Uploading the PS1 core script yamlrun upload f <path/to/setup.ps1>
  • The previous step should give you an URL of the kind http://ix.io/
  • Your resulting one liner is just:
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser -Force ; irm <url> | iex

this is the yamlrun script BOL or yamlrun script build-one-liner command.

(2) Doing any of the steps above on its own.

Sample setup file

You can peek at the contents of this setup.yml file.

The resulting script from calling yamlrun script build is the setup.ps1 file.

Finally, calling yamlrun setup render <name> will generate a markdown formatted version of your setup file like setup.md

Installation

Just pip install it if you have it, but an executable is underway 😎

pip install yaml-scripts

Metadata

Release files for yaml-scripts 0.1.1.post1

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

Source distribution (sdist)

Source distribution for yaml-scripts 0.1.1.post1
File Size Uploaded Provenance Actions
yaml_scripts-0.1.1.post1.tar.gz 7.4 kB Without provenance Details for yaml_scripts-0.1.1.post1.tar.gz

Built distribution (wheel)

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

Total release size: 16.0 kB

Release files / yaml_scripts-0.1.1.post1.tar.gz

Download URL yaml_scripts-0.1.1.post1.tar.gz
Size 7.4 kB
Tags Source
SHA-256 checksum
How to use checksums
42ed8c9c07331bf55ebf91f04687cdd92b513908a77ab36f52b20f6b44f8bb27
BLAKE2b-256 checksum
How to use checksums
1195a9fe1cd869a29a021bca83ba1250eb440e6f9c14525b55566d1f16044a21
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.3.2 CPython/3.9.13 Windows/10

Release files / yaml_scripts-0.1.1.post1-py3-none-any.whl

Download URL yaml_scripts-0.1.1.post1-py3-none-any.whl
Size 8.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8546e31ab43d3215e4823abd991c33d831c88de20fa7c94039e16b2156741df0
BLAKE2b-256 checksum
How to use checksums
4ae23a68f553dbd52c982377071e799223d304a419674b01b77245cf43606038
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.3.2 CPython/3.9.13 Windows/10

Security for yaml-scripts 0.1.1.post1

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

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