Skip to content

Commit 7bf6323

Browse files
committed
docs: improve README quickstart, prerequisites, and CLI guidance
- Clarify pyenv-based PYTHON_VERSION and Docker Desktop login caveat - Add Vim exit tip and tighten wording - Fix minor formatting/whitespace in codex examples
1 parent 7cf7db8 commit 7bf6323

2 files changed

Lines changed: 98 additions & 53 deletions

File tree

README.md

Lines changed: 97 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
* [About the Template](#about-the-template)
88
* [Features](#features)
99
* [Tested with](#tested-with)
10+
* [Prerequisites](#prerequisites)
11+
* [Quickstart](#quickstart)
1012
* [🚀 Getting Started](#-getting-started)
1113
* [1. Configure environment and Python settings and API tokens](#1-configure-environment-and-python-settings-and-api-tokens)
1214
* [2. Set up Python project dependencies](#2-set-up-python-project-dependencies)
@@ -18,9 +20,10 @@
1820
* [Optional: Run JupyterLab](#optional-run-jupyterlab)
1921
* [💻 AI-Powered CLI Workflow (Gemini & Codex)](#-ai-powered-cli-workflow-gemini--codex)
2022
* [If you do not have API keys](#if-you-do-not-have-api-keys)
21-
* [Interactive CLI Usage in Vim Terminal](#interactive-cli-usage-in-vim-terminal)
23+
* [Where to run commands](#where-to-run-commands)
2224
* [Gemini CLI examples](#gemini-cli-examples)
2325
* [Codex CLI examples](#codex-cli-examples)
26+
* [🔒 Security notes](#-security-notes)
2427
* [🧠 Vim IDE Features](#-vim-ide-features)
2528
* [🔌Included Plugins](#included-plugins)
2629
* [🗂 Additional Notes](#-additional-notes)
@@ -46,34 +49,55 @@ workflow with Vim at the center.
4649
> dependencies.
4750
4851
The configuration is intentionally minimal and easy to adapt. You’re free to:
49-
- Add or update Python dependencies
50-
- Swap in different OS packages
51-
- Customize the Vim environment
52-
- Change Python or Poetry versions
52+
53+
* Add or update Python dependencies
54+
* Swap in different OS packages
55+
* Customize the Vim environment
56+
* Change Python or Poetry versions
5357

5458
Use it as-is or tailor it to match your team's development workflow.
5559

5660
## Features
5761

58-
- **Reproducible environments** for Python development
59-
- **IDE-like Vim setup**, ready to go out of the box
60-
- Supports custom **Python and Poetry** versions
61-
- Simple to extend with Jupyter, SQL drivers, and more
62-
- Works identically on any machine with Docker
62+
* **Reproducible environments** for Python development
63+
* **IDE-like Vim setup**, ready to go out of the box
64+
* Supports custom **Python and Poetry** versions
65+
* Simple to extend with Jupyter, SQL drivers, and more
66+
* Works identically on any machine with Docker
6367

6468
## Tested with
6569

66-
- **Docker**: `27.3.1``29.1.1`
67-
- **buildx**: `0.20.0``0.30.0`
68-
- **Compose**: `2.32.1``2.40.3`
70+
* **Docker**: `27.3.1``29.1.1`
71+
* **buildx**: `0.20.0``0.30.0`
72+
* **Compose**: `2.32.1``2.40.3`
73+
74+
## Prerequisites
75+
76+
* Docker + Docker Compose v2 (and `docker buildx`)
77+
* A supported `DOCKER_PLATFORM` for your machine (for example, Apple Silicon
78+
users often set `DOCKER_PLATFORM=linux/arm64`)
79+
* Note: the `codex-web-login` service uses `network_mode: host` (works on
80+
Linux; Docker Desktop users may need an alternative login flow). If needed,
81+
authenticate on the host (outside Docker) and use `OPENAI_API_KEY` /
82+
`GEMINI_API_KEY` inside the containers.
83+
84+
## Quickstart
85+
86+
```bash
87+
cp .env.dist .env
88+
docker compose build vim-ide
89+
docker compose run --rm vim-ide
90+
```
91+
92+
To exit Vim: `:q` (or `:qa` to quit all).
6993

7094
## 🚀 Getting Started
7195

7296
### 1. Configure environment and Python settings and API tokens
7397

74-
Set OS packages, `DOCKER_PLATFORM` (if not linux/amd64), a released
75-
`PYTHON_VERSION`, Poetry version, etc., and your API keys for `OPENAI_API_KEY`
76-
and `GEMINI_API_KEY`.
98+
Set OS packages, `DOCKER_PLATFORM` (if not linux/amd64), a `PYTHON_VERSION`
99+
available via `pyenv`, Poetry version, etc., and your API keys for
100+
`OPENAI_API_KEY` and `GEMINI_API_KEY`.
77101

78102
```bash
79103
cp .env.dist .env
@@ -126,6 +150,10 @@ docker compose build app
126150
docker compose run --rm app
127151
```
128152

153+
> ℹ️ `vim-ide`, `poetry`, `codex`, `gemini`, and `jupyterlab` bind-mount your
154+
> working directory into the container for live editing. `app` is a “packaged”
155+
> image (it copies your sources), so code changes require rebuilding `app`.
156+
129157
### Optional: Run Codex or Gemini (see more examples below)
130158

131159
> 🔄 Note: `codex` and `gemini` CLIs are installed during the image build via
@@ -183,24 +211,20 @@ docker compose run --rm gemini
183211
and choose “Login with Google.”
184212

185213
After completion, the authorization file will be saved to
186-
`${DOCKER_USER_HOME}/.codex` or `${DOCKER_USER_HOME}/.gemini`. In this template,
187-
those directories are persisted between runs via the `codex-auth` and
214+
`${DOCKER_USER_HOME}/.codex` or `${DOCKER_USER_HOME}/.gemini`. In this
215+
template, those directories are persisted between runs via the `codex-auth` and
188216
`gemini-auth` Docker volumes, which allows the agent CLI tool to be restarted
189217
without any additional authentication steps.
190218

191-
### Interactive CLI Usage in Vim Terminal
219+
### Where to run commands
192220

193-
For a more integrated workflow, you can use the Gemini and Codex CLIs directly
194-
within a Vim terminal. This allows for quick iteration, context-aware
195-
assistance, and seamless integration with your editing environment.
221+
You can run the CLIs either:
196222

197-
To open a terminal within Vim, you can use `:terminal` or `:vertical term` or
198-
`:tab terminal`. Once inside the terminal, you can invoke the CLI tools as
199-
usual.
223+
**Inside the container** (recommended): `docker compose run --rm vim-ide`, then
224+
open a Vim terminal (`:terminal`) and run `codex` / `gemini`.
200225

201-
Alternatively, the AI CLI tools can be run outside Vim, in a separate terminal
202-
tab, window, or tmux pane. This is often preferable for longer interactive
203-
sessions or when reviewing large outputs. See, `codex` and `gemini` services in
226+
**Outside Vim but still in Docker**: `docker compose run --rm codex` or `docker
227+
compose run --rm gemini`. See the `codex` and `gemini` services in
204228
`compose.yaml`.
205229

206230
### Gemini CLI examples
@@ -254,7 +278,7 @@ codex
254278
or using docker compose:
255279

256280
```bash
257-
docker compose run --rm codex
281+
docker compose run --rm codex
258282
```
259283

260284
Generate a new Python class (hypothetical):
@@ -275,6 +299,15 @@ Suggest tests for a file (hypothetical):
275299
codex suggest tests --file src/sample/main.py
276300
```
277301

302+
## 🔒 Security notes
303+
304+
Never commit `.env` (it contains secrets like `OPENAI_API_KEY`,
305+
`GEMINI_API_KEY`, and `JUPYTER_TOKEN`).
306+
307+
Browser-based auth persists under `${DOCKER_USER_HOME}/.codex` and
308+
`${DOCKER_USER_HOME}/.gemini` via the `codex-auth` and `gemini-auth` Docker
309+
volumes.
310+
278311
## 🧠 Vim IDE Features
279312

280313
This template comes with a thoughtfully configured Vim environment that
@@ -296,50 +329,62 @@ productivity and designed to work out of the box — but is fully customizable.
296329

297330
🧠 Code Intelligence
298331

299-
- [coc.nvim](https://github.com/neoclide/coc.nvim) – LSP engine with autocompletion, diagnostics, and more
300-
- [coc-pyright](https://github.com/fannheyward/coc-pyright) – Python LSP support
301-
- [ultisnips](https://github.com/SirVer/ultisnips) + [vim-snippets](https://github.com/honza/vim-snippets) – Powerful snippet expansion
332+
* [coc.nvim](https://github.com/neoclide/coc.nvim) – LSP engine with
333+
autocompletion, diagnostics, and more
334+
* [coc-pyright](https://github.com/fannheyward/coc-pyright) – Python LSP
335+
support
336+
* [ultisnips](https://github.com/SirVer/ultisnips) +
337+
[vim-snippets](https://github.com/honza/vim-snippets) – Powerful snippet
338+
expansion
302339

303340
📁 Navigation & UI
304341

305-
- [NERDTree](https://github.com/preservim/nerdtree) – File tree explorer
306-
- [fzf.vim](https://github.com/junegunn/fzf.vim) – Fuzzy file and symbol search
307-
- [tagbar](https://github.com/preservim/tagbar) – Code structure sidebar
308-
- [vim-airline](https://github.com/vim-airline/vim-airline) – Status/tab line enhancement
342+
* [NERDTree](https://github.com/preservim/nerdtree) – File tree explorer
343+
* [fzf.vim](https://github.com/junegunn/fzf.vim) – Fuzzy file and symbol search
344+
* [tagbar](https://github.com/preservim/tagbar) – Code structure sidebar
345+
* [vim-airline](https://github.com/vim-airline/vim-airline) – Status/tab line
346+
enhancement
309347

310348
🔄 Git Integration
311349

312-
- [vim-fugitive](https://github.com/tpope/vim-fugitive) – Git commands from within Vim
313-
- [vim-gitgutter](https://github.com/airblade/vim-gitgutter) – Git diff signs in the gutter
350+
* [vim-fugitive](https://github.com/tpope/vim-fugitive) – Git commands from
351+
within Vim
352+
* [vim-gitgutter](https://github.com/airblade/vim-gitgutter) – Git diff signs
353+
in the gutter
314354

315355
📝 Markdown Support
316356

317-
- [vim-markdown](https://github.com/plasticboy/vim-markdown) – Markdown editing enhancements
318-
- [vim-markdown-toc](https://github.com/mzlogin/vim-markdown-toc) – Auto-generated table of contents
357+
* [vim-markdown](https://github.com/plasticboy/vim-markdown) – Markdown editing
358+
enhancements
359+
* [vim-markdown-toc](https://github.com/mzlogin/vim-markdown-toc)
360+
Auto-generated table of contents
319361

320362
📊 Data Science & Python Dev
321363

322-
- [vim-slime](https://github.com/jpalardy/vim-slime) – Send code to REPL or terminal
323-
- [vim-doge](https://github.com/kkoomen/vim-doge) – Generate docstrings in Google/Numpy style
364+
* [vim-slime](https://github.com/jpalardy/vim-slime) – Send code to REPL or
365+
terminal
366+
* [vim-doge](https://github.com/kkoomen/vim-doge) – Generate docstrings in
367+
Google/Numpy style
324368

325369
🎨 Theme & Aesthetics
326370

327-
- [gruvbox-material](https://github.com/sainnhe/gruvbox-material) – Color scheme (dark, high-contrast)
328-
- Airline integrated with Gruvbox
371+
* [gruvbox-material](https://github.com/sainnhe/gruvbox-material) – Color
372+
scheme (dark, high-contrast)
373+
* Airline integrated with Gruvbox
329374

330375
⚙️ Python-Specific Tuning
331376

332-
- Smart indentation for Python, with 4-space formatting
333-
- `textwidth` and `colorcolumn` set to PEP8 defaults
334-
- Spellcheck enabled for English and Russian
335-
- LSP-based completion, hover docs, jump-to-definition, code actions
377+
* Smart indentation for Python, with 4-space formatting
378+
* `textwidth` and `colorcolumn` set to PEP8 defaults
379+
* Spellcheck enabled for English and Russian
380+
* LSP-based completion, hover docs, jump-to-definition, code actions
336381

337382
### 🗂 Additional Notes
338383

339-
- To customize the LSP setup, see `.coc-settings.json`
340-
- To update CoC extensions: `:CocUpdate`
341-
- Snippets can be edited under `~/.vim/plugged/vim-snippets`
342-
- Full configuration lives in `.vimrc.dist` — tweak freely
384+
* To customize the LSP setup, see `.coc-settings.json`
385+
* To update CoC extensions: `:CocUpdate`
386+
* Snippets can be edited under `~/.vim/plugged/vim-snippets`
387+
* Full configuration lives in `.vimrc.dist` — tweak freely
343388

344389
This is a template for python-based projects. Many DS/ML workflows require
345390
hardware-specific platforms in detailed OS-level libraries and python

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[tool.poetry]
22
name = "vim-python-docker-template"
33
version = "0.2.0"
4-
description = "Templete"
4+
description = "Template"
55
authors = [
66
"John Dev <j_dev@domain.com>",
77
]

0 commit comments

Comments
 (0)