# feat(repo): add top-level `entire clone` alias for `repo clone`

`207476c`→[main](/content/gh/entireio/cli/commits/main/index.html)·

toothbrush·2w ago·3 files·+24 added/-0 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

3

- cmd/entire/cli

- Mrepo_clone.go+11

- Mrepo_clone_test.go+12

- Mroot.go+1

```
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
