commit-master
v0.2.2
Published
Git utilities for per-file commits, historical scheduling, sharing changes, and safe project stashing.
Downloads
903
Maintainers
Readme
Git Commit CLI Toolkit
A command-line collection of Git utilities for automatic per-file commits, historical commit scheduling, sharing changed files, and safe project stashing.
Features
- Automatic per-file Git commits
- Backdated commit scheduling
- Copy changed file paths
- Copy changed files as Markdown
- Bundle any folder without Git
- Bundle multiple repositories
- Save and reuse repository workspaces
- Safe project stashing
- File or text clipboard output
- macOS, Windows, and Linux support
Installation
Install globally
npm install --global commit-masterNode.js 18.18 or newer is required. Git is required for Git-specific commands. filebundle does not require Git.
How to Use
Open your project in the terminal:
cd path/to/your-projectAvailable commands:
gitauto
gitspan <duration> <commits-per-day>
gitpaths
gitbundle
filebundle
filebundle --output
filebundle --output file
filebundle --output text
gitbundle ./frontend ./api
gitbundle --all [workspace-path]
gitbundle --save <name> ./frontend ./api
gitbundle @<name>
gitbundle --list
gitbundle --delete <name>
gitstash ["stash title"]Git commands work with the repository of the current project. filebundle works with the current folder whether or not it is a Git repository.
Automatic Git Initialization
If the current project is not a Git repository, Commit Master asks:
Git is not initialized in this project.
Initialize it now? (Y/n)Press Enter or answer Yes to initialize Git and continue the original command. Answer No to cancel without changing the project.
Non-interactive environments such as CI never initialize Git or wait for input.
gitbundle workspace discovery and explicit repository paths only use repositories that already exist. filebundle never checks for or initializes Git.
Automatic File Commits
Use gitauto to commit every current file change separately:
gitautoEach added, updated, deleted, or renamed file receives its own commit.
Example:
Add users.ts
Update package.json
Delete legacy-config.ts
Rename old-name.ts to new-name.tsBackdated Timestamping Commits
Use gitspan to distribute current file changes across previous calendar days:
gitspan 10 5Arguments:
10 = number of days
5 = maximum commits per dayIf the requested range is too small for all changes, Commit Master automatically expands it further into the past.
For example, 58 changes with a maximum of 5 commits per day require 12 days.
Copy Changed File Paths
Use gitpaths to copy the absolute paths of eligible changed files:
gitpathsIt collects:
- staged changes
- unstaged tracked changes
- untracked non-ignored files
- deleted paths
- renamed paths under their new name
Results are deduplicated and sorted.
Example clipboard content:
/completeProjectPath/Design.md
/completeProjectPath/package.json
/completeProjectPath/src/components/Icon.vue
/completeProjectPath/src/index.tsgitpaths copies file paths only and never reads their contents.
If there are no eligible changes, your existing clipboard is left unchanged.
Copy a Markdown Change Bundle
Use gitbundle to copy eligible changed files as Markdown:
gitbundleThe bundle includes file paths, change types, and readable file contents.
Commit Master handles common file types automatically:
- SVG files are included as readable source.
- DOCX files include extractable document text.
- PDF files include extractable page text.
- PPTX files include extractable slide text and speaker notes.
- Embedded images and charts are represented with placeholders.
- Images, audio, video, archives, databases, models, native binaries, and similar binary files are shown with placeholders instead of raw binary data.
- Sensitive files are shown without exposing their contents.
- Scanned or image-only PDFs are not OCR'd.
Common placeholders include:
[SENSITIVE FILE OMITTED]
[FILE DELETED]
[FILE NOT FOUND]
[FILE UNREADABLE]
[FILE TOO LARGE]
[Embedded image omitted]
[Embedded chart omitted]
[PDF contains no extractable text - OCR not enabled]Bundle Limits
To prevent unexpectedly large clipboard payloads:
- individual textual files are limited to 1 MiB
- extracted document text is limited to 1 MiB
- DOCX, PDF, and PPTX source files may be up to 32 MiB
- the complete Markdown bundle is limited to 10 MiB
Binary files represented by placeholders are not loaded into the Markdown bundle.
Symbolic links are represented safely and are not followed outside the repository.
Bundle Multiple Repositories
Bundle several repositories together:
gitbundle ./frontend ./api
gitbundle /path/to/web-client /path/to/api-serviceRepository paths are resolved to their Git roots, and duplicate repositories are included only once.
Use --all to discover repositories below a workspace:
gitbundle --all
gitbundle --all /path/to/workspaceDiscovery skips common dependency, build, Git, and cache directories. Clean repositories are reported but excluded from the final bundle.
Save and Reuse Workspaces
Save a repository workspace:
gitbundle --save project-workspace ./frontend ./api
gitbundle --all --save project-workspaceUse it later:
gitbundle @project-workspaceList saved workspaces:
gitbundle --listDelete one:
gitbundle --delete project-workspaceWorkspace names support letters, numbers, hyphens, and underscores.
Saved workspaces store repository paths only. They do not store file contents or Git changes.
Bundle Any Folder Without Git
Use filebundle to bundle files from any folder:
cd ~/Documents/project-files
filebundleUnlike gitbundle, filebundle does not use Git. It recursively bundles eligible files from the current folder.
By default, filebundle creates a .md file outside the selected project and copies that file itself to the clipboard.
Copy Markdown Text Instead
Set text output:
filebundle --output textReturn to file output:
filebundle --output fileCheck the current setting:
filebundle --outputThe preference is global and applies across terminals, folders, and projects.
file is the default output mode.
filebundle does not use .gitignore. A .gitignore file is treated as a normal file, while Commit Master's built-in exclusions still apply.
Default Clipboard Ignore Rules
Commit Master automatically skips common generated, dependency, build, cache, lock, and temporary files.
Ignored Files
Exact names include:
yarn.lock
pnpm-lock.yaml
bun.lockb
Cargo.lock
generated.ts
mongoose.gen.ts
resolvers.generated.ts
typeDefs.generated.ts
types.generated.ts
tsconfig.tsbuildinfo
tsconfig.node.tsbuildinfo
.DS_StoreGenerated patterns include:
*.generated.ts
vite.config.ts.timestamp-*Ignored Directories
These are ignored at any depth:
_locales
src-tauri/target
gen
temp
ffmpeg
dist
.xcode
vendor/bundle
.git
Pods
.nuxt
.next
.idea
.bundle
node_modules
cacheNoise extensions such as these are also ignored:
.log
.TAG
.csvpackage.json is intentionally included.
Binary and Document Files
gitpaths omits common binary and document files because it copies filesystem paths intended for review.
gitbundle keeps useful assets visible:
- SVG is included as readable source.
- DOCX, PDF, and PPTX include extractable text.
- Images, media, archives, databases, models, WASM, native binaries, and other binary files appear with content-omitted placeholders.
Sensitive Files
Sensitive paths remain visible when useful, but their contents are protected.
Examples include:
.env
.env.*
private keys
credential JSON files
.npmrc
.pypirc
.netrcBehavior:
gitpathscopies their paths only.gitbundlereplaces their contents with[SENSITIVE FILE OMITTED].
This applies even when the sensitive file is already tracked by Git.
Clipboard and Platform Support
Commit Master supports macOS, Windows, and Linux.
macOS
Text and file clipboard operations use native macOS clipboard capabilities.
Windows
File output is copied as a native file item, and text clipboard operations support Unicode paths and content.
Linux
For normal filebundle file output, Commit Master automatically installs and uses its native clipboard helper.
Supported architectures:
x64
arm64You do not need to install wl-copy, xclip, or xsel for normal file-mode usage.
For text clipboard commands such as:
gitpaths
gitbundle
filebundle --output textCommit Master uses an available Linux clipboard provider such as:
wl-copy
xclip
xselIf none is available, Commit Master reports that a supported clipboard provider is required.
Headless Linux environments do not provide a desktop file clipboard.
File pasting also depends on the destination application supporting file clipboard items.
Stash Project Changes
Use gitstash to save current project changes:
gitstashThe default stash title is:
Commit Master stashUse a custom title:
gitstash "Before updating authentication"gitstash includes:
- staged changes
- unstaged changes
- deleted files
- renamed files
- untracked non-ignored files
Git-ignored files remain untouched.
Existing stash entries are preserved.
If there is nothing to stash:
Nothing to stash. The working tree is clean.Unsafe merge, rebase, cherry-pick, revert, bisect, or conflict states are rejected before stash creation.
Use normal Git commands to inspect or restore stashes:
git stash list
git stash apply
git stash popgitstash creates a stash only. It never automatically applies, pops, deletes, or overwrites an existing entry.
