gemini-cli - 💡(How to fix) Fix Feature Request: --exclude-extensions flag to skip specific extensions at startup

Official PRs (…)
ON THIS PAGE

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

This is a small, well-scoped addition that is complementary to the existing -e flag. Both flags could co-exist, with -e taking precedence if both are passed (or they could conflict and raise an error, up to maintainers to decide).

Root Cause

But the opposite case is not covered. If you have 8 extensions installed and want to skip just one for a session, you have to manually list the other 7 using -e. That is tedious and breaks whenever you add a new extension, because you have to update all your aliases.

Code Example

# Skip one heavy extension, load everything else as usual
gemini --exclude-extensions playwright

# Skip multiple
gemini --exclude-extensions playwright --exclude-extensions postgres

---

# Lightweight alias for quick queries or code tasks
alias gemini_fast='gemini --exclude-extensions playwright --exclude-extensions postgres'

# Full alias when you need everything
alias gemini_full='gemini'
RAW_BUFFERClick to expand / collapse

What is the problem?

The -e / --extensions flag works as a whitelist. You specify which extensions to load, and everything else is skipped. That works well when you want to run with just one or two extensions.

But the opposite case is not covered. If you have 8 extensions installed and want to skip just one for a session, you have to manually list the other 7 using -e. That is tedious and breaks whenever you add a new extension, because you have to update all your aliases.

What would help?

A companion flag like --exclude-extensions that takes extension names to skip, while loading everything else normally.

# Skip one heavy extension, load everything else as usual
gemini --exclude-extensions playwright

# Skip multiple
gemini --exclude-extensions playwright --exclude-extensions postgres

This mirrors the same pattern already in the CLI for MCP servers, where --allowed-mcp-server-names covers the whitelist side but there is no blacklist equivalent either.

Why is this useful?

Some extensions are heavy to start up, for example browser automation tools like playwright-mcp spin up a browser process in the background. For tasks that have nothing to do with the browser, loading it just adds delay and wastes memory.

With an exclude flag, you could set up simple aliases for different workflows:

# Lightweight alias for quick queries or code tasks
alias gemini_fast='gemini --exclude-extensions playwright --exclude-extensions postgres'

# Full alias when you need everything
alias gemini_full='gemini'

Right now achieving the same thing with -e means maintaining a long hardcoded list of extensions, which breaks silently when new extensions are added.

Notes

This is a small, well-scoped addition that is complementary to the existing -e flag. Both flags could co-exist, with -e taking precedence if both are passed (or they could conflict and raise an error, up to maintainers to decide).

I am interested in implementing this if maintainers think it is a reasonable addition.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

gemini-cli - 💡(How to fix) Fix Feature Request: --exclude-extensions flag to skip specific extensions at startup