Skip to content

Commit ad84d15

Browse files
committed
Add Gemini and Codex CLI to Docker Compose
- Introduce gemini and codex services in compose.yaml for easier execution of AI CLI tools. - Update README.md with instructions on how to build and run Gemini and Codex CLIs using Docker Compose. - Clarify interactive CLI usage within Vim and via Docker Compose.
1 parent 00f8031 commit ad84d15

2 files changed

Lines changed: 58 additions & 3 deletions

File tree

README.md

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,19 @@ docker compose build app
113113
docker compose run --rm app
114114
```
115115

116-
📓 Optional: Run JupyterLab
116+
- Optional: Run Codex or Gemini (see more examples below)
117+
118+
```bash
119+
docker compose build codex
120+
docker compose run --rm codex
121+
```
122+
123+
```bash
124+
docker compose build gemini
125+
docker compose run --rm gemini
126+
```
127+
128+
- Optional: Run JupyterLab
117129

118130
```bash
119131
docker compose build jupyterlab
@@ -142,18 +154,29 @@ To open a terminal within Vim, you can use `:terminal` or `:vertical term` or
142154
`:tab terminal`. Once inside the terminal, you can invoke the CLI tools as
143155
usual.
144156

157+
Alternatively, the AI CLI tools can be run outside Vim, in a separate terminal
158+
tab, window, or tmux pane. This is often preferable for longer interactive
159+
sessions or when reviewing large outputs. See, `codex` and `gemini` services in
160+
`compose.yaml`.
161+
145162
### Gemini CLI examples
146163

147164
The Gemini CLI provides a conversational interface to interact with your
148165
codebase, allowing you to ask questions, refactor code, fix bugs, and add new
149166
features.
150167

151-
Run interactively:
168+
Run interactively in Vim:
152169

153170
```bash
154171
gemini
155172
```
156173

174+
or using docker compose:
175+
176+
```bash
177+
docker compose run --rm gemini
178+
```
179+
157180
Read a file:
158181

159182
```bash
@@ -178,12 +201,18 @@ The Codex CLI (or similar code generation/analysis tools) can be used for
178201
automating code generation, understanding project structure, and suggesting
179202
improvements.
180203

181-
Run interactively:
204+
Run interactively in Vim:
182205

183206
```bash
184207
codex
185208
```
186209

210+
or using docker compose:
211+
212+
```bash
213+
docker compose run --rm codex
214+
```
215+
187216
Generate a new Python class (hypothetical):
188217

189218
```bash

compose.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,32 @@ services:
5555
- type: bind
5656
source: .
5757
target: /application
58+
gemini:
59+
platform: linux/amd64
60+
entrypoint: gemini
61+
build:
62+
target: vim-ide
63+
args: *default-args
64+
environment:
65+
<<: *default-env
66+
GEMINI_API_KEY: ${GEMINI_API_KEY}
67+
volumes:
68+
- type: bind
69+
source: .
70+
target: /application
71+
codex:
72+
platform: linux/amd64
73+
entrypoint: codex
74+
build:
75+
target: vim-ide
76+
args: *default-args
77+
environment:
78+
<<: *default-env
79+
OPENAI_API_KEY: ${OPENAI_API_KEY}
80+
volumes:
81+
- type: bind
82+
source: .
83+
target: /application
5884
jupyterlab:
5985
platform: linux/amd64
6086
entrypoint:

0 commit comments

Comments
 (0)