@devries-cameron20 / t3code Mirror · read-only
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 04:45 UTC

main
ts 11 lines 475 Bytes
Raw
1 import { AuthGrantScope } from "@t3tools/contracts";
2 import { Flag } from "effect/cli";
3
4 export const authScopesFlag = (defaults: ReadonlyArray<AuthGrantScope>) =>
5 Flag.Literals("scope", AuthGrantScope.literals).pipe(
6 Flag.withDescription(
7 `Authorization scope to grant. Repeat for multiple scopes; replaces the default set: ${defaults.join(", ")}.`,
8 ),
9 Flag.atLeast(0),
10 Flag.map((scopes) => [...new Set(scopes.length > 0 ? scopes : defaults)]),
11 );