from line 173
173173
174174You can load a plugin for a single session in three ways: from a directory or `.zip` archive on disk with `--plugin-dir`, from a URL with `--plugin-url`, or from an environment variable when you can't add a flag. Each plugin loads for that session only, and nothing is written to your settings for it. When you edit the plugin's files during the session, run `/reload-plugins` to load the changes.
175175
176#### From a directory or `.zip`
176<span id="from-a-directory-or-zip" />
177177
178#### Load a plugin from a directory or `.zip`
179
178180When you start `claude` from your shell, pass `--plugin-dir` with the plugin's root directory or a `.zip` archive of it. Repeat the flag to load several plugins:
179181
180182```bash theme={null}
from line 183
181183claude --plugin-dir ./my-first-plugin --plugin-dir ./other-plugin.zip
182184```
183185
184<h4 id="load-a-folder-of-plugins">
185 From a folder of plugins
186</h4>
186#### Load a folder of plugins
187187
188188To load several plugins from one place, pass a folder that holds them, such as `--plugin-dir ./plugins`. Loading a folder of plugins requires Claude Code v2.1.265 or later.
189189
from line 198
198198
199199A message appears in the session for each of these changes. If loading or unloading a plugin mid-conversation would [invalidate the prompt cache](/docs/en/prompt-caching#enabling-or-disabling-a-plugin), the change is held instead, and the message tells you to run `/reload-plugins` to apply it.
200200
201<h4 id="fetch-an-archive-from-a-url-for-one-session">
202 From a URL
203</h4>
201<span id="fetch-an-archive-from-a-url-for-one-session" />
204202
203#### Load a plugin from a URL
204
205205When you start `claude` from your shell, pass `--plugin-url` with the address of a `.zip` archive, such as a build artifact your CI publishes:
206206
207207```bash theme={null}
from line 214
214214
215215If Claude Code can't fetch the archive, or the archive is invalid, it starts without the plugin and records a plugin load error that you can review in the `/plugin` manager's **Errors** tab.
216216
217#### From an environment variable
217<span id="from-an-environment-variable" />
218
219#### Load plugins from an environment variable
218220
219221To load plugins in a session where you can't add the `--plugin-dir` flag, list their absolute paths in the [`CLAUDE_CODE_PLUGIN_DIRS`](/docs/en/env-vars#variables) environment variable instead. Claude Code loads each path as it loads a `--plugin-dir` path. These plugins load in addition to any you pass with `--plugin-dir`. [Project and local settings can't set this variable](/docs/en/settings-reference#variables-claude-code-ignores-in-env). `CLAUDE_CODE_PLUGIN_DIRS` requires Claude Code v2.1.280 or later.
220222
No line in this hunk matches that.