Quickstart
MentraOS is how you write powerful smart glasses apps. In this Quickstart, let's go from 0 to fully functioning app (that works on these smart glasses) in less than 15 minutes.
Prerequisites
- Node.js (v18 or later)
- Bun
- Basic TypeScript knowledge
Building Your First App
The quickest way to get started is using our example app. This guide assumes you have a pair of compatible smart glasses connected to a phone running the MentraOS app.
Install MentraOS on your phone
Download MentraOS from mentra.glass/os
Set up ngrok
We are going to use ngrok to expose your local app to the internet. This is useful for development, but when you're ready to go live, you'll want to deploy to a cloud service like Railway or an Ubuntu server.
- Install ngrok
- Create an ngrok account
- Set up a static address/URL in the ngrok dashboard
- Make sure you run the
ngrok config add-authtoken <your_authtoken>
line. - Make sure you select
Static Domain
, then generate a static domain.

Register your app with MentraOS
- Navigate to console.mentra.glass
- Click "Sign In" and log in with the same account you're using for MentraOS
- Click "Create App"
- Set a unique package name like
com.yourName.yourAppName
- For "Public URL", enter your ngrok static URL (if using ngrok)
- In the edit app screen, add the microphone permission. See the Permissions guide for details.
This automatically installs the app for your user. For other people to test the app (including others in your organization), they need to install the app. Get the app install link from the app edit page under the
Share with Testers
section.
Get your app running
-
Choose an example app template based on your smart glasses type from our Example Apps page. For this quickstart, we'll use the Live Captions example:
gh repo create --template Mentra-Community/MentraOS-Cloud-Example-App
Note: See our Example Apps page for other examples, including camera-based apps for non-HUD glasses and more advanced examples with additional features.
-
Clone your new repo locally:
git clone <your-repo-url>
-
Navigate to your repo directory and install dependencies:
cd <your-repo-name>
bun install -
Set up your environment variables:
- Create a
.env
file in the root directory by copying the example:cp .env.example .env
- Edit the
.env
file with your app details:PORT=3000
PACKAGE_NAME=com.yourName.yourAppName
MENTRAOS_API_KEY=your_api_key_from_console - Make sure the
PACKAGE_NAME
matches what you registered in the MentraOS Console - Get your
API_KEY
from the MentraOS Developer Console
- Create a
-
Run your app:
bun run dev
-
Expose your app to the internet with ngrok:
ngrok http --url=<YOUR_NGROK_URL_HERE> 3000
Note:
3000
is the port. It must match what is in the app config. If you changed it to8080
, use8080
for ngrok instead.
IMPORTANT: After making changes to your app code or restarting your server, you must restart your app inside the MentraOS phone app.
For more example apps and detailed information about each, visit our Example Apps page.
Next Steps
- Explore the Build From Scratch guide for a more detailed walkthrough
- Check out our Example Apps page for more templates and advanced examples
- Learn about Core Concepts to understand how MentraOS apps work
- Read about Permissions to access device capabilities like microphone and location
- Join our Discord community for help and support