> ## Documentation Index
> Fetch the complete documentation index at: https://hm-95ec977f.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Reset macOS & Prepare for Development (Beginner Guide)

export const CodeRunner = props => {
  const code = props.code;
  const language = props.language || "bash";
  const filename = props.filename;
  const [hasRun, setHasRun] = React.useState(false);
  const copyToClipboard = async text => {
    try {
      await navigator.clipboard.writeText(text);
    } catch (err) {
      const textArea = document.createElement('textarea');
      textArea.value = text;
      document.body.appendChild(textArea);
      textArea.select();
      document.execCommand('copy');
      document.body.removeChild(textArea);
    }
  };
  const handleCopy = async () => {
    await copyToClipboard(code);
  };
  const handleRun = async () => {
    setHasRun(true);
    await copyToClipboard(code);
    try {
      window.location.href = 'kmtrigger://macro=web_2_terminal';
    } catch (err) {
      console.error('Could not trigger URL scheme:', err);
    }
  };
  const highlightCode = (code, language) => {
    if (typeof window !== "undefined" && window.Prism && window.Prism.languages[language]) {
      return window.Prism.highlight(code, window.Prism.languages[language], language);
    }
    return code;
  };
  if (typeof document === "undefined") {
    return null;
  }
  const highlightedCode = highlightCode(code, language);
  return <div className="hover:!border-primary dark:hover:!border-primary-light" style={{
    margin: "20px 0",
    borderRadius: "12px",
    overflow: "hidden",
    border: "1px solid rgba(255, 255, 255, 0.1)",
    backgroundColor: "rgba(0, 0, 0, 0.3)",
    backdropFilter: "blur(10px)",
    WebkitBackdropFilter: "blur(10px)",
    boxShadow: "0 8px 32px rgba(0, 0, 0, 0.3)",
    filter: hasRun ? "grayscale(1) blur(2px)" : "none",
    opacity: hasRun ? 0.6 : 1,
    transition: "all 0.3s ease"
  }}>
      <div style={{
    display: "flex",
    alignItems: "center",
    justifyContent: "space-between",
    padding: "8px 16px",
    backgroundColor: "rgba(255, 255, 255, 0.05)",
    borderBottom: "1px solid rgba(255, 255, 255, 0.1)"
  }}>
        {filename && <span style={{
    fontSize: "13px",
    color: "rgba(255, 255, 255, 0.8)",
    fontWeight: "500",
    fontFamily: "monospace"
  }}>
            {filename}
          </span>}
        
        <div style={{
    display: "flex",
    gap: "4px",
    marginLeft: "auto"
  }}>
          <button onClick={handleCopy} style={{
    display: "flex",
    alignItems: "center",
    justifyContent: "center",
    width: "32px",
    height: "32px",
    border: "none",
    borderRadius: "6px",
    cursor: "pointer",
    backgroundColor: "transparent",
    color: "rgba(255, 255, 255, 0.6)",
    transition: "all 0.2s ease"
  }} onMouseEnter={e => {
    e.target.style.backgroundColor = "rgba(255, 255, 255, 0.1)";
    e.target.style.color = "rgba(255, 255, 255, 0.9)";
    e.target.style.transform = "scale(1.05)";
  }} onMouseLeave={e => {
    e.target.style.backgroundColor = "transparent";
    e.target.style.color = "rgba(255, 255, 255, 0.6)";
    e.target.style.transform = "scale(1)";
  }} title="Copy code">
            <Icon icon="copy" size={16} />
          </button>
          
          <button onClick={handleRun} style={{
    display: "flex",
    alignItems: "center",
    justifyContent: "center",
    width: "32px",
    height: "32px",
    border: "none",
    borderRadius: "6px",
    cursor: "pointer",
    backgroundColor: "transparent",
    color: "rgba(34, 197, 94, 0.8)",
    transition: "all 0.2s ease"
  }} onMouseEnter={e => {
    e.target.style.backgroundColor = "rgba(34, 197, 94, 0.1)";
    e.target.style.color = "rgba(34, 197, 94, 1)";
    e.target.style.transform = "scale(1.05)";
  }} onMouseLeave={e => {
    e.target.style.backgroundColor = "transparent";
    e.target.style.color = "rgba(34, 197, 94, 0.8)";
    e.target.style.transform = "scale(1)";
  }} title="Run in terminal">
            <Icon icon="play" size={16} />
          </button>
        </div>
      </div>

      <div style={{
    padding: "16px",
    backgroundColor: "rgba(0, 0, 0, 0.2)"
  }}>
        <pre style={{
    margin: "0",
    padding: "0",
    fontSize: "14px",
    lineHeight: "1.5",
    fontFamily: "'JetBrains Mono', 'Fira Code', 'Monaco', 'Menlo', 'Ubuntu Mono', monospace",
    overflowX: "auto",
    color: "#f8f8f2",
    backgroundColor: "transparent"
  }}>
          <code className={`language-${language}`} dangerouslySetInnerHTML={{
    __html: highlightedCode
  }} />
        </pre>
      </div>
    </div>;
};

## 1. Backup Your Data (Mandatory!)

1. Connect an external drive (bigger than your Mac's storage)
2. Go to > System Settings > General > Time Machine
3. Click "Add Backup Disk" and follow prompts
4. Wait until backup completes before proceeding

***

## 2. Reset macOS (Erase & Reinstall)

### Enter Recovery Mode:

1. Shut down Mac ( > Shut Down)
2. Hold (**Power button + ⌘ Command + R**) together immediately after turning on
3. Release when Apple logo appears (may take 5 minutes)

### Erase Your Disk:

4. Select "Disk Utility" > Continue
5. In sidebar:
   * Select "Macintosh HD" (top item, under "Internal")
   * Click "Erase" (top toolbar)
6. Configure:
   * **Name:** `Macintosh HD`
   * **Format:** `APFS` (default for modern Macs)
   * **Scheme:** `GUID Partition Map`
7. Confirm with "Erase Volume Group"
8. Close Disk Utility when done

### Reinstall macOS:

9. Back in Utilities, choose "Reinstall macOS"
10. Follow prompts (installation takes 20-60 minutes)
11. Mac will restart automatically when done

***

## 3. Fast Setup (Skip Unnecessary Steps)

At the Welcome Screen:

1. **Country/Region:** Select yours → Continue
2. **Language:** Keep defaults → Continue
3. **Accessibility:** "Not Now" → Continue
4. **Wi-Fi:** Connect to internet (required!)
5. **Data & Privacy:** Continue
6. **Migration Assistant:** "Not Now"
7. **Apple ID:** "Set Up Later" → "Skip" (you'll add later)
8. **Terms & Conditions:** Agree → Continue
9. **Create Admin Account:**
   * Full Name: Your name
   * Account Name: Auto-generated (keep it simple)
   * Password: Use something memorable (write it down!)
   * Uncheck "Set up with Touch ID" (save time)
10. **Location Services:** Uncheck → "Continue" → "Don't Use"
11. **Analytics:** Uncheck both → Continue
12. **Screen Time:** "Set Up Later"
13. **Siri:** "Set Up Later" or uncheck → Continue
14. **Appearance:** Choose Light/Dark → Continue

**You're now at the desktop!**

***

## 4. Open Apps via Terminal (Developer Quickstart)

1. Press **⌘ Command + Space**
2. Type `Terminal` → Press Enter
3. Copy/paste this command (it opens 4 apps at once):

```bash theme={null}
open -a Safari
open -a Clock
open -a Notes
open -a "Activity Monitor"
```

<CodeRunner
  code={`open -a Safari
open -a Clock
open -a Notes
open -a "Activity Monitor"`}
  language="bash"
/>

**Press Enter** - all apps will launch simultaneously!

***

### Next Steps for Developers

1. Install Xcode from App Store (essential for macOS dev)
2. Install Homebrew (package manager):

```bash theme={null}
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
```

3. Configure Git:

```bash theme={null}
git config --global user.name "Your Name"
git config --global user.email "your@email.com"
```

### Pro Tips

* Use `⌘ Command + Tab` to switch between open apps
* Safari is pre-logged into Apple services (App Store, iCloud)
* Activity Monitor shows running processes (like Task Manager on Windows)
* You can sign into Apple ID later in > System Settings > Apple ID

***

This process takes 60-90 minutes total. You'll have a clean, bloatware-free macOS installation ready for development tools!
