Installing Brew and uv on macOS ๐Ÿ’ป

This guide walks you through installing Homebrew, a package manager for macOS, and uv, a fast Python package installer and resolver, using your terminal. โœจ

What are Brew and uv? โ“

Homebrew ("Brew") is a free and open-source software package management system that simplifies the installation of software on macOS. It allows you to install various utilities and applications with a single command in your terminal.

uv is an extremely fast Python package installer, resolver, and more, written in Rust. It's often used as a faster alternative to tools like pip.

Installing Homebrew ๐Ÿบ

Follow these steps to get Homebrew installed:

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

This command downloads and runs the Homebrew installation script from GitHub. The script will explain what it will do and may ask for your administrator password to install necessary components.

brew --version
brew doctor

This should display the installed Homebrew version.

Installing uv โœจ

Once Brew is installed, installing uv is straightforward:

brew install uv

Brew will download and install the latest version of uv.

uv --version

You should see the installed uv version. You can now use uv instead of pip for many Python package management tasks, for example, uv pip install requests.

Keeping Things Updated ๐Ÿ”„

To update Brew and all installed packages (including uv), run the following commands:

brew update
brew upgrade

brew update fetches the latest Homebrew information, and brew upgrade upgrades all outdated installed formulae.

You've successfully installed Brew and uv on your macOS machine! ๐ŸŽ‰

Testing Syntax Highlighting (JavaScript) ๐Ÿงช

Here's a random JavaScript code block to ensure syntax highlighting is working correctly:

function greet(name) {
  console.log(`Hello, ${name}!`);

  const numbers = [1, 2, 3, 4, 5];
  let sum = 0;

  for (let i = 0; i < numbers.length; i++) {
    sum += numbers[i];
  }

  if (sum > 10) {
    console.log("Sum is greater than 10.");
  } else {
    console.log("Sum is 10 or less.");
  }

  return sum;
}

greet("World");

Sample 2x6 Table ๐Ÿ“Š

Here is a simple table with 2 rows and 6 columns:

Column 1 Column 2 Column 3 Column 4 Column 5 Column 6
Row 1, Col 1 Row 1, Col 2 Row 1, Col 3 Row 1, Col 4 Row 1, Col 5 Row 1, Col 6
Row 2, Col 1 Row 2, Col 2 Row 2, Col 3 Row 2, Col 4 Row 2, Col 5 Row 2, Col 6