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

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 );