A command-line tool for batch replacement of files in NeFS archive files, automating the modding workflow for Ego Engine games.
The original NeFSedit GUI required manual file-by-file replacement. AutoNeFS automates this process using manifest files, enabling efficient batch operations for game modding.
- ✅ Manifest-based Batch Replacement: Define multiple file operations in a simple TSV format
- ✅ Wildcard Support: Replace multiple files at once using patterns (
*.xml,*.dds, etc.) - ✅ Automatic Backup: Original files are backed up before any operation
- ✅ Headless Execution: Run without GUI, perfect for automated workflows
- ✅ Detailed Logging: Comprehensive reports of success/failure for each operation
- ✅ Auto-detection: Simply double-click the executable - it finds
.nefsfiles and manifest automatically
- Replace only: Insert and remove operations are not implemented
- Archive structure is read-only: Cannot add new files or modify directory structure
- Manifest files only: Only files listed in manifest.tsv are processed
YourProject/
├── AutoNeFS.exe
├── manifest.tsv # Your file replacement list
├── input/ # Your replacement files
│ ├── subtitles/
│ ├── fonts/
│ └── ...
└── nefs/
└── game.nefs # Target archive
# localFilePath targetPath
input/ui/icon.png ui/icons/icon.png
input/textures/body.dds vehicles/car_a/*.dds
input/fonts/*.xml frontend/fonts/*.xml- First column (
localFilePath): Path to your replacement file (supports wildcards) - Second column (
targetPath): Path inside the.nefsarchive (supports wildcards) - Separator: Use TAB character (not spaces!)
Simply double-click AutoNeFS.exe - that's it!
It automatically finds:
manifest.tsvin the current directory.nefsfile in thenefs/subfolder
(Advanced: Use --archive or --manifest options if your files are in different locations)
Most users won't need these, but here are some helpful options:
AutoNeFS.exe --dry-run # Preview changes without applying
AutoNeFS.exe --archive "C:\path\to\game.nefs" # Use different .nefs locationAll Command-line Options (click to expand)
| Option | Description | Default |
|---|---|---|
--archive <path> |
Target .nefs file path | Auto-detect in nefs/ |
--manifest <path> |
Manifest file path | manifest.tsv |
--backup-dir <path> |
Backup folder location | <archive>.bak/ |
--output <path> |
Output file path | Overwrite original |
--on-missing <action> |
Action when target not found (skip|fail) |
skip |
--continue-on-error |
Continue processing on individual failures | true |
--dry-run |
Validate only, don't save changes | false |
--log <path> |
Log file path | AutoNeFS.log |
# Comments start with #
# localFilePath targetPath
# Simple file replacement
input/logo.png ui/logo.png
# Wildcard in target path
input/car_texture.dds vehicles/*/body.dds
# Wildcard in both paths
input/fonts/*.xml frontend/fonts/*.xml
# Multiple wildcards
input/sounds/*.bnk audio/engine/*/sound_*.bnkImportant:
- Fields MUST be separated by TAB character (
\t), not spaces - Empty lines and
#comments are ignored - Paths can use forward slashes (
/) or backslashes (\) - Relative paths are based on the working directory
*- Matches any number of characters?- Matches exactly one character
Examples:
ui/icons/*.png→ All PNG files inui/icons/vehicles/*/body.dds→body.ddsin any subfolder ofvehicles/audio/?.bnk→ Single-character named.bnkfiles
Only needed if you want to specify custom paths or options:
@echo off
AutoNeFS.exe --archive "C:\Games\YourGame\data.nefs"
pauseFor most users, just double-click AutoNeFS.exe - it will auto-detect everything!
AutoNeFS/
├── AutoNeFS.exe # Main executable (ready to use)
├── manifest.tsv # Manifest template
├── icon.ico # Application icon
├── .gitignore # Git ignore rules
├── LICENSE # MIT License
├── README.md # This documentation
└── ego.nefsedit-master/ # Source code
├── VictorBush.Ego.NefsLib/ # NeFS library
├── VictorBush.Ego.NefsEdit/ # GUI version (original)
└── VictorBush.Ego.NefsEdit.Cli/ # CLI version (this tool)
├── Program.cs # Entry point
├── CliOptions.cs # Command-line parser
├── ManifestParser.cs # Manifest parser
└── ArchivePatcher.cs # Archive patcher
When using the tool, create this structure:
YourProject/
├── AutoNeFS.exe # Downloaded from releases
├── manifest.tsv # Your manifest file
├── input/ # Create: Your replacement files
│ ├── fonts/
│ ├── textures/
│ └── ...
└── nefs/ # Create: Your .nefs files
└── game.nefs
- .NET 8.0 SDK
Standard build:
cd ego.nefsedit-master
dotnet build VictorBush.Ego.NefsEdit.Cli/VictorBush.Ego.NefsEdit.Cli.csproj -c ReleaseCreate single-file executable:
dotnet publish VictorBush.Ego.NefsEdit.Cli/VictorBush.Ego.NefsEdit.Cli.csproj \
-c Release \
-r win-x64 \
--self-contained true \
-p:PublishSingleFile=true \
-p:PublishTrimmed=falseOutput location: artifacts/publish/VictorBush.Ego.NefsEdit.Cli/release_win-x64/AutoNeFS.exe
"Archive file not found"
- Ensure
.nefsfile is in thenefs/folder, or use--archiveto specify the path - Use quotes for paths with spaces:
--archive "C:\My Game\data.nefs"
"Replacement file not found"
- Check that
localFilePathin manifest matches the actual file location - Relative paths are based on the current working directory
"Target item not found"
- Verify
targetPathmatches the actual path inside the archive - Paths are case-insensitive
- Default behavior is to skip (
--on-missing skip), usefailto abort
"Wildcard matched no files"
- Check wildcard pattern syntax
- Use the original NeFSedit GUI to browse archive structure
- Verify path separators match (
/vs\)
Operations are logged to AutoNeFS.log:
[INF] AutoNeFS started
[INF] Archive: nefs/game.nefs
[INF] Loaded 5 manifest items
[INF] ✓ ui/logo.png
[INF] ✓ vehicles/*.dds (3 files replaced)
[INF] ✓ frontend/fonts/*.xml (7 files replaced)
[WRN] ⊘ audio/missing.bnk (target not found, skipped)
[INF] === Operation completed ===
[INF] Total items: 5
[INF] Success: 11
[INF] Failed: 0
[INF] Skipped: 1
- Replace only: Only the
replaceoperation is implemented. Cannot insert new files or remove existing ones. - Archive structure is immutable: Cannot add new entries or modify the directory structure.
- Same file for wildcards: When using wildcards, all matched files are replaced with the same source file.
- No encryption support: Encrypted archives may not be supported.
MIT License - Based on the original ego.nefsedit project.
See LICENSE for details.
- Original Library: VictorBush/ego.nefsedit - NeFS library and GUI tool
- CLI Automation: AutoNeFS Project - Command-line interface and batch processing
For issues, questions, or contributions:
- Check
AutoNeFS.logfor detailed error messages - Use the original NeFSedit GUI to inspect archive structure
- Verify your
manifest.tsvuses TAB characters (not spaces) - Report issues on the GitHub repository