feat: project init with config package and root command

Go module, cobra root command, config resolution (CTASK_ROOT, CTASK_AGENT, EnvVars) with tests.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-05 18:28:24 -04:00
commit ab56ddfff0
7 changed files with 192 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
package cmd
import (
"fmt"
"github.com/spf13/cobra"
)
var version = "0.1.0"
var rootCmd = &cobra.Command{
Use: "ctask",
Short: "Create and manage AI-agent task workspaces",
Long: "ctask is a local CLI that creates and manages named AI-agent task workspaces so developers can start, resume, and organize work more safely and predictably.",
}
func Execute() error {
return rootCmd.Execute()
}
func init() {
rootCmd.Version = version
rootCmd.SetVersionTemplate(fmt.Sprintf("ctask v%s\n", version))
}