zipsrc 1.0.0
dotnet tool install --global zipsrc --version 1.0.0
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
dotnet tool install --local zipsrc --version 1.0.0
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=zipsrc&version=1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
nuke :add-package zipsrc --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
"dnx zipsrc" command
Overview
"dnx zipsrc" is a .NET global tool that creates a zip archive from source files in your project, using .gitignore patterns to exclude artifacts, dependencies, and other non-source files.
System Requirements
.NET SDK Version 10.0 or later is required.
Usage
dnx zipsrc [options]
| Option | Description |
|---|---|
-d, --directory <directory> |
Specifies the target directory path to create a zip archive. Default is the current directory. |
-n, --name <file> |
Specifies the output zip file path. If not specified, the default name is determined automatically. For more details, see the following document. |
What gets zipped
- Recursively scans the specified directory (including subdirectories) and collects files to zip.
- Focuses on source code and other development-relevant files. Typical non-source artifacts are excluded (e.g.,
bin/,obj/for .NET projects,node_modules/for Node.js, and other build outputs, caches, or downloaded dependencies). .zipfiles are always excluded from the archive.
How ignore rules are applied
- Ignore rules are based on
.gitignorepatterns.- If the target directory contains a
.gitignore, its rules are honored. - If there is no
.gitignoreat the target directory, the tool falls back to the default rules equivalent to those fromdotnet new gitignore. .gitignorefiles in subdirectories are also read and respected. Negation patterns (e.g.,!pattern) are correctly handled.
- If the target directory contains a
Output file naming
- When
-n|--nameis specified:- If the provided name does not end with
.zip, the.zipextension is automatically appended.
- If the provided name does not end with
- When
-n|--nameis not specified, the output file name is decided as follows:- If a
.slnor.slnxfile exists in the target directory, the base name of that solution file plus.zipis used. - Otherwise, the target directory name plus
.zipis used.
- If a
- If a file with the chosen name already exists, a numeric suffix like
(2),(3), ... is appended to create a new non-conflicting name.
Examples
- Zip the current directory using defaults:
dnx zipsrc - Zip a specific directory:
dnx zipsrc -d ./src/MyApp - Specify an explicit output name (extension auto-appended if missing):
dnx zipsrc -d ./src/MyApp -n ./artifacts/MyAppSource # => produces ./artifacts/MyAppSource.zip
Release Notes
See the Releases
License
- Mozilla Public License 2.0
- Third Party Notices is here
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0 | 87 | 1/7/2026 |
v.1.0.0
- Initial release.
To see all the change logs, please visit the following URL.
- https://github.com/jsakamoto/dnx-zipsrc/blob/main/RELEASE-NOTES.txt