|
8 | 8 | * [✅ Features](#-features) |
9 | 9 | * [🧪 Tested with](#-tested-with) |
10 | 10 | * [🚀 Getting Started](#-getting-started) |
| 11 | +* [💻 AI-Powered CLI Workflow (Gemini & Codex)](#-ai-powered-cli-workflow-gemini--codex) |
| 12 | + * [Interactive CLI Usage in Vim Terminal](#interactive-cli-usage-in-vim-terminal) |
| 13 | + * [Gemini CLI examples](#gemini-cli-examples) |
| 14 | + * [Codex CLI examples](#codex-cli-examples) |
11 | 15 | * [🧠 Vim IDE Features](#-vim-ide-features) |
12 | | - * [🔌Included Plugins](#included-plugins) |
13 | | - * [🗂 Additional Notes](#-additional-notes) |
| 16 | + * [🔌Included Plugins](#included-plugins) |
| 17 | + * [🗂 Additional Notes](#-additional-notes) |
14 | 18 |
|
15 | 19 | <!-- vim-markdown-toc --> |
16 | 20 |
|
@@ -56,11 +60,11 @@ Use it as-is or tailor it to match your team's development workflow. |
56 | 60 |
|
57 | 61 | ## 🚀 Getting Started |
58 | 62 |
|
59 | | -1. Configure environment and Python settings |
| 63 | +1. Configure environment and Python settings and API tokens |
60 | 64 |
|
61 | 65 | ```bash |
62 | 66 | cp .env.dist .env |
63 | | -vim .env # Set OS packages, Python version, Poetry version, etc. |
| 67 | +vim .env # Set OS packages, Python version, Poetry version, etc., and your API keys for OPENAI_API_KEY and GEMINI_API_KEY. |
64 | 68 | ``` |
65 | 69 |
|
66 | 70 | 2. Set up Python project dependencies |
@@ -117,6 +121,87 @@ docker compose run --rm --service-ports jupyterlab |
117 | 121 | # Open: http://127.0.0.1:8888/lab?token=<your .env token> |
118 | 122 | ``` |
119 | 123 |
|
| 124 | +## 💻 AI-Powered CLI Workflow (Gemini & Codex) |
| 125 | + |
| 126 | +This project template is designed to be easily integrated with powerful CLI |
| 127 | +tools like Gemini and Codex, enhancing your development workflow with |
| 128 | +intelligent assistance. Rather than replacing your editor, these tools |
| 129 | +complement Vim by running alongside it in a terminal—either inside or outside |
| 130 | +Vim—so you can inspect, generate, and reason about code without breaking flow. |
| 131 | + |
| 132 | +NOTE: To use AI CLI tools such as Gemini or Codex, you must configure API keys |
| 133 | +according to each provider’s official documentation. |
| 134 | + |
| 135 | +### Interactive CLI Usage in Vim Terminal |
| 136 | + |
| 137 | +For a more integrated workflow, you can use the Gemini and Codex CLIs directly |
| 138 | +within a Vim terminal. This allows for quick iteration, context-aware |
| 139 | +assistance, and seamless integration with your editing environment. |
| 140 | + |
| 141 | +To open a terminal within Vim, you can use `:terminal` or `:vertical term` or |
| 142 | +`:tab terminal`. Once inside the terminal, you can invoke the CLI tools as |
| 143 | +usual. |
| 144 | + |
| 145 | +### Gemini CLI examples |
| 146 | + |
| 147 | +The Gemini CLI provides a conversational interface to interact with your |
| 148 | +codebase, allowing you to ask questions, refactor code, fix bugs, and add new |
| 149 | +features. |
| 150 | + |
| 151 | +Run interactively: |
| 152 | + |
| 153 | +```bash |
| 154 | +gemini |
| 155 | +``` |
| 156 | + |
| 157 | +Read a file: |
| 158 | + |
| 159 | +```bash |
| 160 | +gemini read src/sample/main.py |
| 161 | +``` |
| 162 | + |
| 163 | +List directory contents: |
| 164 | + |
| 165 | +```bash |
| 166 | +gemini list src/sample |
| 167 | +``` |
| 168 | + |
| 169 | +Explain a code snippet (hypothetical): |
| 170 | + |
| 171 | +```bash |
| 172 | +gemini explain "def my_function():" --file src/sample/main.py |
| 173 | +``` |
| 174 | + |
| 175 | +### Codex CLI examples |
| 176 | + |
| 177 | +The Codex CLI (or similar code generation/analysis tools) can be used for |
| 178 | +automating code generation, understanding project structure, and suggesting |
| 179 | +improvements. |
| 180 | + |
| 181 | +Run interactively: |
| 182 | + |
| 183 | +```bash |
| 184 | +codex |
| 185 | +``` |
| 186 | + |
| 187 | +Generate a new Python class (hypothetical): |
| 188 | + |
| 189 | +```bash |
| 190 | +codex generate class User --fields name:str,email:str --language python --file src/models.py |
| 191 | +``` |
| 192 | + |
| 193 | +Analyze dependencies (hypothetical): |
| 194 | + |
| 195 | +```bash |
| 196 | +codex analyze dependencies --project-root . |
| 197 | +``` |
| 198 | + |
| 199 | +Suggest tests for a file (hypothetical): |
| 200 | + |
| 201 | +```bash |
| 202 | +codex suggest tests --file src/sample/main.py |
| 203 | +``` |
| 204 | + |
120 | 205 | ## 🧠 Vim IDE Features |
121 | 206 |
|
122 | 207 | This template comes with a thoughtfully configured Vim environment that |
|
0 commit comments