A CLI tool for creating, linking, and bundling native modules in Lynx projects.
Install globally using npm:
npm i -g nanofuxion/tamer4lynx
Or with Bun:
bun add -g nanofuxion/tamer4lynx
Tamer4Lynx uses configuration files to manage your project.
tamer.config.json
)Create this file in the root of your repository to define your main application's properties.
You can interactively generate your config file using:
t4l init
Or simply run:
t4l
If no arguments are provided, the CLI will launch the interactive setup.
The script will prompt for:
~
, $ENV_VAR
)Example output:
{
"android": {
"appName": "MyApp",
"packageName": "com.example.myapp",
"sdk": "~/Library/Android/sdk"
},
"ios": {
"appName": "MyApp",
"bundleId": "com.example.MyApp"
},
"lynxProject": "packages/example"
}
Note: To ensure assets like images are bundled into the app, import them with the ?inline
suffix. For example:
import logo from './assets/lynx-logo.png?inline';
This will include the asset directly in your app bundle.
t4l --help
t4l --version
t4l android create
t4l android link
t4l android bundle
t4l ios create
t4l ios link
t4l ios bundle
# Link only iOS
t4l link --ios
# Link only Android
t4l link --android
# Link both iOS and Android
t4l link --both
# Silent mode (no logs)
t4l link --silent
For the best experience, add a postinstall
script to your project's package.json
:
"scripts": {
"postinstall": "t4l link --silent"
}
tamer.json
)Place this file in the root of each native module package you create.
{
"android": {
"moduleClassName": "com.my-awesome-module.MyAwesomeModule",
"sourceDir": "android"
}
}
create.ts
filesWorking native modules for both Android and iOS:
Note: These modules are included as git submodules. The iOS autolinking feature is now fully functional and will automatically run pod install
for you.
Contributions are welcome! Please feel free to submit issues or pull requests.
If you find this tool helpful, consider supporting its development.