Skip to content
supastack
Browse documentation
MobileExpo

For AI agents: fetch the complete documentation index at /llms.txt, the full documentation corpus at /llms-full.txt, the agent skill at /skill.md, or this page as Markdown at /docs/mobile/terminal-basics.md (or send Accept: text/markdown).

Commands, files and configuration

Learn where to paste commands, how to open the correct project folder, edit .env files, stop the Expo server and report a setup error without sharing secrets.

A command goes in the terminal

A terminal is the window where you type instructions for your computer. In Visual Studio Code, first open your supastack folder using File → Open Folder, then select Terminal → New Terminal. The new terminal starts in that folder. On Windows choose PowerShell using the menu next to the terminal's + button. Use macOS/Linux blocks in a macOS or Linux terminal.

Paste only the contents of a command block, one command at a time, and press Enter. Do not paste the surrounding Markdown backticks, a prompt such as PS C:\..., or example output. Lines starting with # are explanations; they do not run anything. Wait for each installation command to finish before entering the next command. A server command keeps running and does not return a fresh prompt until you stop it.

Check which folder the terminal is using

Repository root means the top-level supastack folder containing package.json, pnpm-workspace.yaml, apps and packages. Unless a step says otherwise, run commands there. The command below prints the current folder; the file listing should show package.json. In Windows PowerShell pwd and ls also work.

If the listing shows only the contents of apps/mobile, type cd ../.. and press Enter to return to the root. If it shows your home folder, type cd followed by a space and the full path to your clone, enclosed in quotation marks when it contains spaces. Opening the project folder in the editor and creating a new terminal is usually easier.

pwd
ls

Configuration goes in a file, not in the terminal

A block like AI_PROVIDER=fake is configuration text. Open the named .env file in the editor, find the line beginning AI_PROVIDER=, replace its value and save with Ctrl + S (Command + S on macOS). Each setting occupies one line in KEY=value form. Do not add Markdown backticks. Avoid duplicate copies of the same key in one file.

Use apps/mobile/.env.local for Expo and root .env for database migration commands. Expo does not automatically load root .env. The Web backend reads its own apps/web/.env.local; in a Mobile-only checkout that file belongs to the separate backend repository, not this one. If the backend address changes, update EXPO_PUBLIC_API_URL in apps/mobile/.env.local and restart Expo. Keep the example file unchanged for future reference.

Files whose names start with a dot may be hidden in your file manager; the editor's Explorer shows them. Make sure the filename is exactly .env.local, not .env.local.txt. These local files can contain passwords and are excluded from Git; do not upload them or paste their contents into support messages.

Keep the server running; use another terminal for commands

The Expo development server delivers your screens to a phone or simulator while you work. Leave its terminal open when a tutorial says to scan the QR code. A server command keeps running and does not return a fresh prompt until you stop it.

To run another command while the server is active, select Terminal → New Terminal in the editor. The new terminal is a separate window into the same project. To stop the server, select its terminal and press Ctrl + C once. On Windows, if asked Terminate batch job, type Y and press Enter. Wait for the normal prompt before starting it again.

After editing Expo settings, stop Expo with Ctrl + C, then run the command below to restart it and clear the cached bundle. Saving a source file normally refreshes the preview automatically, but environment changes need the restart.

corepack pnpm --filter @supastack/mobile start --clear

Read a failure and ask for useful help

If an installation returns red error text, stop at that step. Read the first error rather than continuing to launch the app. Command not found usually means a missing tool; no package.json usually means the wrong folder; ECONNREFUSED usually means a required server or database is not running; EADDRINUSE means another process already uses the port.

When asking for help, include your operating system, the guide URL and step number, the exact command you entered, and the first error message. Remove passwords, API keys, tokens and the password portion of any database URL. Do not send your .env files. A screenshot of the error can help, but copyable text is easier to diagnose.