# Polish control-plane command output details

`494541b`→[main](/content/gh/entireio/cli/commits/main/index.html)·
peyton-alt·2w ago·12 files·+45 added/-43 removed

Capitalize flag help to house style, silence usage on repo visibility validation errors, lead grant listings with the grantee column, and refresh the stale entire-labs summaries.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

## Sessions

04a9ec9fac4bView transcript

[?\Improve Control-Plane CLI Output and UXClaude Code·1 step](/content/gh/entireio/cli/session/951dfb50-f9e5-45be-8575-9dd17e7639e5#timeline-04a9ec9fac4b/index.html)

## Changes

12

- cmd/entire/cli

- Mcorecmd.go+2/-2
  
  - Mcorecmd_delete_test.go+7/-6
  
  - Mcorecmd_mutation_test.go+4/-4
  
  - Mgrant.go+6/-6
  
  - Mgrant_test.go+2/-2
  
  - Mgrant_wiring_test.go+4/-4
  
  - Mlabs.go+3/-3
  
  - Morg.go+1/-1
  
  - Mproject.go+5/-5
  
  - Mrepo.go+4/-3
  
  - Mrepo_clone.go+1/-1
  
  - Mrepo_mirror.go+6/-6

```go
24 unmodified lines

//     (local/dev deployments where the core isn't behind TLS). Hidden, as
//     elsewhere in the CLI.
func addControlPlaneFlags(cmd *cobra.Command) {
    cmd.PersistentFlags().Bool("json", false, "output raw JSON instead of a table")
    cmd.PersistentFlags().Bool("json", false, "Output raw JSON instead of a table")
    cmd.PersistentFlags().Bool("insecure-http-auth", false, "Allow authentication over plain HTTP (insecure, for local development only)")
    if err := cmd.PersistentFlags().MarkHidden("insecure-http-auth"); err != nil {
        panic(fmt.Sprintf("hide insecure-http-auth flag: %v", err))
    }
}

// printJSON writes v as indented JSON to w — the --json view for list/get
// and the default for create commands that echo the new object.
// and mutations.
func printJSON(w io.Writer, v any) error {
    enc := json.NewEncoder(w)
    enc.SetIndent("", "  ")
}
```

Mcmd/entire/cli/corecmd.go+2/-2

```go
31 unmodified lines
{

}

// runDeleteCmd points the active-context client at srv via the activeCoreClient
// seam, runs newCmd() with args, and returns its stdout, stderr, and error.
// The caller must not be parallel: the seam is package-global.
func runDeleteCmd(t *testing.T, newCmd func() *cobra.Command, srvURL string, args ...string) (stdout, stderr string, err error) {
    
}

func runCoreCmd(t *testing.T, newCmd func() *cobra.Command, srvURL string, args ...string) (stdout, stderr string, err error) {
    t.Helper()
    prev := activeCoreClient
}
```

Mcmd/entire/cli/corecmd_delete_test.go+7/-6

```go
// Not parallel: runDeleteCmd swaps the package-level activeCoreClient seam.
func TestOrgCreate_HumanByDefault(t *testing.T) {
    srv := newCreateOrgServer(t)
    out, errOut, err := runDeleteCmd(t, newOrgCreateCmd, srv.URL, "acme")
    require.NoError(t, err)
    require.Contains(t, out, "✓ Created org acme ("+testDeleteULID+")")
}
```

Mcmd/entire/cli/corecmd_mutation_test.go+4/-4

```go
// saying where the grant comes from; ID keeps the ULID for revoke.
var (
    orgMemberColumns = []string{"ACCOUNT", "ROLE", "STATUS"}
)
func orgMemberRow(m coreapi.Membership) []string {
}

func projectGrantRow(g coreapi.ProjectGrant) []string {
    return []string{g.GranteeType, granteeName(g.GranteeName, g.GranteeId), g.GranteeId, g.Role, g.Source}
}
```

Mcmd/entire/cli/grant.go+6/-6

```go
62 unmodified lines

// then hits the by-provider revoke route, while an account ULID hits the
typed-id route directly.
func TestGrantRemove_RouteWiring(t *testing.T) {
    cases := []struct {
        name     string
}
}
```

Mcmd/entire/cli/grant_wiring_test.go+4/-4

```go
    {
        CommandPath: []string{"org"},
        Invocation:  "entire org",
        Summary:     "Manage Entire organizations (create, list)",
    },
    {
        CommandPath: []string{"project"},
        Invocation:  "entire project",
        Summary:     "Manage Entire projects (create, list)",
    },
```

Mcmd/entire/cli/labs.go+3/-3

```go
cmd.Flags().StringVar(&region, "region", "", "jurisdiction slug (defaults to the server's home jurisdiction)")
return cmd
}
```

Mcmd/entire/cli/org.go+1/-1

```go
cmd.Flags().StringVar(&ownerID, "owner", "", "owning org (name or ULID), or account (github:handle or ULID) (required)")
return cmd
}
```

Mcmd/entire/cli/project.go+5/-5

```go
cmd.Flags().StringVar(&projectID, "project", "", "owning project (name or ULID) (required)")
return cmd
}
```

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

```go
            return runGitClone(cmd.Context(), cmd, cloneURL, targetDir)
}
```

Mcmd/entire/cli/repo_clone.go+1/-1

```go
cmd.Flags().StringVar(&cluster, "cluster", "", "filter by cluster public host")
return cmd
}
```

Mcmd/entire/cli/repo_mirror.go+6/-6

```go
cmd.Flags().StringVar(&provider, "provider", "", "filter by upstream provider (e.g. github)")
return cmd
}
```
