Skip to content

Commit 6ef8a4e

Browse files
authored
Expand README and refresh development docs (#214)
1 parent c76e768 commit 6ef8a4e

2 files changed

Lines changed: 84 additions & 17 deletions

File tree

README.md

Lines changed: 70 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,75 @@
11
# ACP adapter for Codex CLI
2+
23
[![npm version](https://img.shields.io/npm/v/%40agentclientprotocol%2Fcodex-acp)](https://www.npmjs.com/package/@agentclientprotocol/codex-acp)
34

5+
Use [OpenAI Codex](https://github.com/openai/codex) from [Agent Client Protocol](https://agentclientprotocol.com/) clients.
6+
7+
`codex-acp` is a stdio ACP agent server. It starts the Codex App Server, translates ACP requests into Codex operations, and maps Codex events back into the client.
8+
9+
## Features
10+
11+
- ChatGPT, API key, and client-provided custom gateway authentication.
12+
- Model, reasoning effort, fast mode, approval, and sandbox mode configuration.
13+
- Text prompts, embedded context, images, resource links, and additional workspace directories.
14+
- Shell command, file change, permission request, MCP tool call, terminal output, reasoning, plan, web search, image generation, image view, token usage, and review events.
15+
- Client-provided MCP servers over command-based stdio config and HTTP transport.
16+
- Slash commands: `/status`, `/mcp`, `/skills`, `/review`, `/review-branch`, `/review-commit`, `/compact`, and `/logout`, as well as configured skills.
17+
18+
## Installation
19+
20+
Run the published package directly:
21+
22+
```bash
23+
npx -y @agentclientprotocol/codex-acp
24+
```
25+
26+
Or install it globally:
27+
28+
```bash
29+
npm install -g @agentclientprotocol/codex-acp
30+
codex-acp --version
31+
```
32+
33+
The npm package includes a compatible `@openai/codex` dependency. Set `CODEX_PATH` only when you want the adapter to run a different Codex binary:
34+
35+
```bash
36+
CODEX_PATH=/path/to/codex npx -y @agentclientprotocol/codex-acp
37+
```
38+
39+
## Authentication
40+
41+
The adapter advertises ACP auth methods during initialization. Clients can authenticate with:
42+
43+
- ChatGPT login.
44+
- OpenAI API key.
45+
- A custom OpenAI-compatible gateway, when the client opts in to the gateway auth capability.
46+
47+
## Runtime options
48+
49+
- `CODEX_PATH` - run a specific Codex executable instead of the bundled package dependency.
50+
- `CODEX_CONFIG` - JSON object merged into the Codex session config.
51+
- `MODEL_PROVIDER` - model provider to pass to Codex for new sessions.
52+
- `DEFAULT_AUTH_REQUEST` - ACP auth request JSON used when Codex requires authentication.
53+
- `INITIAL_AGENT_MODE` - initial mode id: `read-only`, `agent`, or `agent-full-access`.
54+
- `APP_SERVER_LOGS` - directory for adapter logs.
55+
56+
## Development
57+
58+
```bash
59+
npm install
60+
npm run start
61+
npm run typecheck
62+
npm test
63+
```
64+
65+
Build standalone binaries in `dist/bin` with:
66+
67+
```bash
68+
npm run bundle:all
69+
```
70+
71+
See [readme-dev.md](readme-dev.md) for local client configuration, binary packaging, and Codex type regeneration.
472

5-
## Documentation
73+
## License
674

7-
- **[Development Guide](readme-dev.md)** - Setup, configuration, and building binaries
75+
By contributing, you agree that your contributions will be licensed under the Apache 2.0 License.

readme-dev.md

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,25 @@
1-
This package lists codex only as a dev dependency and requires the codex binary.
2-
It may not work with versions other than the one specified in package.json.
1+
This package uses the bundled `@openai/codex` dependency by default.
2+
Set `CODEX_PATH` to run a different Codex binary; versions other than the one specified in `package.json` may not be compatible.
33

44
### Quick start
55

66
#### Develop on Windows?
7+
78
- Download and install [C++ redistributable package](https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170#latest-supported-redistributable-version)
89

9-
#### Adjust acp config for IDE
10+
#### Adjust ACP client config
1011

1112
Run from sources
13+
1214
1. Install dependencies `npm install`
13-
2. Adjust acp config for IDE
15+
2. Adjust ACP client config
16+
1417
```json
1518
{
1619
"agent_servers": {
1720
"Codex (app-server)": {
18-
"command": "npx",
19-
"args": [
20-
"npm",
21-
"run",
22-
"start",
23-
"--prefix",
24-
"/path/to/project/"
25-
],
21+
"command": "npm",
22+
"args": ["run", "start", "--prefix", "/path/to/project/"],
2623
"env": {
2724
"CODEX_PATH": "node_modules/.bin/codex",
2825
"APP_SERVER_LOGS": "optional/path/to/existing/log/directory"
@@ -33,17 +30,19 @@ Run from sources
3330
```
3431

3532
Run from binaries
36-
1. Download acp-server binary archive from https://github.com/JetBrains/codex-acp/tags
33+
34+
1. Download a `codex-acp-<platform>.zip` archive from https://github.com/agentclientprotocol/codex-acp/releases
3735
2. Unzip the archive:
3836
```bash
3937
unzip codex-acp-<platform>.zip
4038
```
41-
3. Adjust acp config for IDE
39+
3. Adjust ACP client config
40+
4241
```json
4342
{
4443
"agent_servers": {
4544
"Codex (app-server)": {
46-
"command": "/path/to/acp-server",
45+
"command": "/path/to/codex-acp",
4746
"env": {
4847
"CODEX_PATH": "/path/to/codex"
4948
}

0 commit comments

Comments
 (0)