liveBook · Manning

Chapter 1: Getting started with local AI

What you will learn in chapter 1 of Build Applications with Local AI Models on a Mac

The chapter introduction frames a private, Mac-based voice chat application, its high-level components, and the choice of Python for the project.

After this chapter you will be able to

Section by section

Introduction

The chapter introduction frames a private, Mac-based voice chat application, its high-level components, and the choice of Python for the project.

Key terms: speech recognition, language model inference, live web interface, streaming AI response, local assistant, hosted chatbot, privacy, Mac-first, Python, Swift

1.1 Why run AI locally?

This section gives privacy, freedom, and hands-on understanding as reasons to run AI on your own computer rather than rely entirely on cloud services.

Key terms: Privacy, Voice privacy, cloud AI service, locally, Freedom, cloud AI services, Understanding, architect

1.1.1 Cloud AI vs. local AI

This section compares cloud and local AI by their model-quality and currency tradeoffs and by where a prompt travels.

Key terms: cloud AI, local AI, quality gap, training cutoff date, prompt, external server

1.1.2 When to use cloud AI vs. local AI

This section explains when cloud or local AI is a better fit and why the book focuses on local AI.

Key terms: cloud AI, local AI, under the hood

1.2 The local chat application you will build

This section sketches the local voice-chat app’s user experience and the high-level path from spoken input to an AI response.

Key terms: voice-enabled local AI chat application, local URL, streaming text, Web Audio API, MLX Whisper, Ollama LLM, Python, Streamlit

1.3 What you’ll need

This section explains the Mac, memory, storage, connectivity, and background needed to follow the book, including what to expect from Apple Silicon and Intel Macs.

Key terms: macOS Ventura (13), RAM, free disk space, About This Mac, M-series Apple Silicon, unified memory architecture, Neural Engine, Intel, MLX Whisper, stable internet connection

1.4 What is a large language model?

This section explains what an LLM is, how it produces text, why its answers need checking, and what prompts and APIs mean.

Key terms: large language model (LLM), training, internal numerical patterns, relationships between words, predicts the most likely next word, hallucination, LLM, prompt, application programming interface (API)

1.5 Using the terminal to interact with your computer

Introduces the terminal as the text-based way to give the computer instructions and explains why it is the first skill needed for the book’s projects.

Key terms: terminal, Ollama, Python, Streamlit

1.5.1 Two ways to talk to your computer

The section contrasts graphical and command-line interaction, introduces the macOS Terminal, and explains what its prompt means and what kind of input it expects.

Key terms: graphical user interface (GUI), command-line interface (CLI), terminal, prompt, username, computer’s name, home directory, prompt symbol, commands, natural language

1.5.2 CLI vs. GUI: A comparison

This section compares the GUI and CLI as two ways to communicate with the same operating system and explains why the CLI matters for development tools.

Key terms: GUI, CLI, operating system, command line

1.5.3 Why use the command line?

This section explains why the command line is useful for everyday development and why its text-based interface suits AI coding agents.

Key terms: CLI, speed, precision, automation, portability, AI coding agents, command line, text in, text out, GUI

1.6 Opening the terminal on macOS

This introduction frames the terminal as a tool used throughout the book and previews two ways to open it.

1.6.1 Method 1: Spotlight search (recommended)

1.6.2 Method 2: Applications folder

Shows how to open Terminal from the Applications folder and how to keep it in the Dock for frequent use.

Key terms: Finder, Applications > Utilities, Terminal, Spotlight, Dock, Control-click, Options > Keep in Dock

1.6.3 Customizing the appearance

This subsection shows how to change the macOS Terminal app’s theme to make long sessions more comfortable.

Key terms: Terminal, Settings, Profiles, Pro

1.7 Essential commands

Introduces basic conventions for typing terminal commands before the individual commands are taught.

Key terms: commands, options, flags, path

1.7.1 Where am I?

Introduces `pwd` for finding your current folder and explains how to read the displayed home-directory path.

Key terms: pwd, print working directory, directory, home directory, path, root, Users

1.7.2 What is here?

This section shows how to list the current directory’s contents and interpret several useful variations of the listing.

Key terms: ls, current directory, home directory, Finder, ls -la, flag, option, long format, hidden files, .

1.7.3 Moving around

This subsection shows how to move between folders in the terminal and explains what clearing the screen does to earlier output.

Key terms: cd, change directory, path, ls, parent directory, cd .., cd ~, home directory, ~, clearing the terminal screen

1.7.4 Creating folders

This section introduces creating a project folder in the terminal, checking that it exists, and moving into it as a workspace for the book.

Key terms: mkdir, directory, folder

1.7.5 What happens when you type a command

This section traces what happens when a terminal command runs, explains how the shell finds its program, and shows how to interrupt a command that is still running.

Key terms: command, ls, output, prompt, terminal, shell, Zsh, PATH, Ctrl-C, interrupt signal

1.7.6 Common fears and realities

Reassures beginners that the four terminal commands taught so far will not delete or overwrite their files.

Key terms: pwd, ls, cd, mkdir

1.8 Exercises

1.9 Summary

Where this is used later

Concepts explained in this chapter

Chapter 2: Installing and using Homebrew →

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.