Skip to content

azohra/strapped.sh

Repository files navigation

logo

Build StatusLicenseIssues


Introduction

Strapped.sh aims to be a universal platform for computer configuration management. Written purely in sh and having no physical dependancies, Strapped.sh maintains a minimal footprint by operating as a SaaS which remotely sources the files it needs on demand.

At a high level view, Strapped.sh acts as a console command orchestrator. These commands are implemented by something we call straps. Simply write a yml configuration file containing any number of these straps and let Strapped.sh do the rest.

An example of a full computer configuration file can be seen here.

🔫 #StayStrapped

Installation

To install strapped.sh, simply run this command:

curl -s https://stay.strapped.sh | sh

Upgrading strapped.sh can be done by re-running the installation command above or in the following way:

strapped --upgrade

Here are all the command-line flags for strapped.sh (if that's your thing):

Usage: strapped [flags]

flags:
  -u, --upgrade                  upgrade strapped to the latest version
  -v, --version                  print the current strapped version
  -a, --auto                     do not prompt for confirmation
  -y, --yml                      path to a valid strapped yml config [type: file path or url]
  -s, --straps                   run a subset of your config. Comma seperated
  -h, --help                     prints this message

Usage

To strap your computer, simply run strapped and point to your strap config file with the -y or --yml flag

strapped -y my_config.yml

You can even pass the URL to a remotely stored config file!

strapped -y https://www.example.com/my_config.yml

About Configuration Files

Configuration files are used as a blueprint for your computer's configuration. These files are composed of various straps which each serve different purposes. Straps themselves are implemented by routines that form the functionality of the strap.

Lets take a look at a config file:

# You must specify the repo that strapped.sh will source its straps from
# this can be in the form of a URL or a link to a local repo.
# By default, straps will be sourced from this repository, but you can link
# strapped to any repo that implements strapped functionality.
strapped:
  repo: https://raw.githubusercontent.com/azohra/strapped/master/straps

# Use the brew strap (specifically v0.1.0) to tap taps and install packages and casks
brew:
  version: v0.1.0
  # Tap routine
  taps:
    - { name: homebrew/core }
  # Packages routine
  packages:
    - { name: terraform }
  # Casks routine
  casks:
    - { name: visual-studio-code }

# Use the git strap to clone repos into a specific directory.
# Since we have not specified a strap version it will search for the 
# latest version in the globally specified strapped repo
git:
  clone:
    - { repo: [email protected]:kelseyhightower/nocode.git, folder: ~/repos }

# Install vscode extensions using latest version of the visual_studio_code strap
visual_studio_code:
  extensions:
    - { name: PKief.material-icon-theme }

The complete list of straps and their usage can be found here.

Contributing

We are open to anyone contributing to this repo. Please ensure you follow the code of conduct.

If you wish to contribute and don't know where to start, check out the issues section for inspiration.

License

Strapped.sh is licensed under the MIT license.


Made with ❤️ by Azohra