Convert Figma logo to code with AI

MikeMcQuaid logostrap

👢 Bootstrap your macOS development system.

2,190
227
2,190
0

Top Related Projects

40,745

🍺 The missing package manager for macOS (or Linux)

📦 Bundler for non-Ruby dependencies from Homebrew, Homebrew Cask and the Mac App Store.

8,492

A shell script to set up a macOS laptop for web and mobile development.

@holman does dotfiles

🍻 A CLI workflow for the administration of macOS applications distributed as binaries

Quick Overview

Strap is a script designed to bootstrap a minimal macOS development system. It automates the process of setting up a new Mac for development, including installing essential tools, configuring system preferences, and setting up common development environments.

Pros

  • Saves time and effort in setting up a new Mac for development
  • Ensures consistency across different machines and team members
  • Customizable to fit specific development needs
  • Includes security best practices out of the box

Cons

  • Limited to macOS systems only
  • May require some customization for specific use cases
  • Could potentially overwrite existing configurations if not used carefully
  • Requires some familiarity with command-line tools and macOS

Getting Started

To get started with Strap, follow these steps:

  1. Open Terminal on your Mac.
  2. Run the following command to download and execute the Strap script:
bash -c "$(curl -fsSL https://raw.githubusercontent.com/MikeMcQuaid/strap/master/bin/strap.sh)"
  1. Follow the on-screen prompts to complete the setup process.
  2. Optionally, create a .Brewfile in your home directory to customize the packages and applications installed by Homebrew.

Note: It's recommended to review the script and understand what it does before running it on your system. You can also fork the repository and customize it to fit your specific needs before running it.

Competitor Comparisons

40,745

🍺 The missing package manager for macOS (or Linux)

Pros of brew

  • Comprehensive package management system for macOS
  • Large community and extensive package repository
  • Supports multiple programming languages and tools

Cons of brew

  • More complex setup process
  • Requires more system resources
  • Can potentially conflict with system-installed packages

Code Comparison

strap:

#!/bin/bash
set -e

# Check for Xcode Command Line Tools
xcode-select --install 2>/dev/null || true

# Install Homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

brew:

class Formula
  def install
    system "./configure", "--prefix=#{prefix}"
    system "make", "install"
  end
end

strap is a lightweight script focused on bootstrapping a macOS system with essential tools, including Homebrew. It provides a quick and straightforward setup process.

brew, on the other hand, is a full-featured package manager with a more complex codebase. It offers a wide range of functionalities for installing, updating, and managing packages on macOS.

While strap is designed for initial system setup, brew is intended for ongoing package management and maintenance. strap can be seen as a precursor to using brew, as it includes the installation of Homebrew itself.

📦 Bundler for non-Ruby dependencies from Homebrew, Homebrew Cask and the Mac App Store.

Pros of homebrew-bundle

  • Focused specifically on managing Homebrew packages and dependencies
  • Integrates seamlessly with existing Homebrew workflows
  • Allows for easy sharing and versioning of Brewfile configurations

Cons of homebrew-bundle

  • Limited to Homebrew-related tasks and package management
  • Requires manual setup and configuration of other system settings
  • Less comprehensive for full system bootstrapping

Code Comparison

homebrew-bundle:

brew "git"
cask "visual-studio-code"
mas "Xcode", id: 497799835

strap:

#!/bin/bash
set -e

# Install Homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Summary

homebrew-bundle is a specialized tool for managing Homebrew packages and dependencies, offering seamless integration with existing Homebrew workflows. It excels in package management but is limited in scope compared to strap. strap, on the other hand, provides a more comprehensive system bootstrapping solution, automating various setup tasks beyond just package management. While homebrew-bundle offers easier sharing of package configurations, strap offers a broader range of system setup capabilities.

8,492

A shell script to set up a macOS laptop for web and mobile development.

Pros of laptop

  • More comprehensive setup, including additional development tools and languages
  • Customizable through a ~/.laptop.local file for personal preferences
  • Supports both macOS and Linux operating systems

Cons of laptop

  • Less focused on security and automation compared to strap
  • May install more software than necessary for some users
  • Requires manual execution and interaction during setup

Code comparison

laptop:

fancy_echo "Installing Homebrew ..."
  if ! command -v brew >/dev/null; then
    curl -fsS \
      'https://raw.githubusercontent.com/Homebrew/install/master/install' | ruby
  fi

strap:

if [[ ! -f "$STRAP_BREWFILE" ]]
then
  STRAP_ISSUES="$STRAP_ISSUES
You have no Brewfile at $STRAP_BREWFILE!"
  return 1
fi

Summary

laptop is a more comprehensive setup tool that supports both macOS and Linux, offering a wider range of development tools and languages. It allows for customization through a local configuration file. However, it may install more software than needed and requires manual interaction during setup.

strap, on the other hand, focuses more on security and automation, particularly for macOS. It emphasizes using a Brewfile for package management and provides a more streamlined, hands-off setup process. However, it may not offer as extensive a range of development tools out of the box compared to laptop.

@holman does dotfiles

Pros of dotfiles

  • More comprehensive configuration management, covering a wide range of tools and applications
  • Modular structure allows for easy customization and selective use of configurations
  • Includes scripts for automating various tasks and improving workflow

Cons of dotfiles

  • Requires more manual setup and configuration compared to Strap's automated approach
  • May include unnecessary configurations for some users, potentially leading to bloat
  • Less focus on system-level setup and bootstrapping

Code Comparison

dotfiles:

# Load all files in ~/.dotfiles/source/
for file in ~/.dotfiles/source/*; do
  [ -r "$file" ] && [ -f "$file" ] && source "$file"
done

Strap:

def install_homebrew
  return if system("brew --version >/dev/null 2>&1")
  system 'bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"'
end

The dotfiles example shows how it sources multiple configuration files, while the Strap example demonstrates its focus on system-level setup by installing Homebrew.

🍻 A CLI workflow for the administration of macOS applications distributed as binaries

Pros of homebrew-cask

  • Larger community and more extensive collection of casks
  • Integrated with Homebrew, providing a unified package management experience
  • Regular updates and maintenance from a dedicated team

Cons of homebrew-cask

  • Focuses solely on application installation, not overall system setup
  • May require more manual intervention for custom configurations
  • Larger codebase, potentially more complex for contributors

Code Comparison

strap:

#!/bin/bash
set -e

# Check if Xcode Command Line Tools are installed
if ! [ -f "/Library/Developer/CommandLineTools/usr/bin/git" ]; then
  xcode-select --install
fi

homebrew-cask:

cask "example-app" do
  version "1.2.3"
  sha256 "a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0u1v2w3x4y5z"

  url "https://example.com/app-#{version}.dmg"
  name "Example App"
  desc "Description of the example app"
  homepage "https://example.com/"

The strap code focuses on system setup, while homebrew-cask defines application installation parameters. Strap uses bash scripting for system-level operations, whereas homebrew-cask employs Ruby DSL for defining casks.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

👢 Strap

A script to bootstrap a minimal macOS development system with the minimal set of settings and software every macOS developer will want.

Motivation

Replacing Boxen in GitHub with a better tool (see mikemcquaid.com/replacing-boxen).

☕️ Workbrew

In 2023 I started a company, ☕️ Workbrew, to provide the missing features and support for companies using Homebrew. Workbrew is now available in public beta and has a Workbrew Bootstrap feature that's basically Strap v2. Additionally, Workbrew provides MDM integration, fleet configuration, remote brew command execution and much more. Please try it out or book a demo.

Features

  • Enables sudo using TouchID
  • Enables the macOS screensaver password immediately (for better security)
  • Enables the macOS application firewall (for better security)
  • Enables full-disk encryption and saves the FileVault Recovery Key to the Desktop (for better security)
  • Installs the Xcode Command Line Tools (for compilers and Unix tools)
  • Agree to the Xcode license (for using compilers without prompts)
  • Installs Homebrew unless you already have Workbrew installed (for installing software)
  • Installs the latest macOS software updates (for better security)
  • Updates dotfiles in a ~/.dotfiles Git repository. If they exist and are executable: runs script/setup to configure the dotfiles and script/strap-after-setup after setting up everything else.
  • Installs software from a user's Brewfile in their ~/.homebrew-brewfile Git repository or .Brewfile in their home directory.
  • Idempotent

Out of Scope Features

  • Enabling any network services by default (instead enable them when needed)
  • Installing Homebrew formulae by default for everyone in an organisation (install them with Brewfiles in project repositories instead of mandating formulae for the whole organisation)
  • Opting-out of any macOS updates (Apple's security updates and macOS updates are there for a reason)
  • Disabling security features (these are a minimal set of best practises)
  • Most other things: Strap is now considered feature-complete

Usage

Open strap.mikemcquaid.com in your web browser.

Instead, to run Strap locally run:

git clone https://github.com/MikeMcQuaid/strap
cd strap
bash strap.sh # or bash strap.sh --debug for more debugging output

Instead, to run the web application locally run:

git clone https://github.com/MikeMcQuaid/strap
cd strap
./script/bootstrap
./script/server

Status

Feature complete. No further development planned.

License

Licensed under the AGPLv3 License. The full license text is available in LICENSE.txt.