Nearwait copies project files to the clipboard according to what's specified in a local manifest YAML file.
Working with GPT to iterate on editing project files.
- Recursively scans the current directory for files
- Generates a manifest file (default:
.nearwait.yml) with all files initially commented out - Allows user to manually edit the manifest to enable specific files
- Generates a txtar archive (default
.nearwait.txtar) based on the enabled files in the manifest - Automatically copies the txtar content to the clipboard when enabled files are present
- Run Nearwait in your project directory:
This generates the initial
nearwait.nearwait.ymlmanifest with all files commented out. - Edit the
.nearwait.ymlfile to uncomment (enable) the files you want to include:filelist: # - /path/to/excluded/file.txt - /path/to/included/file.txt
- Run Nearwait again to process the manifest and generate the txtar archive:
nearwait - If there are enabled files in the manifest, the txtar content will be automatically copied to your clipboard.
--force: Force overwrite of existing manifest--debug: Keep temporary directory for debugging--manifest <filename>: Specify a custom name for the manifest file (default:.nearwait.yml)--verbose,-v: Enable verbose mode--log-format: Set log format to 'json' or 'text' (default is text)--config: Specify a config file (default is $HOME/.nearwait.yaml)--batch-kbytes: Maximum size of each batch in kilobytes (0 = no batching)--wait-batch: Wait for user confirmation before copying next batch
- The tool ignores certain directories by default (e.g.,
.git,node_modules, etc.) - The txtar archive is named based on the manifest filename (e.g.,
.nearwait.txtarfor the default manifest)
To install Nearwait, ensure you have Go installed on your system, then run:
go install github.com/gkwa/nearwait@latest
To build Nearwait from source:
- Clone the repository:
git clone https://github.com/gkwa/nearwait.git - Navigate to the project directory:
cd nearwait - Build the project:
go build