cli

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

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

Go to latest
Published: Nov 9, 2025 License: BSD-3-Clause Imports: 7 Imported by: 0

README

WM CLI (hybrid templates skeleton)

CLI para gerenciamento geral de projetos

Este esqueleto implementa uma CLI em Go com suporte híbrido a templates:

  • embedded via embed.FS (pequenos templates de arquivo/config)
  • defaults editáveis dentro do repo (internal/templates/defaults/*) para projetos vazios
  • local em ~/.wm/templates/<name> — para templates de bibliotecas maiores
  • suporte a --from para apontar um caminho local (ou futuro clone remoto)

Como usar

  1. Build
just build
# ou
go build -o bin/wm .
  1. Listar templates disponíveis
./bin/wm template list
  1. Gerar projeto usando default (editable)
./bin/wm template init -t golib -n mylib -a "Adrian"
  1. Gerar projeto usando npm template (bun)
./bin/wm template init -t npm-package -n mypkg -a "Adrian"
  1. Gerar arquivo simples a partir do template embutido
./bin/wm template init -t go-file -n MyFile -a "Adrian"
# go-file é embutido e gerará um único arquivo Example.go dentro de ./MyFile
  1. Adicionar um template local (exemplo)
mkdir -p ~/.wm/templates/myproject
# coloque template.json e arquivos *.tmpl dentro
./bin/wm template init -t myproject -n Whatever -a "You"

Estrutura do projeto

  • cmd/: comandos CLI
  • internal/templates/: lógica de templates + defaults editáveis e embedded
  • internal/log/: logger e recuperação de panic
  • justfile e .goreleaser.yaml prontos para uso

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal
db
log

Jump to

Keyboard shortcuts

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