@wxp212/gemini-cli 0.28.3-2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (117) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +393 -0
  3. package/bundle/builtin/skill-creator/SKILL.md +382 -0
  4. package/bundle/builtin/skill-creator/scripts/init_skill.cjs +235 -0
  5. package/bundle/builtin/skill-creator/scripts/package_skill.cjs +102 -0
  6. package/bundle/builtin/skill-creator/scripts/validate_skill.cjs +127 -0
  7. package/bundle/docs/architecture.md +80 -0
  8. package/bundle/docs/assets/connected_devtools.png +0 -0
  9. package/bundle/docs/assets/gemini-screenshot.png +0 -0
  10. package/bundle/docs/assets/monitoring-dashboard-logs.png +0 -0
  11. package/bundle/docs/assets/monitoring-dashboard-metrics.png +0 -0
  12. package/bundle/docs/assets/monitoring-dashboard-overview.png +0 -0
  13. package/bundle/docs/assets/release_patch.png +0 -0
  14. package/bundle/docs/assets/theme-ansi-light.png +0 -0
  15. package/bundle/docs/assets/theme-ansi.png +0 -0
  16. package/bundle/docs/assets/theme-atom-one.png +0 -0
  17. package/bundle/docs/assets/theme-ayu-light.png +0 -0
  18. package/bundle/docs/assets/theme-ayu.png +0 -0
  19. package/bundle/docs/assets/theme-custom.png +0 -0
  20. package/bundle/docs/assets/theme-default-light.png +0 -0
  21. package/bundle/docs/assets/theme-default.png +0 -0
  22. package/bundle/docs/assets/theme-dracula.png +0 -0
  23. package/bundle/docs/assets/theme-github-light.png +0 -0
  24. package/bundle/docs/assets/theme-github.png +0 -0
  25. package/bundle/docs/assets/theme-google-light.png +0 -0
  26. package/bundle/docs/assets/theme-xcode-light.png +0 -0
  27. package/bundle/docs/changelogs/index.md +743 -0
  28. package/bundle/docs/changelogs/latest.md +338 -0
  29. package/bundle/docs/changelogs/preview.md +437 -0
  30. package/bundle/docs/cli/authentication.md +3 -0
  31. package/bundle/docs/cli/checkpointing.md +94 -0
  32. package/bundle/docs/cli/cli-reference.md +101 -0
  33. package/bundle/docs/cli/commands.md +430 -0
  34. package/bundle/docs/cli/creating-skills.md +80 -0
  35. package/bundle/docs/cli/custom-commands.md +315 -0
  36. package/bundle/docs/cli/enterprise.md +582 -0
  37. package/bundle/docs/cli/gemini-ignore.md +71 -0
  38. package/bundle/docs/cli/gemini-md.md +108 -0
  39. package/bundle/docs/cli/generation-settings.md +210 -0
  40. package/bundle/docs/cli/headless.md +388 -0
  41. package/bundle/docs/cli/index.md +65 -0
  42. package/bundle/docs/cli/keyboard-shortcuts.md +141 -0
  43. package/bundle/docs/cli/model-routing.md +42 -0
  44. package/bundle/docs/cli/model.md +62 -0
  45. package/bundle/docs/cli/rewind.md +51 -0
  46. package/bundle/docs/cli/sandbox.md +171 -0
  47. package/bundle/docs/cli/session-management.md +158 -0
  48. package/bundle/docs/cli/settings.md +141 -0
  49. package/bundle/docs/cli/skills.md +112 -0
  50. package/bundle/docs/cli/system-prompt.md +125 -0
  51. package/bundle/docs/cli/telemetry.md +826 -0
  52. package/bundle/docs/cli/themes.md +235 -0
  53. package/bundle/docs/cli/token-caching.md +20 -0
  54. package/bundle/docs/cli/trusted-folders.md +95 -0
  55. package/bundle/docs/cli/tutorials/skills-getting-started.md +97 -0
  56. package/bundle/docs/cli/tutorials.md +87 -0
  57. package/bundle/docs/cli/uninstall.md +65 -0
  58. package/bundle/docs/core/index.md +107 -0
  59. package/bundle/docs/core/memport.md +246 -0
  60. package/bundle/docs/core/policy-engine.md +305 -0
  61. package/bundle/docs/core/remote-agents.md +84 -0
  62. package/bundle/docs/core/subagents.md +191 -0
  63. package/bundle/docs/core/tools-api.md +131 -0
  64. package/bundle/docs/examples/proxy-script.md +83 -0
  65. package/bundle/docs/extensions/best-practices.md +139 -0
  66. package/bundle/docs/extensions/index.md +45 -0
  67. package/bundle/docs/extensions/reference.md +336 -0
  68. package/bundle/docs/extensions/releasing.md +183 -0
  69. package/bundle/docs/extensions/writing-extensions.md +281 -0
  70. package/bundle/docs/faq.md +154 -0
  71. package/bundle/docs/get-started/authentication.md +321 -0
  72. package/bundle/docs/get-started/configuration-v1.md +880 -0
  73. package/bundle/docs/get-started/configuration.md +1602 -0
  74. package/bundle/docs/get-started/examples.md +219 -0
  75. package/bundle/docs/get-started/gemini-3.md +101 -0
  76. package/bundle/docs/get-started/index.md +71 -0
  77. package/bundle/docs/get-started/installation.md +141 -0
  78. package/bundle/docs/hooks/best-practices.md +677 -0
  79. package/bundle/docs/hooks/index.md +164 -0
  80. package/bundle/docs/hooks/reference.md +322 -0
  81. package/bundle/docs/hooks/writing-hooks.md +450 -0
  82. package/bundle/docs/ide-integration/ide-companion-spec.md +267 -0
  83. package/bundle/docs/ide-integration/index.md +202 -0
  84. package/bundle/docs/index.md +123 -0
  85. package/bundle/docs/integration-tests.md +211 -0
  86. package/bundle/docs/issue-and-pr-automation.md +134 -0
  87. package/bundle/docs/local-development.md +128 -0
  88. package/bundle/docs/mermaid/context.mmd +103 -0
  89. package/bundle/docs/mermaid/render-path.mmd +64 -0
  90. package/bundle/docs/npm.md +62 -0
  91. package/bundle/docs/quota-and-pricing.md +158 -0
  92. package/bundle/docs/release-confidence.md +164 -0
  93. package/bundle/docs/releases.md +540 -0
  94. package/bundle/docs/sidebar.json +152 -0
  95. package/bundle/docs/tools/file-system.md +216 -0
  96. package/bundle/docs/tools/index.md +98 -0
  97. package/bundle/docs/tools/mcp-server.md +1068 -0
  98. package/bundle/docs/tools/memory.md +54 -0
  99. package/bundle/docs/tools/shell.md +260 -0
  100. package/bundle/docs/tools/todos.md +57 -0
  101. package/bundle/docs/tools/web-fetch.md +59 -0
  102. package/bundle/docs/tools/web-search.md +42 -0
  103. package/bundle/docs/tos-privacy.md +96 -0
  104. package/bundle/docs/troubleshooting.md +173 -0
  105. package/bundle/gemini.js +538280 -0
  106. package/bundle/policies/discovered.toml +8 -0
  107. package/bundle/policies/plan.toml +86 -0
  108. package/bundle/policies/read-only.toml +51 -0
  109. package/bundle/policies/write.toml +78 -0
  110. package/bundle/policies/yolo.toml +32 -0
  111. package/bundle/sandbox-macos-permissive-closed.sb +32 -0
  112. package/bundle/sandbox-macos-permissive-open.sb +27 -0
  113. package/bundle/sandbox-macos-permissive-proxied.sb +37 -0
  114. package/bundle/sandbox-macos-restrictive-closed.sb +93 -0
  115. package/bundle/sandbox-macos-restrictive-open.sb +96 -0
  116. package/bundle/sandbox-macos-restrictive-proxied.sb +98 -0
  117. package/package.json +154 -0
@@ -0,0 +1,173 @@
1
+ # Troubleshooting guide
2
+
3
+ This guide provides solutions to common issues and debugging tips, including
4
+ topics on:
5
+
6
+ - Authentication or login errors
7
+ - Frequently asked questions (FAQs)
8
+ - Debugging tips
9
+ - Existing GitHub Issues similar to yours or creating new Issues
10
+
11
+ ## Authentication or login errors
12
+
13
+ - **Error:
14
+ `You must be a named user on your organization's Gemini Code Assist Standard edition subscription to use this service. Please contact your administrator to request an entitlement to Gemini Code Assist Standard edition.`**
15
+ - **Cause:** This error might occur if Gemini CLI detects the
16
+ `GOOGLE_CLOUD_PROJECT` or `GOOGLE_CLOUD_PROJECT_ID` environment variable is
17
+ defined. Setting these variables forces an organization subscription check.
18
+ This might be an issue if you are using an individual Google account not
19
+ linked to an organizational subscription.
20
+
21
+ - **Solution:**
22
+ - **Individual Users:** Unset the `GOOGLE_CLOUD_PROJECT` and
23
+ `GOOGLE_CLOUD_PROJECT_ID` environment variables. Check and remove these
24
+ variables from your shell configuration files (for example, `.bashrc`,
25
+ `.zshrc`) and any `.env` files. If this doesn't resolve the issue, try
26
+ using a different Google account.
27
+
28
+ - **Organizational Users:** Contact your Google Cloud administrator to be
29
+ added to your organization's Gemini Code Assist subscription.
30
+
31
+ - **Error:
32
+ `Failed to login. Message: Your current account is not eligible... because it is not currently available in your location.`**
33
+ - **Cause:** Gemini CLI does not currently support your location. For a full
34
+ list of supported locations, see the following pages:
35
+ - Gemini Code Assist for individuals:
36
+ [Available locations](https://developers.google.com/gemini-code-assist/resources/available-locations#americas)
37
+
38
+ - **Error: `Failed to login. Message: Request contains an invalid argument`**
39
+ - **Cause:** Users with Google Workspace accounts or Google Cloud accounts
40
+ associated with their Gmail accounts may not be able to activate the free
41
+ tier of the Google Code Assist plan.
42
+ - **Solution:** For Google Cloud accounts, you can work around this by setting
43
+ `GOOGLE_CLOUD_PROJECT` to your project ID. Alternatively, you can obtain the
44
+ Gemini API key from
45
+ [Google AI Studio](http://aistudio.google.com/app/apikey), which also
46
+ includes a separate free tier.
47
+
48
+ - **Error: `UNABLE_TO_GET_ISSUER_CERT_LOCALLY` or
49
+ `unable to get local issuer certificate`**
50
+ - **Cause:** You may be on a corporate network with a firewall that intercepts
51
+ and inspects SSL/TLS traffic. This often requires a custom root CA
52
+ certificate to be trusted by Node.js.
53
+ - **Solution:** First try setting `NODE_USE_SYSTEM_CA`; if that does not
54
+ resolve the issue, set `NODE_EXTRA_CA_CERTS`.
55
+ - Set the `NODE_USE_SYSTEM_CA=1` environment variable to tell Node.js to use
56
+ the operating system's native certificate store (where corporate
57
+ certificates are typically already installed).
58
+ - Example: `export NODE_USE_SYSTEM_CA=1`
59
+ - Set the `NODE_EXTRA_CA_CERTS` environment variable to the absolute path of
60
+ your corporate root CA certificate file.
61
+ - Example: `export NODE_EXTRA_CA_CERTS=/path/to/your/corporate-ca.crt`
62
+
63
+ ## Common error messages and solutions
64
+
65
+ - **Error: `EADDRINUSE` (Address already in use) when starting an MCP server.**
66
+ - **Cause:** Another process is already using the port that the MCP server is
67
+ trying to bind to.
68
+ - **Solution:** Either stop the other process that is using the port or
69
+ configure the MCP server to use a different port.
70
+
71
+ - **Error: Command not found (when attempting to run Gemini CLI with
72
+ `gemini`).**
73
+ - **Cause:** Gemini CLI is not correctly installed or it is not in your
74
+ system's `PATH`.
75
+ - **Solution:** The update depends on how you installed Gemini CLI:
76
+ - If you installed `gemini` globally, check that your `npm` global binary
77
+ directory is in your `PATH`. You can update Gemini CLI using the command
78
+ `npm install -g @google/gemini-cli@latest`.
79
+ - If you are running `gemini` from source, ensure you are using the correct
80
+ command to invoke it (e.g., `node packages/cli/dist/index.js ...`). To
81
+ update Gemini CLI, pull the latest changes from the repository, and then
82
+ rebuild using the command `npm run build`.
83
+
84
+ - **Error: `MODULE_NOT_FOUND` or import errors.**
85
+ - **Cause:** Dependencies are not installed correctly, or the project hasn't
86
+ been built.
87
+ - **Solution:**
88
+ 1. Run `npm install` to ensure all dependencies are present.
89
+ 2. Run `npm run build` to compile the project.
90
+ 3. Verify that the build completed successfully with `npm run start`.
91
+
92
+ - **Error: "Operation not permitted", "Permission denied", or similar.**
93
+ - **Cause:** When sandboxing is enabled, Gemini CLI may attempt operations
94
+ that are restricted by your sandbox configuration, such as writing outside
95
+ the project directory or system temp directory.
96
+ - **Solution:** Refer to the [Configuration: Sandboxing](./cli/sandbox.md)
97
+ documentation for more information, including how to customize your sandbox
98
+ configuration.
99
+
100
+ - **Gemini CLI is not running in interactive mode in "CI" environments**
101
+ - **Issue:** The Gemini CLI does not enter interactive mode (no prompt
102
+ appears) if an environment variable starting with `CI_` (e.g., `CI_TOKEN`)
103
+ is set. This is because the `is-in-ci` package, used by the underlying UI
104
+ framework, detects these variables and assumes a non-interactive CI
105
+ environment.
106
+ - **Cause:** The `is-in-ci` package checks for the presence of `CI`,
107
+ `CONTINUOUS_INTEGRATION`, or any environment variable with a `CI_` prefix.
108
+ When any of these are found, it signals that the environment is
109
+ non-interactive, which prevents the Gemini CLI from starting in its
110
+ interactive mode.
111
+ - **Solution:** If the `CI_` prefixed variable is not needed for the CLI to
112
+ function, you can temporarily unset it for the command. e.g.,
113
+ `env -u CI_TOKEN gemini`
114
+
115
+ - **DEBUG mode not working from project .env file**
116
+ - **Issue:** Setting `DEBUG=true` in a project's `.env` file doesn't enable
117
+ debug mode for gemini-cli.
118
+ - **Cause:** The `DEBUG` and `DEBUG_MODE` variables are automatically excluded
119
+ from project `.env` files to prevent interference with gemini-cli behavior.
120
+ - **Solution:** Use a `.gemini/.env` file instead, or configure the
121
+ `advanced.excludedEnvVars` setting in your `settings.json` to exclude fewer
122
+ variables.
123
+
124
+ ## Exit codes
125
+
126
+ The Gemini CLI uses specific exit codes to indicate the reason for termination.
127
+ This is especially useful for scripting and automation.
128
+
129
+ | Exit Code | Error Type | Description |
130
+ | --------- | -------------------------- | --------------------------------------------------------------------------------------------------- |
131
+ | 41 | `FatalAuthenticationError` | An error occurred during the authentication process. |
132
+ | 42 | `FatalInputError` | Invalid or missing input was provided to the CLI. (non-interactive mode only) |
133
+ | 44 | `FatalSandboxError` | An error occurred with the sandboxing environment (e.g., Docker, Podman, or Seatbelt). |
134
+ | 52 | `FatalConfigError` | A configuration file (`settings.json`) is invalid or contains errors. |
135
+ | 53 | `FatalTurnLimitedError` | The maximum number of conversational turns for the session was reached. (non-interactive mode only) |
136
+
137
+ ## Debugging tips
138
+
139
+ - **CLI debugging:**
140
+ - Use the `--debug` flag for more detailed output. In interactive mode, press
141
+ F12 to view the debug console.
142
+ - Check the CLI logs, often found in a user-specific configuration or cache
143
+ directory.
144
+
145
+ - **Core debugging:**
146
+ - Check the server console output for error messages or stack traces.
147
+ - Increase log verbosity if configurable. For example, set the `DEBUG_MODE`
148
+ environment variable to `true` or `1`.
149
+ - Use Node.js debugging tools (e.g., `node --inspect`) if you need to step
150
+ through server-side code.
151
+
152
+ - **Tool issues:**
153
+ - If a specific tool is failing, try to isolate the issue by running the
154
+ simplest possible version of the command or operation the tool performs.
155
+ - For `run_shell_command`, check that the command works directly in your shell
156
+ first.
157
+ - For _file system tools_, verify that paths are correct and check the
158
+ permissions.
159
+
160
+ - **Pre-flight checks:**
161
+ - Always run `npm run preflight` before committing code. This can catch many
162
+ common issues related to formatting, linting, and type errors.
163
+
164
+ ## Existing GitHub issues similar to yours or creating new issues
165
+
166
+ If you encounter an issue that was not covered here in this _Troubleshooting
167
+ guide_, consider searching the Gemini CLI
168
+ [Issue tracker on GitHub](https://github.com/google-gemini/gemini-cli/issues).
169
+ If you can't find an issue similar to yours, consider creating a new GitHub
170
+ Issue with a detailed description. Pull requests are also welcome!
171
+
172
+ > **Note:** Issues tagged as "🔒Maintainers only" are reserved for project
173
+ > maintainers. We will not accept pull requests related to these issues.