# Merge pull request #1672 from entireio/soph/promote-control-plane-commands-out-of-labs

`724609a`→[main](/content/gh/entireio/cli/commits/main/index.html)· Soph·1w ago·8 files·+32 added/-52 removed

Promote org/project/repo/grant out of labs

## Changes

8

- MCLAUDE.md+8/-1

- MREADME.md+4

- cmd/entire/cli

- Mgrant.go+4/-5

- Mlabs.go-24

- Morg.go+4/-6

- Mproject.go+4/-6

- Mrepo.go+4/-6

- Mroot.go+4/-4

```
21 unmodified lines

22
23
24
25
25
26
27
28
29 unmodified lines

58
59
60
61
62
63
64
65
66
67
68
69
70

21 unmodified lines

### Command Layout

The visible CLI is organized around five noun groups plus a small set of top-level verbs. The groups are the canonical home for each verb; legacy top-level shortcuts remain functional but hidden, and emit a deprecation hint pointing at the canonical group form. Newer experimental command families are

29 unmodified lines

takes `--everywhere` (revoke every session on the active core, not just the current one) and `--all-contexts` (log out of every saved login)
- `doctor`: bare runs the scan-and-fix flow, plus `trace`, `logs`, `bundle`
- `org`: control-plane organization management — `create`, `list`, `get`, `delete`
- `project`: control-plane project management — `create`, `list`, `get`, `delete`
- `repo`: control-plane repository lifecycle — `create`, `list`, `get`, `delete`, `clone`, plus the `mirror` and `visibility` subtrees. Git content operations (log, diff, …) are intentionally out of scope.
- `grant`: manage access grants and org membership — `org`, `project`, and `repo` each support `add` / `list` / `remove`

Experimental command families advertised through `entire labs`:

```

| `entire checkpoint explain` | Explain a session, commit, or checkpoint                                               |
| `entire checkpoint rewind` | Rewind to a previous checkpoint (deprecated, will be removed in a future release)       |
| `entire login`   | Authenticate the CLI with Entire device auth                                                      |
| `entire org`     | Manage Entire organizations (create, list, get, delete)                                           |
| `entire project` | Manage Entire projects (create, list, get, delete)                                                |
| `entire repo`    | Manage Entire repositories (create, list, get, delete, clone, mirror, visibility)                 |
| `entire grant`   | Manage access grants and org membership (org, project, repo)                                      |
| `entire session` | View and manage agent sessions tracked by Entire                                                  |
| `entire session resume`    | Switch to a branch, restore latest checkpointed session metadata, and show command(s) |
| `entire session attach`    | Attach to a previously detached session                                                |
```

MREADME.md+4

```
41 unmodified lines

42
43
44
45
45
46
47
47
48
49
50
1 unmodified line

52
53
54
55
56
57
55
56
57
58
59

41 unmodified lines

}
}

// newGrantCmd is the hidden `entire grant` command group: manage access
// newGrantCmd is the `entire grant` command group: manage access
// grants and org membership on the Entire control plane. Org, project, and
// repo each support add / list / remove. Surfaced via `entire labs`.
// repo each support add / list / remove.
//
// Grantees are addressed by a provider-qualified handle (e.g. github:alice),
// which the CLI resolves to the provider account behind the scenes. `remove`
1 unmodified line

// repo) are addressed by name or ULID.
func newGrantCmd() *cobra.Command {
	cmd := &cobra.Command{
		Use:    "grant",
		Short:  "Manage Entire access grants and org membership",
		Hidden: true,
		Use:   "grant",
		Short: "Manage Entire access grants and org membership",
	}
	addControlPlaneFlags(cmd)
	cmd.AddCommand(newGrantOrgCmd())
}
```

Mcmd/entire/cli/grant.go+4/-5

```
44 unmodified lines

45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
48
49
50
54 unmodified lines

105
106
107
128
129
130
131
108
109
110

44 unmodified lines

Invocation:  "entire session tokens",
		Summary:     "Show token usage and recommendations for a session",
	},
	{
		CommandPath: []string{"org"},
		Invocation:  "entire org",
		Summary:     "Manage Entire organizations (create, list, get, delete)",
	},
	{
		CommandPath: []string{"project"},
		Invocation:  "entire project",
		Summary:     "Manage Entire projects (create, list, get, delete)",
	},
	{
		CommandPath: []string{"repo"},
		Invocation:  "entire repo",
		Summary:     "Manage Entire repositories (create, list, get, delete, clone, mirror, visibility)",
	},
	{
		CommandPath: []string{"grant"},
		Invocation:  "entire grant",
		Summary:     "Manage access grants and org membership (org, project, repo)",
	},
	{
		CommandPath: []string{"blame"},
		Invocation:  "entire blame",
44 unmodified lines

entire tokens --help
  entire tokens profile --help
  entire session tokens --help
  entire org --help
  entire project --help
  entire repo --help
  entire grant --help
  entire blame --help
  entire why --help
  entire experts --help
```

Mcmd/entire/cli/labs.go-24

```
8 unmodified lines

9
10
11
12
13
14
12
13
14
15
17
18
19
16
17
18
19
20

8 unmodified lines

"github.com/entireio/cli/internal/coreapi"

// newOrgCmd is the hidden `entire org` command group: create, list, get, and
// delete organizations on the Entire control plane. Surfaced via `entire
// labs` while the control-plane surface matures.
// newOrgCmd is the `entire org` command group: create, list, get, and
// delete organizations on the Entire control plane.
func newOrgCmd() *cobra.Command {
	cmd := &cobra.Command{
		Use:    "org",
		Short:  "Manage Entire organizations",
		Hidden: true,
		Use:   "org",
		Short: "Manage Entire organizations",
	}
	addControlPlaneFlags(cmd)
	cmd.AddCommand(newOrgCreateCmd())
}
```

Mcmd/entire/cli/org.go+4/-6

```
8 unmodified lines

9
10
11
12
13
14
12
13
14
15
17
18
19
16
17
18
19
20

8 unmodified lines

"github.com/entireio/cli/internal/coreapi"

// newProjectCmd is the hidden `entire project` command group: create, list,
// get, and delete projects on the Entire control plane. Surfaced via `entire
// labs`.
// newProjectCmd is the `entire project` command group: create, list,
// get, and delete projects on the Entire control plane.
func newProjectCmd() *cobra.Command {
	cmd := &cobra.Command{
		Use:    "project",
		Short:  "Manage Entire projects",
		Hidden: true,
		Use:   "project",
		Short: "Manage Entire projects",
	}
	addControlPlaneFlags(cmd)
	cmd.AddCommand(newProjectCreateCmd())
}
```

Mcmd/entire/cli/project.go+4/-6

```
11 unmodified lines

12
13
14
15
15
16
17
18
19
20
19
20
21
23
24
25
22
23
24
25
26

11 unmodified lines

"github.com/entireio/cli/internal/coreapi"

// newRepoCmd is the hidden `entire repo` command group: control-plane
// newRepoCmd is the `entire repo` command group: control-plane
// repository lifecycle (create, list within a project, get, delete), the
// `mirror` and `visibility` subtrees, plus the `clone` convenience that
// resolves a mirror and shells out to `git clone`. Other git content
// operations (log, diff, …) remain intentionally out of scope here. Surfaced
// via `entire labs`.
// operations (log, diff, …) remain intentionally out of scope here.
func newRepoCmd() *cobra.Command {
	cmd := &cobra.Command{
		Use:    "repo",
		Short:  "Manage Entire repositories",
		Hidden: true,
		Use:   "repo",
		Short: "Manage Entire repositories",
	}
	addControlPlaneFlags(cmd)
	cmd.AddCommand(newRepoCreateCmd())
}
```

Mcmd/entire/cli/repo.go+4/-6

```
93 unmodified lines

94
95
96
97
98
99
100
101
102
103
104
101
102
103
104
105
106
107

93 unmodified lines

cmd.AddCommand(newLabsCmd())            // 'labs' (experimental workflow discovery)
	cmd.AddCommand(newPluginGroupCmd())     // 'plugin' (managed install/list/remove)
	cmd.AddCommand(newImportCmd())          // 'import' (hidden; import pre-existing agent history)
	cmd.AddCommand(newOrgCmd())             // 'org' — control-plane org management
	cmd.AddCommand(newProjectCmd())         // 'project' — control-plane project management
	cmd.AddCommand(newRepoCmd())            // 'repo' — control-plane repo lifecycle
	cmd.AddCommand(newGrantCmd())           // 'grant' — control-plane access grants

// Top-level lifecycle and standalone commands.
	cmd.AddCommand(cliReview.NewCommand(buildReviewDeps()))        // `review`; hidden during maturation
	cmd.AddCommand(investigate.NewCommand(buildInvestigateDeps())) // hidden during maturation; runs a multi-agent investigation
	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(newGrantCmd())                                  // hidden during maturation; control-plane access grants
	cmd.AddCommand(newCleanCmd())
	cmd.AddCommand(newSetupCmd()) // 'configure' — non-agent settings; agent CRUD lives under 'agent'
	cmd.AddCommand(newEnableCmd())
}
```
