@mmmbuto/gemini-cli-termux 0.42.0-termux → 0.46.0-termux
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.
- package/README.md +22 -2
- package/bundle/builtin/antigravity-support/SKILL.md +58 -0
- package/bundle/{chunk-BF6DCDLJ.js → chunk-4TSWR3AN.js} +145 -55
- package/bundle/{chunk-PL5MCDGY.js → chunk-6HI7VNOG.js} +55 -70
- package/bundle/{chunk-6PXDEURC.js → chunk-7QZTHDKK.js} +2 -4
- package/bundle/{chunk-ORXUJRZC.js → chunk-B7I47N5E.js} +3 -3
- package/bundle/{chunk-EHTAR2YP.js → chunk-G2G6HEZZ.js} +1 -1
- package/bundle/{chunk-LX6GOGBA.js → chunk-IB4Q6NBY.js} +123186 -73766
- package/bundle/{chunk-MP2YMAMR.js → chunk-IT3YFQ3I.js} +1 -1
- package/bundle/{chunk-RJTRUG2J.js → chunk-TUDYL3X4.js} +29 -5
- package/bundle/{chunk-A6KCGXPK.js → chunk-WUVOS6TV.js} +13 -6
- package/bundle/{chunk-SLMD2AMF.js → chunk-YGU42N5I.js} +847 -655
- package/bundle/{cleanup-RTDYF5DD.js → cleanup-GEP2OOHM.js} +4 -5
- package/bundle/{devtools-ZLHMA45S.js → devtools-V7NE4CQA.js} +1 -1
- package/bundle/{devtoolsService-SKRXJOXW.js → devtoolsService-EVM2JJLB.js} +5 -6
- package/bundle/{dist-B3HBIK36.js → dist-R3LOFA4X.js} +331 -285
- package/bundle/docs/changelogs/index.md +59 -0
- package/bundle/docs/changelogs/latest.md +201 -167
- package/bundle/docs/changelogs/preview.md +45 -102
- package/bundle/docs/cli/auto-memory.md +61 -40
- package/bundle/docs/cli/gemini-md.md +0 -2
- package/bundle/docs/cli/plan-mode.md +0 -1
- package/bundle/docs/cli/settings.md +19 -19
- package/bundle/docs/cli/tutorials/memory-management.md +3 -3
- package/bundle/docs/extensions/reference.md +16 -0
- package/bundle/docs/extensions/releasing.md +58 -24
- package/bundle/docs/extensions/writing-extensions.md +7 -0
- package/bundle/docs/get-started/installation.mdx +2 -2
- package/bundle/docs/issue-and-pr-automation.md +29 -1
- package/bundle/docs/reference/commands.md +0 -3
- package/bundle/docs/reference/configuration.md +173 -78
- package/bundle/docs/reference/keyboard-shortcuts.md +23 -0
- package/bundle/docs/reference/tools.md +0 -2
- package/bundle/docs/tools/mcp-server.md +24 -3
- package/bundle/docs/tools/memory.md +10 -13
- package/bundle/examples/custom-commands/commands/fs/grep-code.toml +6 -0
- package/bundle/examples/custom-commands/gemini-extension.json +4 -0
- package/bundle/examples/exclude-tools/gemini-extension.json +5 -0
- package/bundle/examples/hooks/gemini-extension.json +4 -0
- package/bundle/examples/hooks/hooks/hooks.json +14 -0
- package/bundle/examples/hooks/scripts/on-start.js +8 -0
- package/bundle/examples/mcp-server/README.md +35 -0
- package/bundle/examples/mcp-server/example.js +60 -0
- package/bundle/examples/mcp-server/gemini-extension.json +11 -0
- package/bundle/examples/mcp-server/package.json +11 -0
- package/bundle/examples/policies/README.md +41 -0
- package/bundle/examples/policies/gemini-extension.json +5 -0
- package/bundle/examples/policies/policies/policies.toml +28 -0
- package/bundle/examples/skills/gemini-extension.json +4 -0
- package/bundle/examples/skills/skills/greeter/SKILL.md +7 -0
- package/bundle/examples/themes-example/README.md +31 -0
- package/bundle/examples/themes-example/gemini-extension.json +29 -0
- package/bundle/{gemini-NJWIVDFH.js → gemini-SGAFQX2R.js} +450 -297
- package/bundle/gemini.js +18 -13
- package/bundle/{dist-T73EYRDX.js → https-proxy-agent-AVGR4LHR.js} +8 -3
- package/bundle/{interactiveCli-QHKQZZJU.js → interactiveCli-MEEXSI2X.js} +1922 -1675
- package/bundle/{liteRtServerManager-USDJEPCM.js → liteRtServerManager-3EZO3JZ5.js} +6 -7
- package/bundle/{oauth2-provider-ARATJNEE.js → oauth2-provider-AJMTKEL6.js} +8 -10
- package/bundle/package.json +1 -1
- package/bundle/policies/plan.toml +1 -1
- package/bundle/policies/write.toml +0 -7
- package/bundle/src-LG4OHBW7.js +343 -0
- package/bundle/{start-IWR7MCIR.js → start-YW7YIVR7.js} +8 -9
- package/bundle/worker/worker-entry.js +7863 -0
- package/package.json +3 -3
- package/bundle/chunk-2X6HJV2G.js +0 -52710
- package/bundle/memoryDiscovery-EEGUKQ5C.js +0 -29
- package/bundle/node_modules/@google/gemini-cli-devtools/dist/client/main.js +0 -96
- package/bundle/node_modules/@google/gemini-cli-devtools/dist/src/_client-assets.d.ts +0 -7
- package/bundle/node_modules/@google/gemini-cli-devtools/dist/src/_client-assets.js +0 -9
- package/bundle/node_modules/@google/gemini-cli-devtools/dist/src/_client-assets.js.map +0 -1
- package/bundle/node_modules/@google/gemini-cli-devtools/dist/src/index.d.ts +0 -48
- package/bundle/node_modules/@google/gemini-cli-devtools/dist/src/index.js +0 -333
- package/bundle/node_modules/@google/gemini-cli-devtools/dist/src/index.js.map +0 -1
- package/bundle/node_modules/@google/gemini-cli-devtools/dist/src/types.d.ts +0 -36
- package/bundle/node_modules/@google/gemini-cli-devtools/dist/src/types.js +0 -7
- package/bundle/node_modules/@google/gemini-cli-devtools/dist/src/types.js.map +0 -1
- package/bundle/node_modules/@google/gemini-cli-devtools/package.json +0 -33
- package/bundle/policies/memory-manager.toml +0 -20
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# MCP Server Example
|
|
2
|
+
|
|
3
|
+
This is a basic example of an MCP (Model Context Protocol) server used as a
|
|
4
|
+
Gemini CLI extension. It demonstrates how to expose tools and prompts to the
|
|
5
|
+
Gemini CLI.
|
|
6
|
+
|
|
7
|
+
## Description
|
|
8
|
+
|
|
9
|
+
The contents of this directory are a valid MCP server implementation using the
|
|
10
|
+
`@modelcontextprotocol/sdk`. It exposes:
|
|
11
|
+
|
|
12
|
+
- A tool `fetch_posts` that mock-fetches posts.
|
|
13
|
+
- A prompt `poem-writer`.
|
|
14
|
+
|
|
15
|
+
## Structure
|
|
16
|
+
|
|
17
|
+
- `example.js`: The main server entry point.
|
|
18
|
+
- `gemini-extension.json`: The configuration file that tells Gemini CLI how to
|
|
19
|
+
use this extension.
|
|
20
|
+
- `package.json`: Helper for dependencies.
|
|
21
|
+
|
|
22
|
+
## How to Use
|
|
23
|
+
|
|
24
|
+
1. Navigate to this directory:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
cd packages/cli/src/commands/extensions/examples/mcp-server
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
2. Install dependencies:
|
|
31
|
+
```bash
|
|
32
|
+
npm install
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
This example is typically used by `gemini extensions new`.
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
8
|
+
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
9
|
+
import { z } from 'zod';
|
|
10
|
+
|
|
11
|
+
const server = new McpServer({
|
|
12
|
+
name: 'prompt-server',
|
|
13
|
+
version: '1.0.0',
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
server.registerTool(
|
|
17
|
+
'fetch_posts',
|
|
18
|
+
{
|
|
19
|
+
description: 'Fetches a list of posts from a public API.',
|
|
20
|
+
inputSchema: z.object({}).shape,
|
|
21
|
+
},
|
|
22
|
+
async () => {
|
|
23
|
+
const apiResponse = await fetch(
|
|
24
|
+
'https://jsonplaceholder.typicode.com/posts',
|
|
25
|
+
);
|
|
26
|
+
const posts = await apiResponse.json();
|
|
27
|
+
const response = { posts: posts.slice(0, 5) };
|
|
28
|
+
return {
|
|
29
|
+
content: [
|
|
30
|
+
{
|
|
31
|
+
type: 'text',
|
|
32
|
+
text: JSON.stringify(response),
|
|
33
|
+
},
|
|
34
|
+
],
|
|
35
|
+
};
|
|
36
|
+
},
|
|
37
|
+
);
|
|
38
|
+
|
|
39
|
+
server.registerPrompt(
|
|
40
|
+
'poem-writer',
|
|
41
|
+
{
|
|
42
|
+
title: 'Poem Writer',
|
|
43
|
+
description: 'Write a nice haiku',
|
|
44
|
+
argsSchema: { title: z.string(), mood: z.string().optional() },
|
|
45
|
+
},
|
|
46
|
+
({ title, mood }) => ({
|
|
47
|
+
messages: [
|
|
48
|
+
{
|
|
49
|
+
role: 'user',
|
|
50
|
+
content: {
|
|
51
|
+
type: 'text',
|
|
52
|
+
text: `Write a haiku${mood ? ` with the mood ${mood}` : ''} called ${title}. Note that a haiku is 5 syllables followed by 7 syllables followed by 5 syllables `,
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
],
|
|
56
|
+
}),
|
|
57
|
+
);
|
|
58
|
+
|
|
59
|
+
const transport = new StdioServerTransport();
|
|
60
|
+
await server.connect(transport);
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Policy engine example extension
|
|
2
|
+
|
|
3
|
+
This extension demonstrates how to contribute security rules and safety checkers
|
|
4
|
+
to the Gemini CLI Policy Engine.
|
|
5
|
+
|
|
6
|
+
## Description
|
|
7
|
+
|
|
8
|
+
The extension uses a `policies/` directory containing `.toml` files to define:
|
|
9
|
+
|
|
10
|
+
- A rule that requires user confirmation for `rm -rf` commands.
|
|
11
|
+
- A rule that denies searching for sensitive files (like `.env`) using `grep`.
|
|
12
|
+
- A safety checker that validates file paths for all write operations.
|
|
13
|
+
|
|
14
|
+
## Structure
|
|
15
|
+
|
|
16
|
+
- `gemini-extension.json`: The manifest file.
|
|
17
|
+
- `policies/`: Contains the `.toml` policy files.
|
|
18
|
+
|
|
19
|
+
## How to use
|
|
20
|
+
|
|
21
|
+
1. Link this extension to your local Gemini CLI installation:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
gemini extensions link packages/cli/src/commands/extensions/examples/policies
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
2. Restart your Gemini CLI session.
|
|
28
|
+
|
|
29
|
+
3. **Observe the policies:**
|
|
30
|
+
- Try asking the model to delete a directory: The policy engine will prompt
|
|
31
|
+
you for confirmation due to the `rm -rf` rule.
|
|
32
|
+
- Try asking the model to search for secrets: The `grep` rule will deny the
|
|
33
|
+
request and display the custom deny message.
|
|
34
|
+
- Any file write operation will now be processed through the `allowed-path`
|
|
35
|
+
safety checker.
|
|
36
|
+
|
|
37
|
+
## Security note
|
|
38
|
+
|
|
39
|
+
For security, Gemini CLI ignores any `allow` decisions or `yolo` mode
|
|
40
|
+
configurations contributed by extensions. This ensures that extensions can
|
|
41
|
+
strengthen security but cannot bypass user confirmation.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Example Policy Rules for Gemini CLI Extension
|
|
2
|
+
#
|
|
3
|
+
# Extensions run in Tier 2 (Extension Tier).
|
|
4
|
+
# Security Note: 'allow' decisions and 'yolo' mode configurations are ignored.
|
|
5
|
+
|
|
6
|
+
# Rule: Always ask the user before running a specific dangerous shell command.
|
|
7
|
+
[[rule]]
|
|
8
|
+
toolName = "run_shell_command"
|
|
9
|
+
commandPrefix = "rm -rf"
|
|
10
|
+
decision = "ask_user"
|
|
11
|
+
priority = 100
|
|
12
|
+
|
|
13
|
+
# Rule: Deny access to sensitive files using the grep tool.
|
|
14
|
+
[[rule]]
|
|
15
|
+
toolName = "grep_search"
|
|
16
|
+
argsPattern = "(\.env|id_rsa|passwd)"
|
|
17
|
+
decision = "deny"
|
|
18
|
+
priority = 200
|
|
19
|
+
denyMessage = "Access to sensitive credentials or system files is restricted by the policy-example extension."
|
|
20
|
+
|
|
21
|
+
# Safety Checker: Apply path validation to all write operations.
|
|
22
|
+
[[safety_checker]]
|
|
23
|
+
toolName = ["write_file", "replace"]
|
|
24
|
+
priority = 300
|
|
25
|
+
[safety_checker.checker]
|
|
26
|
+
type = "in-process"
|
|
27
|
+
name = "allowed-path"
|
|
28
|
+
required_context = ["environment"]
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Themes Example
|
|
2
|
+
|
|
3
|
+
This is an example of a Gemini CLI extension that adds a custom theme.
|
|
4
|
+
|
|
5
|
+
## How to use
|
|
6
|
+
|
|
7
|
+
1. Link this extension:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
gemini extensions link packages/cli/src/commands/extensions/examples/themes-example
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
2. Set the theme in your settings file (`~/.gemini/settings.json`):
|
|
14
|
+
|
|
15
|
+
```json
|
|
16
|
+
{
|
|
17
|
+
"ui": {
|
|
18
|
+
"theme": "shades-of-green (themes-example)"
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Alternatively, you can set it through the UI by running `gemini` and then
|
|
24
|
+
typing `/theme` and pressing Enter.
|
|
25
|
+
|
|
26
|
+
3. **Observe the Changes:**
|
|
27
|
+
|
|
28
|
+
After setting the theme, you should see the changes reflected in the Gemini
|
|
29
|
+
CLI's UI. The background will be a dark green, the primary text a lighter
|
|
30
|
+
green, and various other UI elements will display different shades of green,
|
|
31
|
+
as defined in this extension's `gemini-extension.json` file.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "themes-example",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"themes": [
|
|
5
|
+
{
|
|
6
|
+
"name": "shades-of-green",
|
|
7
|
+
"type": "custom",
|
|
8
|
+
"background": {
|
|
9
|
+
"primary": "#1a362a"
|
|
10
|
+
},
|
|
11
|
+
"text": {
|
|
12
|
+
"primary": "#a6e3a1",
|
|
13
|
+
"secondary": "#6e8e7a",
|
|
14
|
+
"link": "#89e689"
|
|
15
|
+
},
|
|
16
|
+
"status": {
|
|
17
|
+
"success": "#76c076",
|
|
18
|
+
"warning": "#d9e689",
|
|
19
|
+
"error": "#b34e4e"
|
|
20
|
+
},
|
|
21
|
+
"border": {
|
|
22
|
+
"default": "#4a6c5a"
|
|
23
|
+
},
|
|
24
|
+
"ui": {
|
|
25
|
+
"comment": "#6e8e7a"
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
]
|
|
29
|
+
}
|