codex-relay 1.0.1 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -13,7 +13,7 @@ Codex Relay runs a local bridge server for the Codex Relay mobile app. Keep Code
13
13
  Run the server from the workspace you want Codex to use:
14
14
 
15
15
  ```sh
16
- npx codex-relay
16
+ npx codex-relay@latest
17
17
  ```
18
18
 
19
19
  The CLI prints a QR code, a mobile URL, and a `codex-relay://pair...` pairing payload. Scan the QR code from the mobile app. If scanning is not available, paste the full pairing payload into the app.
@@ -21,7 +21,7 @@ The CLI prints a QR code, a mobile URL, and a `codex-relay://pair...` pairing pa
21
21
  When the app shows an approval code, approve it on the computer:
22
22
 
23
23
  ```sh
24
- npx codex-relay approve XXXX-XXXX
24
+ npx codex-relay@latest approve XXXX-XXXX
25
25
  ```
26
26
 
27
27
  After approval, the phone can list Codex threads, start new work, stream messages, and handle approval prompts from the local Codex runtime.
@@ -31,7 +31,7 @@ After approval, the phone can list Codex threads, start new work, stream message
31
31
  To keep the relay running after the command returns:
32
32
 
33
33
  ```sh
34
- npx codex-relay --bg
34
+ npx codex-relay@latest --bg
35
35
  ```
36
36
 
37
37
  Background mode writes runtime files under `.codex-relay/` in the current directory:
@@ -44,7 +44,7 @@ Background mode writes runtime files under `.codex-relay/` in the current direct
44
44
  Print the current pairing QR again:
45
45
 
46
46
  ```sh
47
- npx codex-relay qr
47
+ npx codex-relay@latest qr
48
48
  ```
49
49
 
50
50
  Stop a background server with the printed process id:
@@ -56,56 +56,63 @@ kill -TERM <pid>
56
56
  ## Commands
57
57
 
58
58
  ```sh
59
- npx codex-relay
59
+ npx codex-relay@latest
60
60
  ```
61
61
 
62
62
  Start the relay in the foreground.
63
63
 
64
64
  ```sh
65
- npx codex-relay --bg
65
+ npx codex-relay@latest --bg
66
66
  ```
67
67
 
68
68
  Start the relay in the background.
69
69
 
70
70
  ```sh
71
- npx codex-relay qr
71
+ npx codex-relay@latest qr
72
72
  ```
73
73
 
74
74
  Print the latest pairing QR for an already running relay.
75
75
 
76
76
  ```sh
77
- npx codex-relay approve XXXX-XXXX
77
+ npx codex-relay@latest approve XXXX-XXXX
78
78
  ```
79
79
 
80
80
  Approve a pending mobile pairing request.
81
81
 
82
+ ```sh
83
+ npx codex-relay@latest --dangerously-auto-approve
84
+ ```
85
+
86
+ Start the relay and automatically approve mobile pairing requests. Use this only for controlled review or demo environments.
87
+
82
88
  ## Configuration
83
89
 
84
90
  The relay listens on `0.0.0.0:8787` by default. Configure it with environment variables:
85
91
 
86
- | Variable | Purpose |
87
- | ----------------------------- | ------------------------------------------------------------------------------------------- |
88
- | `PORT` | Server port. Defaults to `8787`. |
89
- | `HOST` | Listen host. Defaults to `0.0.0.0`. |
90
- | `CODEX_RELAY_PUBLIC_URL` | URL printed into the pairing QR, for example a Tailscale or tunnel URL. |
91
- | `CODEX_RELAY_WORKSPACE_PATH` | Workspace path Codex should use. Defaults to the directory where you run `npx codex-relay`. |
92
- | `CODEX_RELAY_AUTH_DB_PATH` | Pairing and session database path. Defaults to `.codex-relay/auth.db`. |
93
- | `CODEX_RELAY_APPROVAL_SECRET` | Secret used by the local approve command. Usually generated automatically. |
94
- | `CODEX_HOME` | Codex home directory, used when reading Codex session metadata. |
95
- | `CODEX_BIN` | Codex CLI executable path. |
92
+ | Variable | Purpose |
93
+ | -------------------------------------- | -------------------------------------------------------------------------------------------------- |
94
+ | `PORT` | Server port. Defaults to `8787`. |
95
+ | `HOST` | Listen host. Defaults to `0.0.0.0`. |
96
+ | `CODEX_RELAY_PUBLIC_URL` | URL printed into the pairing QR, for example a Tailscale or tunnel URL. |
97
+ | `CODEX_RELAY_WORKSPACE_PATH` | Workspace path Codex should use. Defaults to the directory where you run `npx codex-relay@latest`. |
98
+ | `CODEX_RELAY_AUTH_DB_PATH` | Pairing and session database path. Defaults to `.codex-relay/auth.db`. |
99
+ | `CODEX_RELAY_APPROVAL_SECRET` | Secret used by the local approve command. Usually generated automatically. |
100
+ | `CODEX_RELAY_DANGEROUSLY_AUTO_APPROVE` | Set to `1` to auto-approve mobile pairing requests. Prefer the CLI flag for local use. |
101
+ | `CODEX_HOME` | Codex home directory, used when reading Codex session metadata. |
102
+ | `CODEX_BIN` | Codex CLI executable path. |
96
103
 
97
104
  Examples:
98
105
 
99
106
  ```sh
100
- PORT=8788 npx codex-relay
107
+ PORT=8788 npx codex-relay@latest
101
108
  ```
102
109
 
103
110
  ```sh
104
- CODEX_RELAY_PUBLIC_URL=http://100.64.0.10:8787 npx codex-relay
111
+ CODEX_RELAY_PUBLIC_URL=http://100.64.0.10:8787 npx codex-relay@latest
105
112
  ```
106
113
 
107
114
  ```sh
108
- CODEX_RELAY_WORKSPACE_PATH=/path/to/project npx codex-relay
115
+ CODEX_RELAY_WORKSPACE_PATH=/path/to/project npx codex-relay@latest
109
116
  ```
110
117
 
111
118
  ## Network Notes
@@ -118,16 +125,16 @@ The phone must be able to reach the URL printed as `Mobile:` by the relay.
118
125
 
119
126
  ## Troubleshooting
120
127
 
121
- If `npx codex-relay qr` cannot find a server, start one first:
128
+ If `npx codex-relay@latest qr` cannot find a server, start one first:
122
129
 
123
130
  ```sh
124
- npx codex-relay
131
+ npx codex-relay@latest
125
132
  ```
126
133
 
127
134
  If the relay says another process is using the local pairing database, use the existing server:
128
135
 
129
136
  ```sh
130
- npx codex-relay qr
137
+ npx codex-relay@latest qr
131
138
  ```
132
139
 
133
140
  Or stop the background process shown by the CLI:
package/api-schema.ts ADDED
@@ -0,0 +1 @@
1
+ export * from "./src/api-schema";
@@ -0,0 +1,2 @@
1
+ import { $ as SandboxModeSchema, A as PairResponseSchema, At as stripPromptSkillMentions, B as QueuedThreadInputSchema, C as ListQueuedThreadInputsResponseSchema, Ct as isPromptSkillMarkdownMention, D as ListWorkspaceFilesResponseSchema, Dt as promptSkillMentionLabel, E as ListWorkspaceDirectoriesResponseSchema, Et as promptSkillDisplayName, F as PromptAttachmentSummarySchema, G as ResolveApprovalRequestSchema, H as RateLimitWindowSchema, I as PromptContextInputSchema, J as RunThreadResponseSchema, K as ResolveApprovalResponseSchema, L as PromptContextSchema, M as PendingInputRequestQuestionSchema, N as PendingInputRequestSchema, O as PairEncryptedPayloadSchema, Ot as promptSkillMentionMarkdown, P as PromptAttachmentSchema, Q as RuntimePreferencesSchema, R as PromptSkillSchema, S as ListModelsResponseSchema, St as createOpenApiDocument, T as ListThreadsResponseSchema, Tt as promptMarkdownWithSkills, U as RateLimitsResponseSchema, V as RateLimitBucketSchema, W as ReasoningEffortSchema, X as RuntimePreferencesByWorkspacePathSchema, Y as RuntimeModeSchema, Z as RuntimePreferencesResponseSchema, _ as EncryptedPayloadSchema, _t as WorkspaceFileMentionSchema, a as ArchiveThreadResponseSchema, at as ThreadContextWindowResponseSchema, b as InterruptThreadRunResponseSchema, bt as apiPaths, c as ChatMessageRoleSchema, ct as ThreadMessageDetailResponseSchema, d as CheckoutWorkspaceBranchRequestSchema, dt as ThreadSummarySchema, et as StatusResponseSchema, f as CodexModelSchema, ft as UpdateRuntimePreferencesRequestSchema, g as CreateThreadResponseSchema, gt as WorkspaceDirectoryEntrySchema, h as CreateThreadRequestSchema, ht as WorkspaceChangesResponseSchema, i as ApprovalModeSchema, it as ThreadCollaborationModeSchema, j as PendingInputRequestOptionSchema, k as PairRequestSchema, kt as promptSkillMentionTextCandidates, l as ChatMessageSchema, lt as ThreadRunOptionsSchema, m as ContextWindowUsageSchema, mt as WebPreviewTargetSchema, n as AgentSkillSourceSchema, nt as StreamThreadRunRequestSchema, o as ChatMessageKindSchema, ot as ThreadDetailResponseSchema, p as CommitPushWorkspaceRequestSchema, pt as VersionResponseSchema, q as RunThreadRequestSchema, r as ApprovalDecisionSchema, rt as SubmitThreadInputResponseSchema, s as ChatMessagePromptDetailsSchema, st as ThreadMessageDetailFieldSchema, t as AgentSkillSchema, tt as StreamThreadRunEventSchema, u as ChatMessageStateSchema, ut as ThreadStateSchema, v as ErrorResponseSchema, vt as WorkspaceGitActionResponseSchema, w as ListSkillsResponseSchema, wt as normalizePromptContext, x as IsoDateTimeSchema, xt as chatMessageDetailsFromPromptContext, y as ImageAttachmentUploadResponseSchema, yt as WorkspaceSelectionRequestSchema, z as QueuedThreadInputActionResponseSchema } from "./api-schema2.js";
2
+ export { AgentSkillSchema, AgentSkillSourceSchema, ApprovalDecisionSchema, ApprovalModeSchema, ArchiveThreadResponseSchema, ChatMessageKindSchema, ChatMessagePromptDetailsSchema, ChatMessageRoleSchema, ChatMessageSchema, ChatMessageStateSchema, CheckoutWorkspaceBranchRequestSchema, CodexModelSchema, CommitPushWorkspaceRequestSchema, ContextWindowUsageSchema, CreateThreadRequestSchema, CreateThreadResponseSchema, EncryptedPayloadSchema, ErrorResponseSchema, ImageAttachmentUploadResponseSchema, InterruptThreadRunResponseSchema, IsoDateTimeSchema, ListModelsResponseSchema, ListQueuedThreadInputsResponseSchema, ListSkillsResponseSchema, ListThreadsResponseSchema, ListWorkspaceDirectoriesResponseSchema, ListWorkspaceFilesResponseSchema, PairEncryptedPayloadSchema, PairRequestSchema, PairResponseSchema, PendingInputRequestOptionSchema, PendingInputRequestQuestionSchema, PendingInputRequestSchema, PromptAttachmentSchema, PromptAttachmentSummarySchema, PromptContextInputSchema, PromptContextSchema, PromptSkillSchema, QueuedThreadInputActionResponseSchema, QueuedThreadInputSchema, RateLimitBucketSchema, RateLimitWindowSchema, RateLimitsResponseSchema, ReasoningEffortSchema, ResolveApprovalRequestSchema, ResolveApprovalResponseSchema, RunThreadRequestSchema, RunThreadResponseSchema, RuntimeModeSchema, RuntimePreferencesByWorkspacePathSchema, RuntimePreferencesResponseSchema, RuntimePreferencesSchema, SandboxModeSchema, StatusResponseSchema, StreamThreadRunEventSchema, StreamThreadRunRequestSchema, SubmitThreadInputResponseSchema, ThreadCollaborationModeSchema, ThreadContextWindowResponseSchema, ThreadDetailResponseSchema, ThreadMessageDetailFieldSchema, ThreadMessageDetailResponseSchema, ThreadRunOptionsSchema, ThreadStateSchema, ThreadSummarySchema, UpdateRuntimePreferencesRequestSchema, VersionResponseSchema, WebPreviewTargetSchema, WorkspaceChangesResponseSchema, WorkspaceDirectoryEntrySchema, WorkspaceFileMentionSchema, WorkspaceGitActionResponseSchema, WorkspaceSelectionRequestSchema, apiPaths, chatMessageDetailsFromPromptContext, createOpenApiDocument, isPromptSkillMarkdownMention, normalizePromptContext, promptMarkdownWithSkills, promptSkillDisplayName, promptSkillMentionLabel, promptSkillMentionMarkdown, promptSkillMentionTextCandidates, stripPromptSkillMentions };