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 or the public URL of your server
-
After the app is created, you will be given an API key. Copy this key and use it in the
.envfile below. -
You can now add settings and tools to your app via the MentraOS Developer Console. Let's upload this example's
app_config.jsonfile by clicking the "Import app_config.json" button under Configuration Management:
-
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-Extended-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
MENTRAOS_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

