- Go 72.9%
- Makefile 27.1%
Set up a Go-based personal automation CLI using Cobra with: - Module: git.emkaytec.com/josh/kitman - Primary binary: kitman (with kit alias) - Command families: run (executing automations), with init/create/delete planned - Sample automation: kitman run hello-world Includes Makefile with build/install/test/vet targets, README with extension patterns, and .gitignore for Go artifacts and binaries. |
||
|---|---|---|
| cmd | ||
| .gitignore | ||
| go.mod | ||
| go.sum | ||
| main.go | ||
| Makefile | ||
| README.md | ||
Kitman
Kitman is a personal automation CLI written in Go. It collects "a number of
automated tasks" for personal and professional use, organized into command
families. The run family executes automations; additional families such as
init, create, and delete are planned.
The primary binary is kitman; kit is a shorter alias for the exact
same program (created as a symlink by the build).
Requirements
- Go 1.26+
Build
make build # produces ./kitman and the ./kit alias symlink
# or, just the primary binary:
go build -o kitman .
Install both names onto your PATH (into $GOBIN):
make install
Usage
./kitman run hello-world # -> Hello world!
./kit run hello-world # identical (alias)
./kitman --help # top-level help
./kitman run --help # list available automations
Adding commands
Commands are grouped into families. To add an automation under the existing
run family:
- Create
cmd/run_<name>.godefining a*cobra.Command. - Register it under
runCmdin that file'sinit():runCmd.AddCommand(<name>Cmd).
This yields kitman run <name> (and kit run <name>). See
cmd/run_helloworld.go for the template.
To add a new family (e.g. init, create, delete), define its parent in
cmd/<family>.go, register it on rootCmd, then add cmd/<family>_<name>.go
files that register under it — mirroring how run.go and run_helloworld.go
are wired.
Keep command files thin — put reusable logic (shelling out to other tools,
integrations) under an internal/ package as the project grows.
Layout
main.go entrypoint -> cmd.Execute()
cmd/root.go root command (kitman/kit), Execute()
cmd/run.go the "run" automation family
cmd/run_helloworld.go sample automation: hello-world