CLI, Bundling & Releases

@solidnative-dev/cli provides the sn CLI (also available as solid-native) for project scaffolding, Babel-free Metro bundling, native iOS/Android builds, testing, diagnostics, and verifiable releases.

Command reference#

CommandPurpose
sn create <name>Scaffold a new app with visible ios/ and android/ projects
sn add navigationAdd TanStack Router + native react-native-screens & patch
sn doctorVerify Node, pnpm, Xcode/Android toolchains, Fabric, and Hermes
sn startStart Metro with the Babel-free OXC Solid 2 transformer
sn run ios|androidBuild, install, and launch on simulator, emulator, or device
sn build ios|androidCompile native Release or Debug artifacts
sn testRun TSX component and unit tests via Node + OXC loader
sn generateGenerate typed Solid bindings from React Native Codegen specs
sn compatibility checkAudit native library compatibility claims
sn bundle ios|androidBuild Hermes production bundle + verifiable manifest
sn fingerprintCompute native binary compatibility SHA-256 fingerprints
sn logs / openStream filtered device logs or dispatch deep links
sn debug ...Capture and inspect device causal traces and UI trees
sn release ...Create, sign, and verify release envelopes

Every mutating or device-executing command supports --dry-run and --json for predictable CI scripting.

Babel-free Metro configuration#

Solid Native replaces Babel inside Metro with a compiled OXC Solid 2 transform worker and strict Solid resolver:

js
const { getDefaultConfig, mergeConfig } = require("@react-native/metro-config");
const {
  createSolidNativeFullReloadPattern,
  createSolidNativeMetroResolver,
  solidNativeTransformWorkerPath,
} = require("@solidnative-dev/metro");

module.exports = mergeConfig(getDefaultConfig(__dirname), {
  transformerPath: solidNativeTransformWorkerPath,
  resolver: {
    resolveRequest: createSolidNativeMetroResolver(__dirname),
    unstable_forceFullRefreshPatterns: [
      createSolidNativeFullReloadPattern(__dirname),
    ],
  },
});

Verifying production bundles & releases#

Verify that a release bundle contains zero react or DevTools imports and matches its manifest digest:

sh
# 1. Build bundle + manifest
sn bundle ios --output build/ios

# 2. Verify bundle integrity & source-map exclusions
sn bundle verify build/ios/solid-native-bundle.json
sn bundle sources build/ios/index.ios.bundle.map \
  --forbid-containing "node_modules/react/" \
  --forbid-containing "@solidnative-dev/devtools"

# 3. Compute native compatibility fingerprint
sn fingerprint --platform all

For production distribution, sn release create, sign, and verify-signature bind the JS bundle manifest, compiled .ipa/.apk/.aab, Android signing certificates, and native compatibility fingerprint into one cryptographically verifiable envelope.