extension

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 8, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package extension provides extension loading for gmn. Extensions are discovered from ~/.gemini/extensions/ directory, matching the Gemini CLI extension system. Copyright 2025 Tomohiro Owada SPDX-License-Identifier: Apache-2.0

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Extension

type Extension struct {
	Name         string
	Version      string
	Path         string // absolute path to extension directory
	MCPServers   map[string]config.MCPServerConfig
	ContextFiles []string // absolute paths to existing context files
}

Extension holds a parsed, variable-hydrated extension ready for use.

func LoadAll

func LoadAll(currentPath string) ([]Extension, error)

LoadAll discovers and loads all enabled extensions from ~/.gemini/extensions/. currentPath is the current working directory, used for enablement matching.

type Manifest

type Manifest struct {
	Name            string                            `json:"name"`
	Version         string                            `json:"version"`
	ContextFileName interface{}                       `json:"contextFileName"` // string or []string
	MCPServers      map[string]config.MCPServerConfig `json:"mcpServers"`
}

Manifest represents a gemini-extension.json file.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL