Real-time terminal UI debugger for React Native
Salvetron is a real-time debugging tool for React Native developers, delivered as a terminal UI (TUI). The Salvetron CLI runs a WebSocket server in your terminal and renders incoming telemetry — JS logs, native logs, network traffic, and live performance metrics — from your running app. Your app streams that telemetry using the companion SDK, @salve-software/salvetron-react-native.
- Dashboard - Live performance overview: UI/JS FPS, memory and CPU usage, with sparkline history
- JS Logs - Stream JavaScript console logs with level filtering (debug, info, warn, error) and an expandable detail panel for metadata
- Network Inspector - Inspect HTTP requests and responses: method, status, duration, headers, and pretty-printed bodies
- Native Logs - View iOS and Android platform logs in real-time, with source tags
- Keyboard-driven TUI - Navigate panels and lists entirely from the keyboard; no GUI required
- Zero-config WebSocket server - Starts on port 8765 by default (override with
SALVETRON_PORT)
Salvetron has two parts:
┌──────────────────────────┐ WebSocket ┌──────────────────────────┐
│ React Native App │ ───────────────────────▶ │ Salvetron CLI │
│ @salve-software/ │ port 8765 │ (terminal UI debugger) │
│ salvetron-react-native │ │ │
└──────────────────────────┘ └──────────────────────────┘
│ │
├── JS Console Logs ├── Dashboard (FPS/CPU/memory)
├── Native Logs (iOS/Android) ├── JS Logs viewer
├── Network Requests/Responses ├── Network Inspector
└── Performance Metrics └── Native Logs viewer
-
Salvetron CLI (
salvetron): an Ink-based terminal UI that runs a WebSocket server and renders telemetry from connected apps. -
salvetron-react-native (SDK): A React Native package built with Nitro Modules that captures logs, network activity, and performance metrics and streams them to the CLI.
| Component | Requirement |
|---|---|
| Salvetron CLI | Node.js 18+ |
| React Native SDK | React Native 0.73+ |
| Xcode | 15+ (for iOS development) |
| Android Studio | Latest (for Android development) |
-
Clone the repository:
git clone https://github.com/Salve-Software/salvetron.git cd salvetron yarn install -
Start the CLI:
yarn dev # starts the Salvetron CLI (Ink TUI) on port 8765Or, once published:
npx salvetron
Override the port with the
SALVETRON_PORTenvironment variable:SALVETRON_PORT=9000 yarn dev
-
Install the package in your React Native project:
# Using npm npm install @salve-software/salvetron-react-native # Using yarn yarn add @salve-software/salvetron-react-native
-
For iOS, install pods:
cd ios && pod install && cd ..
-
For Android, the package will auto-link. Run a gradle sync if needed.
Run yarn dev (or npx salvetron) in your terminal. The CLI starts a WebSocket server on port 8765 and shows the Dashboard. Use the tab bar / keyboard shortcuts shown in the status bar to switch between Dashboard, JS Logs, Network, and Native Logs. Connected device info appears in the header once your app connects.
Add the following code to your React Native app's entry point (e.g., App.tsx or index.js):
import Salvetron from '@salve-software/salvetron-react-native';
// Connect only in development mode
if (__DEV__) {
Salvetron.connect({
host: '192.168.1.100', // Your Mac's IP address
port: 8765,
enableNetworkCapture: true,
onConnect: () => console.log('Connected to Salvetron!'),
onDisconnect: () => console.log('Disconnected from Salvetron'),
onError: (error) => console.error('Salvetron error:', error),
});
}Tip: Use
localhostwhen running on iOS Simulator, or your Mac's local IP address for physical devices.
Establishes a WebSocket connection to the Salvetron CLI.
interface SalvetronConfig {
host?: string; // Default: 'localhost'
port?: number; // Default: 8765
enableNetworkCapture?: boolean; // Default: true
ignoredUrls?: RegExp[]; // URL patterns to ignore
onConnect?: () => void;
onDisconnect?: () => void;
onError?: (error: Error) => void;
}Closes the WebSocket connection.
Salvetron.disconnect();Returns the current connection status.
const connected = Salvetron.isConnected(); // boolean// Send logs with different levels
Salvetron.log('General log message');
Salvetron.debug('Debug information', { userId: 123 });
Salvetron.info('Informational message');
Salvetron.warn('Warning message');
Salvetron.error('Error message', { stack: error.stack });All logging methods accept an optional metadata object as the second parameter.
Problem: App can't connect to the Salvetron CLI
Solutions:
- Ensure the Salvetron CLI is running (
yarn dev/npx salvetron) - Check that both devices are on the same network
- Verify the IP address is correct (use
ifconfigto find your machine's IP) - Check if port 8765 is not blocked by firewall
- For iOS Simulator, use
localhostinstead of IP address
Problem: HTTP requests are not appearing in the Network tab
Solutions:
- Ensure
enableNetworkCapture: trueis set in the config - Check if the URL isn't in the
ignoredUrlslist - Default ignored URLs include Metro bundler (port 8081) and hot reload endpoints
Problem: Console logs are not showing in the Salvetron CLI
Solutions:
- Verify the connection is established (
Salvetron.isConnected()) - Ensure you're running in development mode (
__DEV__ === true) - Confirm the CLI shows your device in the header
Problem: The Salvetron CLI process using too much memory
Solutions:
- Clear logs periodically from the JS Logs / Native Logs panels
- Reduce the number of connected devices
- Filter out verbose logs at the source
We welcome contributions! Here's how you can help:
- Fork the repository
- Clone your fork:
git clone https://github.com/your-username/salvetron.git
- Create a new branch:
git checkout -b feature/your-feature-name
feature/- New featuresfix/- Bug fixesdocs/- Documentation updatesrefactor/- Code refactoringtest/- Adding or updating tests
Follow conventional commits:
type(scope): description
Examples:
feat(sdk): add custom log levels support
fix(app): resolve memory leak in log viewer
docs(readme): update installation instructions
- Ensure your code follows the existing style
- Update documentation if needed
- Test your changes thoroughly:
- For Salvetron CLI: run
yarn devand verify with the simulator (yarn sim) - For SDK: Test with the example app
- For Salvetron CLI: run
- Create a Pull Request with a clear description
salvetron (CLI, TypeScript / Ink):
- Use TypeScript for all source files
- Keep modules organized under
src/modules/<feature>and shared UI undersrc/shared - Run
yarn typecheckbefore opening a PR
salvetron-react-native (SDK, TypeScript):
- Use TypeScript for all source files
- Follow existing patterns in the codebase
- Document public APIs with JSDoc comments
cd packages/salvetron-react-native/example
yarn install
cd ios && pod install && cd ..
yarn ios # or yarn androidThis project is licensed under the MIT License - see below for details:
MIT License
Copyright (c) 2024 Salvetron Contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Made by Salve Software

