MCPcopy Index your code
hub / github.com/expo/atlas

github.com/expo/atlas @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
236 symbols 681 edges 114 files 28 documented · 12%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Expo Atlas

Inspect your Metro bundle, on module level.

🚀 How to use it

Atlas is built into Expo starting from SDK 51, and enabled when defining the environment variable EXPO_UNSTABLE_ATLAS=true.

You can use Atlas with two Expo commands: - $ expo start → Start a local dev server, Atlas will listen to any change within your project. - $ expo export → Export your app to Android, iOS, or web. Atlas will generate the atlas.jsonl file.

Using $ expo start

When enabling Atlas with the local dev server, you can access Atlas on http://localhost:8081/_expo/atlas. This shows you all information from the bundle loaded during development.

$ EXPO_UNSTABLE_ATLAS=true npx expo start

[!TIP] Expo start runs in development mode by default. If you want to see a production bundle of your app, you can start the local dev server in production mode: $ expo start --no-dev.

Using $ expo export

When enabling Atlas during exports, Expo generates the .expo/atlas.json file in your project. This file contains all bundle information, including the actual source code of individual files. You can open the Atlas file through npx expo-atlas [path/to/atlas.jsonl].

# Export the app for all platforms
$ EXPO_UNSTABLE_ATLAS=true npx expo export --platform all

# Open Atlas using the default `.expo/atlas.jsonl` path
$ npx expo-atlas
# Open Atlas from a shared file
$ npx expo-atlas ./path/to/atlas.jsonl

🏛️ Project structure

🧑‍💻 Contributing to Atlas

Atlas is open source and contributions are welcome.

🏗️ Preparing the repository

  • Clone this repository
  • $ bun install — Atlas uses Bun's package manager, ensure you have it installed

🎨 Changing the Atlas UI

If you need to change anything related to the Atlas UI, you need to:

📊 Changing the Atlas data

If you need to change anything related to extracting data from Metro, you need to:

  • $ cd packages/expo-atlas — Make the changes in expo-atlas
  • $ bun start — Build expo-atlas on any change
  • Open another terminal
  • $ cd apps/example — Atlas has a default Expo project to experiment with
  • $ bun start — The example project automatically enables Atlas through apps/example/.env
  • $ bun expo export — The example project can also export an .expo/atlas.jsonl file
  • $ bun expo-atlas — When exporting an .expo/atlas.jsonl file, you can open Atlas using this export

📦 Releasing a new version

If you need to release a new version of Atlas, you need to:

  • Make sure you have no uncomitted changes and have checked out main
  • Update the package version in expo-atlas/package.json
  • Commit the new version to main
  • $ bun install — Make sure to install all dependencies
  • $ bun run build — Build both expo-atlas and expo-atlas-ui
  • $ cd packages/expo-atlas && npm publish — Release a new version of Atlas

with ❤️  Expo

Extension points exported contracts — how you extend this code

AtlasSource (Interface)
(no doc) [4 implementers]
packages/expo-atlas/src/data/types.ts
TreemapSeriesCallbackDataParams (Interface)
* This type exists in `echarts`, but is not properly exposed. * @see https://github.com/apache/echarts/blob/c576f0c395e
packages/expo-atlas-ui/components/BundleGraph.tsx
TreePathInfo (Interface)
* This type exists in `echarts`, but is not properly exposed. * @see https://github.com/apache/echarts/blob/c576f0c395e
packages/expo-atlas-ui/components/BundleGraph.tsx
State (Interface)
(no doc)
packages/expo-atlas-ui/ui/Toast.tsx

Core symbols most depended-on inside this repo

cn
called by 52
packages/expo-atlas-ui/utils/classname.ts
getSource
called by 8
packages/expo-atlas-ui/utils/atlas.ts
getPackageNameFromPath
called by 7
packages/expo-atlas/src/utils/package.ts
convertPathToPosix
called by 6
packages/expo-atlas/src/utils/paths.ts
parseJsonLine
called by 6
packages/expo-atlas/src/utils/jsonl.ts
validateAtlasFile
called by 6
packages/expo-atlas/src/data/AtlasFileSource.ts
createAtlasFile
called by 6
packages/expo-atlas/src/data/AtlasFileSource.ts
getBundle
called by 6
packages/expo-atlas/src/data/types.ts

Shape

Function 199
Method 23
Class 10
Interface 4

Languages

TypeScript100%

Modules by API surface

packages/expo-atlas/src/data/MetroGraphSource.ts21 symbols
packages/expo-atlas/src/data/AtlasFileSource.ts16 symbols
packages/expo-atlas-ui/utils/treemap.ts10 symbols
packages/expo-atlas-ui/ui/Toast.tsx9 symbols
packages/expo-atlas-ui/providers/hmr/hmr-client.ts9 symbols
packages/expo-atlas-ui/components/BundleGraph.tsx8 symbols
packages/expo-atlas/src/utils/errors.ts7 symbols
packages/expo-atlas-ui/utils/shiki.ts6 symbols
packages/expo-atlas-ui/ui/Layout.tsx6 symbols
packages/expo-atlas-ui/providers/hmr/hmr-provider.tsx6 symbols
packages/expo-atlas/src/data/types.ts5 symbols
packages/expo-atlas-ui/components/StateInfo.tsx5 symbols

For agents

$ claude mcp add atlas \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact