platform

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package platform provides installers for integrating graphize with AI coding platforms.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Install

func Install(name string, opts InstallOptions) error

Install runs the installer for a platform.

func List

func List() []string

List returns all registered installer names.

func Register

func Register(installer Installer)

Register adds an installer to the registry.

func Uninstall

func Uninstall(name string, opts InstallOptions) error

Uninstall removes the integration for a platform.

Types

type AiderInstaller

type AiderInstaller struct{}

AiderInstaller integrates graphize with Aider.

func (*AiderInstaller) Description

func (a *AiderInstaller) Description() string

Description returns the platform description.

func (*AiderInstaller) Install

func (a *AiderInstaller) Install(opts InstallOptions) error

Install adds graphize section to AGENTS.md.

func (*AiderInstaller) Name

func (a *AiderInstaller) Name() string

Name returns "aider".

func (*AiderInstaller) Status

func (a *AiderInstaller) Status(opts InstallOptions) (*Status, error)

Status checks if graphize section exists in AGENTS.md.

func (*AiderInstaller) Uninstall

func (a *AiderInstaller) Uninstall(opts InstallOptions) error

Uninstall removes graphize section from AGENTS.md.

type ClaudeInstaller

type ClaudeInstaller struct{}

ClaudeInstaller integrates graphize with Claude Desktop.

func (*ClaudeInstaller) Description

func (c *ClaudeInstaller) Description() string

Description returns the platform description.

func (*ClaudeInstaller) Install

func (c *ClaudeInstaller) Install(opts InstallOptions) error

Install adds graphize MCP server to Claude Desktop configuration.

func (*ClaudeInstaller) Name

func (c *ClaudeInstaller) Name() string

Name returns "claude".

func (*ClaudeInstaller) Status

func (c *ClaudeInstaller) Status(opts InstallOptions) (*Status, error)

Status checks if graphize is configured in Claude Desktop.

func (*ClaudeInstaller) Uninstall

func (c *ClaudeInstaller) Uninstall(opts InstallOptions) error

Uninstall removes graphize from Claude Desktop configuration.

type CodexInstaller

type CodexInstaller struct{}

CodexInstaller integrates graphize with OpenAI Codex CLI.

func (*CodexInstaller) Description

func (c *CodexInstaller) Description() string

Description returns the platform description.

func (*CodexInstaller) Install

func (c *CodexInstaller) Install(opts InstallOptions) error

Install adds graphize hooks to Codex configuration.

func (*CodexInstaller) Name

func (c *CodexInstaller) Name() string

Name returns "codex".

func (*CodexInstaller) Status

func (c *CodexInstaller) Status(opts InstallOptions) (*Status, error)

Status checks if graphize is configured for Codex.

func (*CodexInstaller) Uninstall

func (c *CodexInstaller) Uninstall(opts InstallOptions) error

Uninstall removes graphize from Codex configuration.

type CopilotInstaller

type CopilotInstaller struct{}

CopilotInstaller integrates graphize with GitHub Copilot.

func (*CopilotInstaller) Description

func (c *CopilotInstaller) Description() string

Description returns the platform description.

func (*CopilotInstaller) Install

func (c *CopilotInstaller) Install(opts InstallOptions) error

Install adds graphize skill to GitHub Copilot configuration.

func (*CopilotInstaller) Name

func (c *CopilotInstaller) Name() string

Name returns "copilot".

func (*CopilotInstaller) Status

func (c *CopilotInstaller) Status(opts InstallOptions) (*Status, error)

Status checks if graphize skill is configured for GitHub Copilot.

func (*CopilotInstaller) Uninstall

func (c *CopilotInstaller) Uninstall(opts InstallOptions) error

Uninstall removes graphize skill from GitHub Copilot configuration.

type CursorInstaller

type CursorInstaller struct{}

CursorInstaller integrates graphize with Cursor IDE.

func (*CursorInstaller) Description

func (c *CursorInstaller) Description() string

Description returns the platform description.

func (*CursorInstaller) Install

func (c *CursorInstaller) Install(opts InstallOptions) error

Install adds graphize rules to Cursor configuration.

func (*CursorInstaller) Name

func (c *CursorInstaller) Name() string

Name returns "cursor".

func (*CursorInstaller) Status

func (c *CursorInstaller) Status(opts InstallOptions) (*Status, error)

Status checks if graphize rules are configured for Cursor.

func (*CursorInstaller) Uninstall

func (c *CursorInstaller) Uninstall(opts InstallOptions) error

Uninstall removes graphize rules from Cursor configuration.

type GeminiInstaller

type GeminiInstaller struct{}

GeminiInstaller integrates graphize with Gemini CLI.

func (*GeminiInstaller) Description

func (g *GeminiInstaller) Description() string

Description returns the platform description.

func (*GeminiInstaller) Install

func (g *GeminiInstaller) Install(opts InstallOptions) error

Install adds graphize context to Gemini configuration.

func (*GeminiInstaller) Name

func (g *GeminiInstaller) Name() string

Name returns "gemini".

func (*GeminiInstaller) Status

func (g *GeminiInstaller) Status(opts InstallOptions) (*Status, error)

Status checks if graphize is configured for Gemini.

func (*GeminiInstaller) Uninstall

func (g *GeminiInstaller) Uninstall(opts InstallOptions) error

Uninstall removes graphize from Gemini configuration.

type InstallOptions

type InstallOptions struct {
	// GraphPath is the path to the .graphize directory.
	GraphPath string

	// ProjectPath is the path to the project root.
	ProjectPath string

	// Force overwrites existing configurations.
	Force bool

	// DryRun shows what would be done without making changes.
	DryRun bool
}

InstallOptions configures the installation process.

type Installer

type Installer interface {
	// Name returns the platform name (e.g., "claude", "cursor").
	Name() string

	// Description returns a brief description of the platform.
	Description() string

	// Install integrates graphize with the platform.
	Install(opts InstallOptions) error

	// Uninstall removes graphize integration from the platform.
	Uninstall(opts InstallOptions) error

	// Status checks the current installation status.
	Status(opts InstallOptions) (*Status, error)
}

Installer defines the interface for platform integration installers.

func Get

func Get(name string) Installer

Get returns an installer by name. Returns nil if the installer is not registered.

type InstallerInfo

type InstallerInfo struct {
	Name        string `json:"name"`
	Description string `json:"description"`
}

InstallerInfo contains basic installer information.

func ListWithDescriptions

func ListWithDescriptions() []InstallerInfo

ListWithDescriptions returns all installers with their descriptions.

type Status

type Status struct {
	// Installed indicates if the integration is currently installed.
	Installed bool `json:"installed"`

	// ConfigPath is the path to the configuration file.
	ConfigPath string `json:"config_path,omitempty"`

	// Version is the graphize version in the configuration.
	Version string `json:"version,omitempty"`

	// Message provides additional status information.
	Message string `json:"message,omitempty"`

	// Details contains platform-specific status information.
	Details map[string]string `json:"details,omitempty"`
}

Status represents the installation status for a platform.

func CheckStatus

func CheckStatus(name string, opts InstallOptions) (*Status, error)

CheckStatus checks the installation status for a platform.

Jump to

Keyboard shortcuts

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