MentraOS install links: mentra.glass/install
-
brew install ngrok -
Make an ngrok account
-
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's static URL
-
In the edit app screen, add the microphone permission
-
Create a new repo from this template using the
Use this templatedropdown in the upper right or the following command:gh repo create --template Mentra-Community/MentraOS-Cloud-Example-App -
Clone your new repo locally:
git clone <your-repo-url> -
cd into your repo, then type
bun install -
Set up your environment variables:
- Create a
.envfile in the root directory by copying the example:cp .env.example .env - Edit the
.envfile with your app details:PORT=3000 PACKAGE_NAME=com.yourName.yourAppName MENTRAOS_API_KEY=your_api_key_from_console - Make sure the
PACKAGE_NAMEmatches what you registered in the MentraOS Console - Get your
API_KEYfrom the MentraOS Developer Console
- Create a
-
Run your app with
bun run dev -
To expose your app to the internet (and thus MentraOS) with ngrok, run:
ngrok http --url=<YOUR_NGROK_URL_HERE> 30003000is the port. It must match what is in the app config. For example, if you enteredport: 8080, use8080for ngrok instead.
Check out the full documentation at docs.mentra.glass
You can listen for transcriptions, translations, and other events within the onSession function.
