devtool

command module
v0.0.0-...-ca7ef29 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 9, 2026 License: Apache-2.0 Imports: 19 Imported by: 0

README

Go Reference Code Coverage License

Brings Go repositories up to a standard and keeps them there: it writes the README, the Makefile, the .gitignore, the AGENTS.md, a web app's main.go, and the code that opens and migrates its databases, updates the dependencies and the pinned tools, formats and lints, and commits each kind of change on its own so the history stays readable.

Run it in a repository to rebuild that one's generated files, or give it a list to maintain every repository on it unattended. The machinery underneath is devtool-engine; what is here is one owner's taste.

Additional Information

Contributing

Contributions are welcome — please open an issue or a pull request on GitHub.

License

This project is licensed under the Apache 2.0 License.

Documentation

Overview

Command devtool brings Go repositories up to a standard and keeps them there.

It is the opinionated half of the tool: the generators that write a README, a Makefile, a .gitignore and an AGENTS.md, and the order they run in. The machinery they plug into is github.com/MarkRosemaker/devtool-engine, which anybody's devtool can import unchanged.

Two ways to run it

With no list, it rebuilds the generated files of the repository you are standing in and leaves them uncommitted for you to read. No GitHub, no network, no commits — a person at a terminal asking for their README to be brought up to date.

devtool
update

With a list, it maintains every repository the list names, unattended: testing, committing each task separately, and pushing. The coverage it measures is written back into the list and committed to whichever repository holds it.

devtool update all --config=../portfolio/config.json
devtool update MarkRosemaker/openapi --config=../portfolio/config.json

Each says what it did in plain words. -json on any of them writes the run as JSON Lines on stdout instead, and logs as JSON, which is how patchpal follows a run it did not perform.

Two different updates

"devtool self-update" updates the devtool binary on this machine, and nothing else. It is about which build of this tool runs next.

Updating the dependencies of a repository — its go.mod, go.sum and vendor directory, including its devtool-engine dependency if it has one — is a task within a run, applied to whatever repository is being maintained. The two are unrelated: a current binary can maintain a repository whose dependencies are stale, and a stale binary can bring a repository's dependencies right up to date.

Directories

Path Synopsis
internal
config
Package config reads and writes the list of repositories to maintain: which they are, what metadata each should carry, and the coverage last measured for it.
Package config reads and writes the list of repositories to maintain: which they are, what metadata each should carry, and the coverage last measured for it.
console
Package console renders a run's events for a person at a terminal: one line per thing worth knowing, as it happens.
Package console renders a run's events for a person at a terminal: one line per thing worth knowing, as it happens.
lintgen command
Command lintgen writes maintain/lint.yaml, the golangci-lint v2 config every repository in the portfolio is given, from the lintConfig value below — using MarkRosemaker/golangci-json, since golangci-lint's own config.Config has no supported way to marshal itself back out.
Command lintgen writes maintain/lint.yaml, the golangci-lint v2 config every repository in the portfolio is given, from the lintConfig value below — using MarkRosemaker/golangci-json, since golangci-lint's own config.Config has no supported way to marshal itself back out.
local
Package local rebuilds the generated files of the repository you are standing in.
Package local rebuilds the generated files of the repository you are standing in.
remote
Package remote reads what a git remote says a repository is.
Package remote reads what a git remote says a repository is.
run
Package run makes one pass over a list of repositories: it works out what to maintain and in what order, does the work, and emits what happened.
Package run makes one pass over a list of repositories: it works out what to maintain and in what order, does the work, and emits what happened.
Package maintain holds the generators this owner applies to every repository in the portfolio.
Package maintain holds the generators this owner applies to every repository in the portfolio.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL