feat(repo): add top-level `entire clone` alias for `repo clone` · Entire
feat(repo): add top-level entire clone alias for repo clone
e2f38a9·
toothbrush·3w ago·5 files·+25 added/-2 removed
Also move agentimport.Importer’s ireturn suppression from a per-line //nolint (which --fix kept stripping) into the .golangci.yaml allowlist.
Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com
Sessions
ad32c7ccda21View transcript
[?
Add Entire Repo Clone CommandClaude Code·Opus 4.8[1m]·1 step](/content/gh/entireio/cli/session/e77355db-5c1c-4286-94f0-431cf4b77954#timeline-ad32c7ccda21/index.html)
Changes
5
M.golangci.yaml+1
cmd/entire/cli
agentimport
Magentimport.go-2
Mrepo_clone.go+11
Mrepo_clone_test.go+12
Mroot.go+1
125 unmodified lines
126
127
128
129
130
131
132
125 unmodified lines
- github.com/entireio/cli/cmd/entire/cli/summarize.Generator
- github.com/entireio/cli/cmd/entire/cli/agent\..+
- github.com/entireio/cli/cmd/entire/cli/agent/spawn.Spawner
- github.com/entireio/cli/cmd/entire/cli/agentimport.Importer
- github.com/entireio/cli/cmd/entire/cli/review/types.Process
- github.com/entireio/cli/cmd/entire/cli/review/types.AgentReviewer
- github.com/entireio/cli/cmd/entire/cli/review.SynthesisProvider
M.golangci.yaml+1
68 unmodified lines
69
70
71
72
73
72
73
74
68 unmodified lines
}
// Get returns the importer registered under name.
//
//nolint:ireturn // Importer is the intended polymorphic seam returned to callers.
func Get(name string) (Importer, bool) {
for _, imp := range importers {
if imp.Name() == name {
Mcmd/entire/cli/agentimport/agentimport.go-2
38 unmodified lines
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
38 unmodified lines
return checkpointProviderGitHub, owner, repo, nil
}
// newCloneAliasCmd is the top-level `entire clone` alias for `entire repo
// clone`. Cobra forbids attaching one command to two parents, so this builds a
// fresh clone command and adds the control-plane flags (--json,
// --insecure-http-auth) the repo group otherwise supplies to its children as
// persistent flags.
func newCloneAliasCmd() *cobra.Command {
cmd := newRepoCloneCmd()
addControlPlaneFlags(cmd)
return cmd
}
func newRepoCloneCmd() *cobra.Command {
var cluster string
cmd := &cobra.Command{
Mcmd/entire/cli/repo_clone.go+11
83 unmodified lines
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
83 unmodified lines
}
}
func TestNewCloneAliasCmd(t *testing.T) {
t.Parallel()
cmd := newCloneAliasCmd()
require.Equal(t, "clone", cmd.Name())
// Carries the control-plane flags the repo group otherwise supplies to its
// children as persistent flags, so `entire clone` honors --json /
// --insecure-http-auth too.
require.NotNil(t, cmd.PersistentFlags().Lookup("json"))
require.NotNil(t, cmd.PersistentFlags().Lookup("insecure-http-auth"))
require.NotNil(t, cmd.Flags().Lookup("cluster"))
}
func newCloneTestCmd() *cobra.Command {
cmd := newRepoCloneCmd()
cmd.SetOut(&nopWriter{})
Mcmd/entire/cli/repo_clone_test.go+12
97 unmodified lines
98
99
100
101
102
103
104
97 unmodified lines
cmd.AddCommand(newOrgCmd()) // hidden during maturation; control-plane org management
cmd.AddCommand(newProjectCmd()) // hidden during maturation; control-plane project management
cmd.AddCommand(newRepoCmd()) // hidden during maturation; control-plane repo lifecycle
cmd.AddCommand(newCloneAliasCmd()) // top-level alias for 'repo clone'
cmd.AddCommand(newGrantCmd()) // hidden during maturation; control-plane access grants
cmd.AddCommand(newCleanCmd())
cmd.AddCommand(newSetupCmd()) // 'configure' — non-agent settings; agent CRUD lives under 'agent'
Mcmd/entire/cli/root.go+1