Package Exports
- ntrn
Readme
๐ next-to-react-native
_ _ _____ ____ _ _
| \ | |_ _| _ \| \ | |
| \| | | | | |_) | \| |
| |\ | | | | _ <| |\ |
|_| \_| |_| |_| \_\_| \_|
Effortlessly convert your Next.js App Router project into a fully functional React Native Expo app using this zero-config CLI tool.
โจ Features
- โก๏ธ Instantly converts your Next.js
app/
directory to React Native screens - ๐ฆ Transforms
layout.tsx
intoApp.tsx
- ๐ฏ Handles
page.tsx
and routes into Expo-compatible screens - ๐ง Powered by Gemini API for JSX โ React Native conversion
- ๐จ Tailwind CSS support via NativeWind
- ๐ Creates React Native standard structure (screens, assets, etc.)
- ๐ Outputs required dependencies in
requirements.txt
๐ฆ Installation
You will require:
- Node JS
- Gemini API
- clone repo from GitHub.
Process to work on.
- Update .env file from project
npm link
npm install -g ntrn
After installing and setting up repo and .env
to update the ntrn
npm link
๐ Quick Start
ntrn
Run this command inside the root of your Next.js App Router project.
It will generate a complete Expo React Native app inside converted-react-native/
.
๐ File & Folder Mapping
From (Next.js) | To (React Native) |
---|---|
app/layout.tsx |
App.tsx |
app/page.tsx |
screens/HomeScreen.tsx |
public/ |
assets/ |
@/components/* |
Preserved and reused |
โ๏ธ CLI Options
ntrn --help
Option | Description |
---|---|
--version |
Show CLI version |
--convert |
Convert app/ directory to React Native |
--tailwind |
Enable Tailwind detection (NativeWind auto) |
๐ธ Terminal Demo
๐ง Powered By
- Gemini API
- Expo
- NativeWind
- React Native
- Built with โค๏ธ for developers
๐งช Roadmap
- Automatic dependency installation (optional)
- Tailwind class converter (full support)
- CLI config file support
- Auto-detect
pages/
routing fallback - Dark mode README and Docs
๐ค Contributing
We love contributions!
Please check out our CONTRIBUTING.md before submitting a pull request.
You can:
- Open issues ๐
- Suggest new features ๐
- Improve the CLI or documentation ๐
๐ Community
Join discussions, ask questions, and share ideas:
- GitHub Discussions
- Twitter (Formarly known as X) (mention us!)
๐ซ Stay in Touch
If you like this project, show some โค๏ธ
- โญ Star the repo
- ๐ฆ Tweet about it
- ๐ข Share with your team
๐ License
This project is licensed under the MIT License.
Do whatever you want, just give credit.