BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/brainless/codex-permissions

Codex Permissions

brainless/codex-permissions
FreeComponent

The /permissions chooser — numbered Default / Auto-review / Full Access options as a real radiogroup.

Install it

npx shadcn@latest add https://brainless.swerdlow.dev/r/codex-permissions.json

Source

registry/brainless/codex/codex-permissions.tsxbrainless.swerdlow.dev/r/codex-permissions.json
1"use client";
2
3import * as React from "react";
4import { cn } from "@/lib/utils";
5
6/**
7 * CodexPermissions — Codex CLI's `/permissions` chooser.
8 *
9 * Captured grammar (v0.132): a title, then a numbered list with a `›` on the
10 * active row and wrapped descriptions. Footer: "Press enter to confirm or esc
11 * to go back".
12 */
13const FG = "#ededed";
14const DIM = "#7a7a7a";
15const ACCENT = "#f6e2b7";
16
17export type CodexPermissionOption = {
18 label: string;
19 description: string;
20 current?: boolean;
21};
22
23const DEFAULT_OPTIONS: CodexPermissionOption[] = [
24 {
25 label: "Default",
26 current: true,
27 description:
28 "Codex can read and edit files in the current workspace, and run commands. Approval is required to access the internet or edit other files.",
29 },
30 {
31 label: "Auto-review",
32 description:
33 "Same workspace-write permissions as Default, but eligible `on-request` approvals are routed through the auto-reviewer subagent.",
34 },
35 {
36 label: "Full Access",
37 description:
38 "Codex can edit files outside this workspace and access the internet without asking for approval. Exercise caution when using.",
39 },
40];
41
42export function CodexPermissions({
43 title = "Update Model Permissions",
44 options = DEFAULT_OPTIONS,
45 defaultSelected = 0,
46 onChoose,
47 className,
48}: {
49 title?: string;
50 options?: CodexPermissionOption[];
51 defaultSelected?: number;
52 onChoose?: (index: number) => void;
53 className?: string;
54}) {
55 const [sel, setSel] = React.useState(defaultSelected);
56
57 function onKey(e: React.KeyboardEvent, i: number) {
58 if (e.key === "ArrowDown" || e.key === "ArrowUp") {
59 e.preventDefault();
60 const next =
61 e.key === "ArrowDown"
62 ? (i + 1) % options.length
63 : (i - 1 + options.length) % options.length;
64 setSel(next);
65 (e.currentTarget.parentElement?.children[next] as HTMLElement)?.focus();
66 } else if (e.key === "Enter" || e.key === " ") {
67 e.preventDefault();
68 setSel(i);
69 onChoose?.(i);
70 }
71 }
72
73 return (
74 <div className={cn("font-mono text-[13px] leading-[1.55]", className)}>
75 <div className="mb-2 font-semibold" style={{ color: FG }}>
76 {title}
77 </div>
78
79 <div role="radiogroup" aria-label={title} className="space-y-2">
80 {options.map((opt, i) => {
81 const active = sel === i;
82 return (
83 <div
84 key={opt.label}
85 role="radio"
86 aria-checked={active}
87// … truncated

Files it writes

  • registry/brainless/codex/codex-permissions.tsx

Facts

Registry
brainless
Type
registry:ui
Access
Free
Files written
1
Licence
MIT
First indexed
2026-08-02
Last confirmed
yesterday

Go to the source

brainless.swerdlow.dev theswerd/brainless on GitHub Raw registry item This item as JSON

More from brainless

All 40 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
Claude Diffclaude-diffbrainlessComponentsFreeno deps
Claude Headerclaude-headerbrainlessComponentsFreeno deps
Claude Messageclaude-messagebrainlessComponentsFreeno deps
Claude Permissionclaude-permissionbrainlessComponentsFreeno deps
Claude Promptclaude-promptbrainlessComponentsFreeno deps
Claude Slash Menuclaude-slash-menubrainlessComponentsFreeno deps
Claude Thinkingclaude-thinkingbrainlessComponentsFreeno deps
Claude Todo Listclaude-todo-listbrainlessComponentsFreeno deps
BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex