wimpysworld/tailor 是一个托管在 GitHub 上的开源项目,主要使用 Go 编写,采用 Blue Oak Model License 1.0.0 许可证,目前获得 41 个 Star、2 次 Fork。
仓库全名
wimpysworld/tailor
README 摘要
Tailor is a local terminal CLI that keeps GitHub repositories consistent with community health files, security policies, dev tooling, and repository settings. Use it for solo projects or small teams that manage several repositories. Its embedded template files are called swatches. Features Community health files: security policy, code of conduct, contributing and support guides, issue and pull request templates,…
Tailor is a local terminal CLI that keeps GitHub repositories consistent with community health files, security policies, dev tooling, and repository settings.
Use it for solo projects or small teams that manage several repositories. Its embedded template files are called swatches.
Features
Community health files: security policy, code of conduct, contributing and support guides, issue and pull request templates, funding, Dependabot, and a licence fetched from GitHub.
Development tooling: Nix flake, direnv, and just build, test, and lint for Go, Rust, Python, Shell, and JavaScript or TypeScript.
Go releases: GoReleaser archives, native packages, container images, and a builder workflow.
GitHub Pages: a static starter site, or publication of an existing Hugo or Jekyll site.
GitHub wiki: publish the wiki from wiki/ in the repository.
Previews before changes: baste shows every change before alter applies it. Tailor uses free GitHub features only.
Install
First-party signed package repositories are published for Linux, macOS, and Windows through wimpys.world. Choose your platform below for setup instructions and automatic updates.
Any platform (bin) - install and update the release binary directly
Container (GHCR) - run ghcr.io/wimpysworld/tailor on linux/amd64 and linux/arm64
Images are published to GHCR for linux/amd64 and linux/arm64. Mount your project directory and pass a GitHub token:
docker run --rm \
--user "$(id -u):$(id -g)" \
-v "$PWD":/work -w /work \
-e GH_TOKEN \
ghcr.io/wimpysworld/tailor alter
The --user option uses your host identity for Git ownership checks and writes to the mounted checkout.
Authentication
Tailor needs a valid GitHub authentication token for fit, alter, and baste. Set GH_TOKEN or GITHUB_TOKEN to use Tailor without the gh binary.
Alternatively, install the GitHub CLI and run gh auth login. Tailor can then read the token from the gh config file or keyring. The measure and docket commands do not require authentication.
Quick start
fit writes .tailor.yml without copying swatches or changing repository settings. The default licence is BlueOak-1.0.0.
New project
Create the project and enter its directory:
tailor fit ./my-project
cd my-project
Existing project
Check local health files, then create the configuration:
cd existing-project
tailor measure
tailor fit .
If .tailor.yml already exists, skip fit. With a GitHub remote, fit imports only the repository’s description and homepage. All other managed settings come from Tailor’s embedded defaults.
Review and apply
For either project, edit .tailor.yml to choose the licence, repository settings and files that Tailor manages. Set a swatch to alteration: never to leave its file untouched.
Repository settings require a GitHub remote. For a new local project, add its GitHub remote before the preview.
Preview the changes without writes:
tailor baste
After you review the preview, apply the changes:
tailor alter
Important 重要
Most swatches with alteration: always replace local file edits. Ordinary .gitignore processing preserves an existing file or final symlink. Enabled Hugo or Jekyll Pages can append its output rule later. Review the preview before each alter run.
Upgrade an existing project
Upgrade the tailor binary.
Run tailor measure to compare .tailor.yml with the new defaults. Remove each config-only entry, because alter rejects it.
Run tailor baste --verbose to preview the changes.
Declare new opt-in features in .tailor.yml. Default merging never turns on languages, pages, mcp, or the wiki.
Run tailor baste again to preview the new features.
Run tailor alter.
Make the manual edits that the output lists under Next. Tailor preserves an existing justfile and flake.nix.
Default merging adds missing defaults to .tailor.yml only when its swatch entry is always, or first-fit with --recut.
Agent skill
The repository includes a skill at skills/tailor/SKILL.md. It helps an agent fit, baste, alter, and upgrade a project. Copy the skills/tailor/ directory into your agent’s skills directory.
Development
Enter the pinned shell with nix develop. Use just build to build executables, including Tailor’s stripped root binary. Use just test for full vet and tests with console coverage. Use just lint for read-only checks. Use just lint correct explicitly to tidy modules and format source before the checks. Go checks can download modules and vulnerability data. See the Go configuration guide for policy and project scripts.
Documentation
Read the wiki for detailed guides and reference material.
评论