https://github.com/supermarsx/nodejs-sea-hide-passthrough
NodeJS SEA passthrough and hide window
https://github.com/supermarsx/nodejs-sea-hide-passthrough
hide nodejs sea window
Last synced: 6 months ago
JSON representation
NodeJS SEA passthrough and hide window
- Host: GitHub
- URL: https://github.com/supermarsx/nodejs-sea-hide-passthrough
- Owner: supermarsx
- License: mit
- Created: 2023-08-10T13:39:04.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-08-10T13:44:48.000Z (almost 3 years ago)
- Last Synced: 2025-07-30T12:00:51.738Z (11 months ago)
- Topics: hide, nodejs, sea, window
- Language: AutoIt
- Homepage:
- Size: 1.95 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license.md
Awesome Lists containing this project
README
# nodejs-sea-hide-passthrough






[](https://github.com/supermarsx/nodejs-sea-hide-passthrough/actions/workflows/ci.yml)
This a simple binary passthrough that hides the console window when a SEA (Single Executable Application) is opened. Useful when you want a simple nodejs SEA to run on the background and don't show any console windows. It also passes along every console argument through.
## Usage
1. Download the latest release (`nodejs-sea-hide-passthrough.exe` and `config.ini`).
2. Place both files in the same directory as your Node.js SEA (or any other executable you want to hide).
3. Edit `config.ini` and set `Target=YOUR_APP_NAME.exe`.
4. Run `nodejs-sea-hide-passthrough.exe`. It will launch your app in a hidden window and pass all arguments to it.
## Configuration (config.ini)
The behavior is controlled by `config.ini`:
```ini
[Settings]
; The name of the Single Executable Application (SEA) or binary to launch.
Target=helo.exe
```
## Creating a Node.js Single Executable Application (SEA)
If you haven't created a Node.js SEA yet, here is a quick guide based on the [official Node.js documentation](https://nodejs.org/api/single-executable-applications.html).
### 1. Preparation
Create your JavaScript file (e.g., `hello.js`) and a configuration file `sea-config.json`:
**hello.js**
```javascript
console.log(`Hello, ${process.argv[2]}!`);
```
**sea-config.json**
```json
{
"main": "hello.js",
"output": "sea-prep.blob"
}
```
### 2. Generate the Blob
Run the following command to generate the `sea-prep.blob`:
```bash
node --experimental-sea-config sea-config.json
```
### 3. Create the Executable
Copy the node executable to your project folder.
**Windows (PowerShell):**
```powershell
node -e "require('fs').copyFileSync(process.execPath, 'hello.exe')"
```
**Linux/macOS:**
```bash
cp $(command -v node) hello
```
### 4. Inject the Blob
Use `postject` to inject the blob into the executable.
```bash
npx postject hello.exe NODE_SEA_BLOB sea-prep.blob --sentinel-fuse NODE_SEA_FUSE_fce680ab2cc467b6e072b8b5df1996b2
```
*(On macOS, add `--macho-segment-name NODE_SEA`)*
Now you have a standalone `hello.exe`! You can use this `nodejs-sea-hide-passthrough` tool to wrap it and hide the console window.
## License
Distributed under MIT License. See `license.md` for more information.