Files
insertr/insertr-cli/cmd/root.go
Joakim 0e84af98bc Add Go CLI with container expansion parser and development server
- Implement Go-based CLI for build-time HTML enhancement
- Add container expansion: div.insertr auto-expands to viable children
- Create servedev command with live development workflow
- Add Air configuration for automatic rebuilds and serving
- Enable transition from runtime JS to build-time enhancement approach
2025-09-02 22:58:59 +02:00

32 lines
656 B
Go

package cmd
import (
"fmt"
"os"
"github.com/spf13/cobra"
)
var rootCmd = &cobra.Command{
Use: "insertr",
Short: "Insertr CLI - HTML enhancement for static sites",
Long: `Insertr CLI adds editing capabilities to static HTML sites by detecting
editable elements and injecting content management functionality.
The tool parses HTML files, finds elements with the 'insertr' class,
and enhances them with editing capabilities while preserving
static site performance.`,
Version: "0.0.1",
}
func Execute() {
if err := rootCmd.Execute(); err != nil {
fmt.Fprintln(os.Stderr, err)
os.Exit(1)
}
}
func init() {
rootCmd.AddCommand(parseCmd)
}