Para yolotl y layla For yolotl & layla

Programa apps de iPhone en la Mac mini, desde tu PC Build iPhone apps on the Mac mini, from your PC

La Mac mini está en casa de Nat. Te vas a conectar a ella por internet desde tu propia PC con Windows, vas a escribir código ahí, y vas a ver tu app corriendo en un simulador de iPhone — en tu navegador. Nunca necesitas tocar la máquina física.

The Mac mini lives at Nat's house. You'll connect to it over the internet from your own Windows PC, write code on it, and watch your app run on an iPhone simulator — in your browser. You never need to touch the actual machine.

Tú eresYou are
tu puerto:your port:

Primero toca tu nombre aquí arriba. Todos los comandos de esta página se van a llenar solos con tu usuario y tu número de puerto, para que los copies sin cambiarles nada.

Tap your name above first. Every command on this page will fill in with your own username and port number, so you can copy them without changing anything.

PARTE 1PART 1

Prepara tu PCSet up your PC

~15 min, una vez~15 min, once
1

Únete a la red con el link de NatJoin the network using Nat's link

Tailscale es una red privada que conecta tu PC con la Mac mini. Sin esto, tu PC no tiene forma de encontrar la mini.

Tailscale is a private network that connects your PC to the Mac mini. Without it, your PC has no way to find the mini at all.

Abre este link en tu navegador — te va a llevar a la página para unirte a la red de Nat:

Open this link in your browser — it'll take you to the page to join Nat's network:

Navegador, en tu PCBrowser, on your PC
https://login.tailscale.com/admin/invite/4QzQHLX7cZZWuQZiYhmE11

Inicia sesión o crea una cuenta ahí mismo (con Google es lo más rápido) y acepta unirte a la red. Después te va a pedir instalar la app de Tailscale — instálala y ábrela; se conecta sola.

Sign in or create an account right there (Google is the fastest way), and accept joining the network. It'll then ask you to install the Tailscale app — install it and open it; it connects on its own.

2

Comprueba que ves la Mac mini Check that you can see the Mac mini

Abre la app de Tailscale. Deberías ver una máquina llamada nats-mac-mini en la lista, con un punto verde a un lado. Verde quiere decir que está encendida y disponible.

Open the Tailscale app. You should see a machine called nats-mac-mini in the list with a green dot next to it. Green means it's awake and reachable.

¿No hay punto verde, o la mini ni siquiera aparece? Párale aquí y dile a Nat. Nada de lo que sigue va a funcionar hasta que aparezca.

No green dot, or the mini isn't listed at all? Stop here and tell Nat. Nothing further on this page will work until it shows up.

PARTE 2PART 2

Conéctate a la Mac mini Connect to the Mac mini

~2 min
3

Abre PowerShellOpen PowerShell

Presiona la tecla Windows, escribe PowerShell y dale Enter. Se abre una ventana oscura con un cursor parpadeando. Ahí es donde vas a escribir todo lo de la Parte 2 y la Parte 3.

Press the Windows key, type PowerShell, press Enter. A dark window with a blinking cursor opens. This is where you type everything in Part 2 and Part 3.

No necesitas instalar nada más — Windows ya trae lo que necesitas.

You don't need to install anything else — Windows already has what you need built in.

4

Corre el comando de conexión Run the connect command

Copia esto, pégalo en PowerShell y dale Enter:

Copy this and paste it into PowerShell, then press Enter:

PowerShell, en tu PC PowerShell, on your PC
ssh -L PORT:127.0.0.1:PORT USER@100.82.212.29

La parte de -L arma un túnel privado por donde va a viajar la imagen del simulador de iPhone. Sí importa — no se la quites.

The -L part builds a private tunnel for the iPhone simulator picture to travel through later. It matters — don't drop it.

5

Contesta las dos preguntas Answer the two prompts

Solo la primera vez, te pregunta algo sobre autenticidad y una huella (fingerprint). Escribe yes y dale Enter.

The first time only, it asks something about authenticity and a fingerprint. Type yes and press Enter.

Luego te pide una contraseña. Escribe la contraseña de la Mac mini que te dio Nat y dale Enter. No aparece nada mientras escribes — ni puntos ni asteriscos. Es normal, sí está funcionando. Escríbela y dale Enter.

Then it asks for a password. Type the Mac mini password Nat gave you and press Enter. Nothing appears as you type — no dots, no stars. That's normal, it's still working. Just type it and press Enter.

Vas a saber que funcionó cuando la línea de la izquierda cambie a algo como USER@Nats-Mac-mini ~ %

You'll know it worked when the line on the left changes to something like USER@Nats-Mac-mini ~ %

Ahora estás escribiendo en la Mac mini, no en tu PC. Misma ventana, otra computadora.

You are now typing on the Mac mini, not on your PC. Same window, different computer.

PARTE 3PART 3

Prepara tu espacio de trabajo Start your workspace

~3 min
6

Arranca tmuxStart tmux

tmux mantiene tu trabajo vivo en la Mac mini aunque se te caiga el wifi o cierres tu laptop. Sin esto, perder la conexión mata lo que estabas corriendo — una compilación, tu asistente de IA, todo. Siempre empieza por aquí.

tmux keeps your work alive on the Mac mini even if your wifi drops or you close your laptop. Without it, a lost connection kills whatever you were running — a build, your AI assistant, everything. Always start here.

En la Mac miniOn the Mac mini
tmux new -s work

Aparece una barrita de estado hasta abajo. Eso quiere decir que ya estás dentro de tmux.

A thin status bar appears at the bottom of the window. That means you're inside tmux.

Todas las veces después de la primera, usa este en lugar del de arriba — te reconecta a la sesión que dejaste corriendo:

Every time after the first, use this instead — it reconnects you to the session you left running:

En la Mac miniOn the Mac mini
tmux attach -t work
7

Configura opencode — solo la primera vez Set up opencode — first time only

opencode es tu asistente de IA para programar, corriendo en la Mac mini. Necesita tu API key de Kimi antes de hacer nada.

opencode is your AI coding assistant, running on the Mac mini. It needs your Kimi API key before it'll do anything.

En la Mac miniOn the Mac mini
opencode auth login

Escoge el proveedor Kimi de la lista y pega tu propia key — Nat hizo una distinta para cada quien. Esto se hace una sola vez.

Choose the Kimi provider from the list, then paste your own key — Nat made a separate one for each of you. You only ever do this once.

Tu key es tuya. No la pegues en un chat, una captura de pantalla ni un documento compartido — quien la tenga puede gastarse tu crédito.

Your key is yours. Don't paste it into a chat, a screenshot, or a shared doc — anyone who has it can spend your credit.

8

Arranca el simulador de iPhone Start the iPhone simulator stream

Esto prende un iPhone simulado en la Mac mini y manda la imagen a tu navegador.

This boots a simulated iPhone on the Mac mini and streams the picture to your browser.

En la Mac miniOn the Mac mini
npx serve-sim --port PORT --detach

La primera vez tarda como un minuto mientras descarga. Después ya es rápido.

The first run takes a minute while it downloads. After that it's quick.

El puerto PORT es tuyo. Yolotl usa 3200 y layla usa 3201. Si usas el del otro, a alguno le va a salir el error address already in use, así que quédate con el tuyo.

Port PORT is yours. Yolotl uses 3200, layla uses 3201. Using each other's port means one of you gets an "address already in use" error, so stick to your own.

9

Abre el simulador en tu navegador Open the simulator in your browser

En tu PC, abre Chrome o Edge y ve a:

On your PC, open Chrome or Edge and go to:

Navegador, en tu PCBrowser, on your PC
http://localhost:PORT

Aparece un iPhone. Puedes darle clic y arrastrarlo como si fuera un teléfono de verdad. Cuando compiles tu app, se abre justo ahí.

An iPhone appears. You can click and drag it like a real phone. When you build an app, it shows up right here.

Esto solo funciona mientras tu ventana de PowerShell del paso 4 siga conectada. Si cierras esa ventana, el iPhone desaparece — esa ventana es el túnel.

This only works while your PowerShell window from step 4 is still connected. Close that window and the iPhone disappears — that window is the tunnel.

PARTE 4PART 4

Compila y corre tu app Build and run an app

cada vezevery time
10

Tres comandos, siempre en este orden Three commands, always in this order

Desde dentro de la carpeta de tu proyecto en la Mac mini. Cambia MyApp por el nombre de tu app.

From inside your project folder on the Mac mini. Replace MyApp with your own app's name.

En la Mac mini
# 1. compílala
xcodebuild -scheme MyApp \
  -destination 'platform=iOS Simulator,name=iPhone 17 Pro' \
  -derivedDataPath build CODE_SIGNING_ALLOWED=NO build

# 2. instálala en el simulador
xcrun simctl install booted \
  build/Build/Products/Debug-iphonesimulator/MyApp.app

# 3. ábrela
xcrun simctl launch booted com.tunombre.MyApp
On the Mac mini
# 1. compile it
xcodebuild -scheme MyApp \
  -destination 'platform=iOS Simulator,name=iPhone 17 Pro' \
  -derivedDataPath build CODE_SIGNING_ALLOWED=NO build

# 2. put it on the simulator
xcrun simctl install booted \
  build/Build/Products/Debug-iphonesimulator/MyApp.app

# 3. open it
xcrun simctl launch booted com.yourname.MyApp

Voltea a ver la pestaña de tu navegador — la app se abre en el iPhone. Cambia tu código, corre los tres comandos otra vez, y se recarga.

Watch your browser tab — the app opens on the iPhone. Change your code, run the three commands again, and it reloads.

Nunca abres Xcode la aplicación. xcodebuild es Xcode — es el mismo compilador, nada más sin ventanas.

You never open Xcode the app. xcodebuild is Xcode — it's the same compiler, just without the windows.

YA CONFIGURADOAFTER SETUP

Tu rutina de todos los días Your everyday routine

~30 segsec

Ya que hiciste todo lo de arriba, esto es todo tu arranque Once everything above is done, this is your whole start-up

Dos comandos, y abres tu pestaña del navegador.

Two commands, then open your browser tab.

PowerShell, en tu PC PowerShell, on your PC
ssh -L PORT:127.0.0.1:PORT USER@100.82.212.29
Luego, en la Mac mini Then, on the Mac mini
tmux attach -t work

Después abre http://localhost:PORT y sigue donde te quedaste.

Then open http://localhost:PORT and keep going where you left off.

Cuando termines por hoy: presiona Ctrl+b, suelta, y luego presiona d. Eso desconecta tmux y deja todo corriendo en la mini. Después ya cierra PowerShell. No escribas exit — eso mata tu trabajo.

When you're done for the day: press Ctrl+b, let go, then press d. That detaches tmux and leaves everything running on the mini. Then close PowerShell. Don't type exit — that kills your work.

PASO 2STEP 2

Ya que todo funciona: tu IA, Cloudflare y GitHub Once it all works: your AI, Cloudflare, and GitHub

~20 min, una vez~20 min, once
11

Dale a tu IA el manual de la familia Give your AI the family playbook

Nat escribió una guía de cómo construimos apps en esta familia: JavaScript puro para web, Swift para iPhone, Cloudflare para todo lo demás — sin frameworks, sin atajos raros. Tu asistente de IA tiene que leerla antes de cada proyecto, para que te enseñe a nuestra manera.

Nat wrote a guide for how this family builds apps: plain JavaScript for web, Swift for iPhone, Cloudflare for everything else — no frameworks, no weird shortcuts. Your AI assistant has to read it before every project, so it teaches you our way.

Cada vez que empieces un proyecto nuevo, crea su carpeta y cópiale la guía:

Every time you start a new project, make its folder and copy the guide in:

En la Mac miniOn the Mac mini
mkdir -p ~/projects/miapp
cp /Users/Shared/our-stack/SKILL.md ~/projects/miapp/AGENTS.md

Cambia miapp por el nombre de tu proyecto. opencode lee el archivo AGENTS.md automáticamente cuando lo abres dentro de esa carpeta — no tienes que hacer nada más.

Change miapp to your project's name. opencode reads the AGENTS.md file automatically when you open it inside that folder — nothing else to do.

¿Tu IA te sugiere React, un framework, o "instala tal cosa"? Va contra el manual. Dile: "lee AGENTS.md y hazlo a nuestra manera".

If your AI suggests React, a framework, or "install this thing" — that's against the playbook. Tell it: "read AGENTS.md and do it our way."

12

Crea tu propia cuenta de Cloudflare Create your own Cloudflare login

Cloudflare es donde van a vivir tus páginas web y tus servidores (se llaman Workers). Necesitas tu propio usuario, con tu propio correo y contraseña:

Cloudflare is where your web pages and your servers (called Workers) will live. You need your own login, with your own email and password:

Navegador, en tu PCBrowser, on your PC
https://dash.cloudflare.com/sign-up

Al registrarte, Cloudflare te crea una cuenta personal vacía. Ignórala — tú vas a trabajar en la cuenta que Nat te comparte en el siguiente paso.

When you sign up, Cloudflare creates an empty personal account for you. Ignore it — you'll work in the account Nat shares with you in the next step.

13

Acepta la invitación de Nat Accept Nat's invite

Nat te va a invitar como Administrator de tu propia cuenta de trabajo — la tuya se llama . Dile que ya creaste tu usuario, revisa tu correo y acepta la invitación.

Nat will invite you as Administrator of your own working account — yours is called . Tell Nat your login is ready, then check your email and accept the invite.

Esa cuenta es tu sandbox. Puedes romper lo que quieras ahí dentro — Nat lo ve todo y lo puede arreglar. Lo que no puedes tocar (ni por accidente) es lo de los demás.

That account is your sandbox. Break whatever you want in there — Nat can see everything and fix it. What you can't touch (even by accident) is anyone else's stuff.

14

Conecta wrangler en la Mac mini — solo la primera vez Connect wrangler on the Mac mini — first time only

wrangler es el comando que sube tu código a Cloudflare. Para iniciar sesión necesita un túnel extra, así que solo por esta vez conéctate a la mini con este comando en lugar del normal:

wrangler is the command that uploads your code to Cloudflare. Logging in needs one extra tunnel, so just this once, connect to the mini with this command instead of your usual one:

PowerShell, en tu PCPowerShell, on your PC
ssh -L 8976:127.0.0.1:8976 USER@100.82.212.29

Ya dentro de la mini, corre:

Once you're on the mini, run:

En la Mac miniOn the Mac mini
npx wrangler login

Te imprime un link larguísimo. Cópialo, ábrelo en el navegador de tu PC, inicia sesión con tu cuenta de Cloudflare y dale Allow. Cuando el navegador diga que todo salió bien, la terminal también lo va a decir.

It prints a very long link. Copy it, open it in the browser on your PC, sign in with your Cloudflare login, and click Allow. When the browser says it worked, the terminal will too.

15

Comprueba, y la regla de oro Verify, and the golden rule

En la Mac miniOn the Mac mini
npx wrangler whoami

Debe aparecer tu correo y tu cuenta con su account_id. Ese id va en el wrangler.toml de cada proyecto tuyo.

You should see your email and your account with its account_id. That id goes in the wrangler.toml of every project you make.

La regla de oro: solo despliegas a tu propia cuenta. Si algún día wrangler te pregunta "which account?" o el id no es el tuyo, párale y revisa antes de continuar.

The golden rule: you only ever deploy to your own account. If wrangler ever asks "which account?" or the id isn't yours, stop and check before going any further.

16

Conecta GitHub — donde vive tu código Connect GitHub — where your code lives

GitHub guarda el historial de tu código: cada versión, para siempre. Si algo se rompe, puedes regresar en el tiempo. Primero crea tu cuenta (con tu propio correo) en github.com/signup, y luego, en la mini:

GitHub keeps your code's history: every version, forever. If something breaks, you can go back in time. First create your account (with your own email) at github.com/signup, then, on the mini:

En la Mac miniOn the Mac mini
gh auth login

Contesta: GitHub.comHTTPSLogin with a web browser. Te da un código de 8 letras — cópialo, abre el link que te muestra en el navegador de tu PC, pega el código y autoriza.

Answer: GitHub.comHTTPSLogin with a web browser. It gives you an 8-character code — copy it, open the link it shows in the browser on your PC, paste the code, and authorize.

Por último, dile a git quién eres (usa tu usuario y correo de GitHub):

Last, tell git who you are (use your GitHub username and email):

En la Mac miniOn the Mac mini
git config --global user.name "USER"
git config --global user.email "tu-correo@ejemplo.com"

Con esto ya está todo conectado: tu IA (opencode), tu nube (Cloudflare) y tu código (GitHub). De aquí en adelante, todo es construir.

That's everything connected: your AI (opencode), your cloud (Cloudflare), and your code (GitHub). From here on, it's all building.

REFERENCIAREFERENCE

Qué es cada cosa What each thing actually is

Tailscale
Una red privada. Es la única razón por la que tu PC puede encontrar la Mac mini. A private network. It's the only reason your PC can find the Mac mini at all.
ssh
Te deja escribir comandos en otra computadora. Windows ya lo trae. Lets you type commands on another computer. Built into Windows already.
tmux
Mantiene tu trabajo corriendo en la mini cuando te desconectas. Keeps your work running on the mini when you disconnect.
opencode
Tu asistente de IA para programar, corriendo en la mini. Your AI coding assistant, running on the mini.
serve-sim
Manda la pantalla del simulador de iPhone a tu navegador. Streams the iPhone simulator's screen to your browser.
xcodebuild
El compilador de Apple. Convierte tu código Swift en una app. Apple's compiler. Turns your Swift code into an app.
simctl
Controla el iPhone simulado — instala y abre apps en él. Controls the simulated iPhone — installs and launches apps on it.
Cloudflare
Donde viven tus páginas y servidores en internet. Tu cuenta es tu sandbox. Where your pages and servers live on the internet. Your account is your sandbox.
wrangler
El comando que sube tu código de la mini a Cloudflare. The command that uploads your code from the mini to Cloudflare.
git / GitHub
git guarda el historial de tu código; GitHub es donde vive ese historial en internet. git tracks your code's history; GitHub is where that history lives online.
CUANDO FALLEWHEN IT BREAKS

Intenta arreglarlo tú primero Fix it yourself first

"Permission denied"

Contraseña equivocada, o usuario equivocado. Revisa que estés usando USER y no el nombre del otro. Acuérdate que la contraseña no se ve mientras la escribes — es fácil equivocarte sin darte cuenta. Nada más inténtalo otra vez.

Wrong password, or wrong username. Check you're using USER and not the other person's name. Remember the password doesn't show as you type — it's easy to typo it without noticing. Just try again.

Se queda pensando y luego dice "Connection timed out" It hangs, then "Connection timed out"

Tailscale no está corriendo en tu PC. Abre la app de Tailscale y revisa que esté conectada, y que nats-mac-mini tenga su punto verde.

Tailscale isn't running on your PC. Open the Tailscale app and check it's connected, and that nats-mac-mini has a green dot.

Si Tailscale se ve bien y aun así falla, puede que la Mac mini esté apagada. Escríbele a Nat.

If Tailscale looks fine and it still times out, the Mac mini may be off. Message Nat.

La página del navegador sale en blanco o no carga The browser page is blank or won't load

Casi siempre es esto: se te cerró la ventana de PowerShell, así que ya no hay túnel. Vuelve a conectarte con el comando del paso 4 y recarga el navegador.

Almost always: your PowerShell window closed, so the tunnel is gone. Reconnect with the command from step 4 and refresh the browser.

¿Sigue en blanco? A lo mejor se detuvo tu stream. Reconéctate y corre otra vez npx serve-sim --port PORT --detach.

Still blank? Your simulator stream may have stopped. Reconnect, then run npx serve-sim --port PORT --detach again.

"Address already in use"

Ya hay algo en tu puerto — casi siempre un stream que dejaste corriendo antes. Límpialo y empieza de nuevo:

Something's already on your port — usually a stream you left running earlier. Clear it and start fresh:

En la Mac miniOn the Mac mini
npx serve-sim --kill

Luego corre otra vez el comando del paso 8.

Then run the start command from step 8 again.

"command not found: opencode"

Tu terminal no cargó su configuración. Corre esto una vez y vuelve a intentar:

Your shell hasn't picked up its settings. Run this once, then try again:

En la Mac miniOn the Mac mini
source ~/.zshrc
"Operation not permitted" al instalar algo "Operation not permitted" when installing something

Es normal. Sus cuentas no pueden instalar software para toda la máquina — es a propósito, para que nadie la rompa sin querer para los demás.

Expected. Your accounts can't install system-wide software — that's deliberate, so nobody accidentally breaks the machine for everyone.

Tus cosas sí jalan: paquetes de npm, paquetes de Swift, lo que sea dentro de tu carpeta personal. Para cualquier otra cosa — una herramienta nueva, otra versión del simulador — pídeselo a Nat.

Your own things still work fine: npm packages, Swift packages, anything inside your home folder. For anything else — a new tool, a new simulator version — ask Nat.