assistantkit

package module
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2026 License: MIT Imports: 0 Imported by: 0

README

AssistantKit

Build Status Lint Status Go Report Card Docs License

AssistantKit is a Go library for managing configuration files across multiple AI coding assistants. It provides a unified interface for reading, writing, and converting between different tool-specific formats.

Supported Tools

Tool MCP Hooks Context Plugins Commands Skills Agents
Claude Code / Claude Desktop
Cursor IDE
Windsurf (Codeium)
VS Code / GitHub Copilot
OpenAI Codex CLI
Cline
Roo Code
AWS Kiro CLI
Google Gemini CLI

Configuration Types

Type Description Status
MCP MCP server configurations ✅ Available
Hooks Automation/lifecycle callbacks ✅ Available
Context Project context (CONTEXT.json → CLAUDE.md) ✅ Available
Plugins Plugin/extension configurations ✅ Available
Commands Slash command definitions ✅ Available
Skills Reusable skill definitions ✅ Available
Agents AI assistant agent definitions ✅ Available
Teams Multi-agent team orchestration ✅ Available
Validation Configuration validators ✅ Available
Settings Permissions, sandbox, general settings 🔜 Coming soon
Rules Team rules, coding guidelines 🔜 Coming soon
Memory CLAUDE.md, .cursorrules, etc. 🔜 Coming soon

Installation

go get github.com/agentplexus/assistantkit

MCP Configuration

The mcp subpackage provides adapters for MCP server configurations.

Reading and Writing Configs
package main

import (
    "log"

    "github.com/agentplexus/assistantkit/mcp/claude"
    "github.com/agentplexus/assistantkit/mcp/vscode"
)

func main() {
    // Read Claude config
    cfg, err := claude.ReadProjectConfig()
    if err != nil {
        log.Fatal(err)
    }

    // Write to VS Code format
    if err := vscode.WriteWorkspaceConfig(cfg); err != nil {
        log.Fatal(err)
    }
}
Creating a New Config
package main

import (
    "github.com/agentplexus/assistantkit/mcp"
    "github.com/agentplexus/assistantkit/mcp/claude"
    "github.com/agentplexus/assistantkit/mcp/core"
)

func main() {
    cfg := mcp.NewConfig()

    // Add a stdio server
    cfg.AddServer("github", core.Server{
        Transport: core.TransportStdio,
        Command:   "npx",
        Args:      []string{"-y", "@modelcontextprotocol/server-github"},
        Env: map[string]string{
            "GITHUB_PERSONAL_ACCESS_TOKEN": "${GITHUB_TOKEN}",
        },
    })

    // Add an HTTP server
    cfg.AddServer("sentry", core.Server{
        Transport: core.TransportHTTP,
        URL:       "https://mcp.sentry.dev/mcp",
        Headers: map[string]string{
            "Authorization": "Bearer ${SENTRY_API_KEY}",
        },
    })

    // Write to Claude format
    claude.WriteProjectConfig(cfg)
}
Converting Between Formats
package main

import (
    "log"
    "os"

    "github.com/agentplexus/assistantkit/mcp"
)

func main() {
    // Read Claude JSON
    data, _ := os.ReadFile(".mcp.json")

    // Convert to VS Code format
    vscodeData, err := mcp.Convert(data, "claude", "vscode")
    if err != nil {
        log.Fatal(err)
    }

    os.WriteFile(".vscode/mcp.json", vscodeData, 0644)
}
Using Adapters Dynamically
package main

import (
    "log"

    "github.com/agentplexus/assistantkit/mcp"
)

func main() {
    // Get adapter by name
    adapter, ok := mcp.GetAdapter("claude")
    if !ok {
        log.Fatal("adapter not found")
    }

    // Read config
    cfg, err := adapter.ReadFile(".mcp.json")
    if err != nil {
        log.Fatal(err)
    }

    // Convert to another format
    codexAdapter, _ := mcp.GetAdapter("codex")
    codexAdapter.WriteFile(cfg, "~/.codex/config.toml")
}

MCP Format Differences

Claude (Reference Format)

Most tools follow Claude's format with mcpServers as the root key:

{
  "mcpServers": {
    "server-name": {
      "command": "npx",
      "args": ["-y", "@example/mcp-server"],
      "env": {"API_KEY": "..."}
    }
  }
}
VS Code

VS Code uses servers (not mcpServers) and supports inputs for secrets:

{
  "inputs": [
    {"type": "promptString", "id": "api-key", "description": "API Key", "password": true}
  ],
  "servers": {
    "server-name": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@example/mcp-server"],
      "env": {"API_KEY": "${input:api-key}"}
    }
  }
}
Windsurf

Windsurf uses serverUrl instead of url for HTTP servers:

{
  "mcpServers": {
    "remote-server": {
      "serverUrl": "https://example.com/mcp"
    }
  }
}
Codex (TOML)

Codex uses TOML format with additional timeout and tool control options:

[mcp_servers.github]
command = "npx"
args = ["-y", "@modelcontextprotocol/server-github"]
enabled_tools = ["list_repos", "create_issue"]
startup_timeout_sec = 30
tool_timeout_sec = 120
AWS Kiro CLI

Kiro uses a format similar to Claude with support for both local and remote MCP servers. Environment variable substitution uses ${ENV_VAR} syntax:

{
  "mcpServers": {
    "github": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-github"],
      "env": {
        "GITHUB_TOKEN": "${GITHUB_TOKEN}"
      }
    },
    "remote-api": {
      "url": "https://api.example.com/mcp",
      "headers": {
        "Authorization": "Bearer ${API_TOKEN}"
      }
    },
    "disabled-server": {
      "command": "test",
      "disabled": true
    }
  }
}

File locations:

  • Workspace: .kiro/settings/mcp.json
  • User: ~/.kiro/settings/mcp.json

Hooks Configuration

The hooks subpackage provides adapters for automation/lifecycle hooks that execute at defined stages of the agent loop.

Creating Hooks
package main

import (
    "github.com/agentplexus/assistantkit/hooks"
    "github.com/agentplexus/assistantkit/hooks/claude"
)

func main() {
    cfg := hooks.NewConfig()

    // Add a command hook that runs before shell commands
    cfg.AddHookWithMatcher(hooks.BeforeCommand, "Bash",
        hooks.NewCommandHook("echo 'Running command...'"))

    // Add a hook for file writes
    cfg.AddHook(hooks.BeforeFileWrite,
        hooks.NewCommandHook("./scripts/validate-write.sh"))

    // Write to Claude format
    claude.WriteProjectConfig(cfg)
}
Converting Between Formats
package main

import (
    "log"
    "os"

    "github.com/agentplexus/assistantkit/hooks"
)

func main() {
    // Read Claude hooks JSON
    data, _ := os.ReadFile(".claude/settings.json")

    // Convert to Cursor format
    cursorData, err := hooks.Convert(data, "claude", "cursor")
    if err != nil {
        log.Fatal(err)
    }

    os.WriteFile(".cursor/hooks.json", cursorData, 0644)
}
Supported Events
Event Claude Cursor Windsurf Description
before_file_read Before reading a file
after_file_read After reading a file
before_file_write Before writing a file
after_file_write After writing a file
before_command Before shell command execution
after_command After shell command execution
before_mcp Before MCP tool call
after_mcp After MCP tool call
before_prompt Before user prompt processing
on_stop When agent stops
on_session_start When session starts
on_session_end When session ends
after_response After AI response (Cursor-only)
after_thought After AI thought (Cursor-only)
on_permission Permission request (Claude-only)
Hook Types
  • Command hooks: Execute shell commands
  • Prompt hooks: Run AI prompts (Claude-only)

Project Structure

aiassistkit/
├── aiassistkit.go          # Umbrella package
├── agents/                 # Agent definitions
│   ├── agentkit/           # AWS AgentKit adapter
│   ├── awsagentcore/       # AWS CDK TypeScript generator
│   ├── claude/             # Claude Code adapter
│   ├── codex/              # Codex adapter
│   ├── core/               # Canonical types
│   ├── gemini/             # Gemini adapter
│   └── kiro/               # AWS Kiro CLI adapter
├── cmd/
│   └── genagents/          # Multi-platform agent generator CLI
├── commands/               # Slash command definitions
│   ├── claude/             # Claude adapter
│   ├── codex/              # Codex adapter
│   ├── core/               # Canonical types
│   └── gemini/             # Gemini adapter
├── context/                # Project context (CONTEXT.json → CLAUDE.md)
│   ├── claude/             # CLAUDE.md converter
│   └── core/               # Canonical types
├── hooks/                  # Lifecycle hooks
│   ├── claude/             # Claude adapter
│   ├── core/               # Canonical types
│   ├── cursor/             # Cursor adapter
│   └── windsurf/           # Windsurf adapter
├── mcp/                    # MCP server configurations
│   ├── claude/             # Claude adapter
│   ├── cline/              # Cline adapter
│   ├── codex/              # Codex adapter (TOML)
│   ├── core/               # Canonical types
│   ├── cursor/             # Cursor adapter
│   ├── kiro/               # AWS Kiro CLI adapter
│   ├── roo/                # Roo Code adapter
│   ├── vscode/             # VS Code adapter
│   └── windsurf/           # Windsurf adapter
├── plugins/                # Plugin/extension configurations
│   ├── claude/             # Claude adapter
│   ├── core/               # Canonical types
│   └── gemini/             # Gemini adapter
├── publish/                # Marketplace publishing
│   ├── claude/             # Claude marketplace adapter
│   ├── core/               # Publishing interfaces
│   └── github/             # GitHub API client
├── skills/                 # Reusable skill definitions
│   ├── claude/             # Claude adapter
│   ├── codex/              # Codex adapter
│   └── core/               # Canonical types
├── teams/                  # Multi-agent orchestration
│   └── core/               # Team types and workflows
└── validation/             # Configuration validators
    ├── claude/             # Claude validator
    ├── codex/              # Codex validator
    ├── core/               # Validation interfaces
    └── gemini/             # Gemini validator

AssistantKit is part of the AgentPlexus family of Go modules for building AI agents:

  • AssistantKit - AI coding assistant configuration management
  • OmniVault - Unified secrets management
  • OmniLLM - Multi-provider LLM abstraction
  • OmniSerp - Search engine abstraction
  • OmniObserve - LLM observability abstraction

License

MIT License - see LICENSE for details.

Documentation

Overview

Package assistantkit provides a unified interface for managing configuration files across multiple AI coding assistants including Claude Code, Cursor, Windsurf, VS Code, OpenAI Codex CLI, Cline, and Roo Code.

Assistant Kit supports multiple configuration types:

  • MCP (Model Context Protocol) server configurations
  • Hooks (automation/lifecycle callbacks)
  • Settings (permissions, sandbox, general settings) - coming soon
  • Rules (team rules, coding guidelines) - coming soon
  • Memory (CLAUDE.md, .cursorrules, etc.) - coming soon

MCP Configuration

The mcp subpackage provides adapters for reading, writing, and converting MCP server configurations between different AI assistant formats.

Example usage:

import (
    "github.com/agentplexus/assistantkit/mcp"
    "github.com/agentplexus/assistantkit/mcp/claude"
    "github.com/agentplexus/assistantkit/mcp/vscode"
)

// Read Claude config and write to VS Code format
cfg, _ := claude.ReadProjectConfig()
vscode.WriteWorkspaceConfig(cfg)

// Or use dynamic conversion
data, _ := mcp.Convert(jsonData, "claude", "vscode")

Hooks Configuration

The hooks subpackage provides adapters for automation/lifecycle callbacks that execute at defined stages of the agent loop.

Example usage:

import (
    "github.com/agentplexus/assistantkit/hooks"
    "github.com/agentplexus/assistantkit/hooks/claude"
)

// Create hooks configuration
cfg := hooks.NewConfig()
cfg.AddHook(hooks.BeforeCommand, hooks.NewCommandHook("echo 'before'"))

// Write to Claude format
claude.WriteProjectConfig(cfg)

// Or convert between formats
data, _ := hooks.Convert(jsonData, "claude", "cursor")

Assistant Kit is part of the AgentPlexus family of Go modules:

  • Assistant Kit - AI coding assistant configuration management
  • OmniVault - Unified secrets management
  • OmniLLM - Multi-provider LLM abstraction
  • OmniSerp - Search engine abstraction
  • OmniObserve - LLM observability abstraction

Index

Constants

View Source
const Version = "0.5.0"

Version is the current version of Assistant Kit.

Variables

This section is empty.

Functions

func SupportedTools

func SupportedTools() []string

SupportedTools returns a list of AI coding tools that Assistant Kit supports.

Types

type ConfigType

type ConfigType string

ConfigType represents the type of configuration.

const (
	// ConfigTypeMCP represents MCP server configuration.
	ConfigTypeMCP ConfigType = "mcp"

	// ConfigTypeHooks represents hooks/automation configuration.
	ConfigTypeHooks ConfigType = "hooks"

	// ConfigTypeSettings represents general settings configuration.
	ConfigTypeSettings ConfigType = "settings"

	// ConfigTypeRules represents team rules configuration.
	ConfigTypeRules ConfigType = "rules"

	// ConfigTypeMemory represents memory/context configuration.
	ConfigTypeMemory ConfigType = "memory"
)

func SupportedConfigTypes

func SupportedConfigTypes() []ConfigType

SupportedConfigTypes returns a list of configuration types that Assistant Kit supports.

Directories

Path Synopsis
Package agents provides adapters for AI assistant agent definitions.
Package agents provides adapters for AI assistant agent definitions.
agentkit
Package agentkit provides an adapter for generating agentkit local server configurations.
Package agentkit provides an adapter for generating agentkit local server configurations.
awsagentcore
Package awsagentcore provides an adapter for generating AWS Bedrock AgentCore CDK deployments.
Package awsagentcore provides an adapter for generating AWS Bedrock AgentCore CDK deployments.
claude
Package claude provides the Claude Code agent adapter.
Package claude provides the Claude Code agent adapter.
codex
Package codex provides the OpenAI Codex CLI agent adapter.
Package codex provides the OpenAI Codex CLI agent adapter.
core
Package core provides the canonical agent definition types.
Package core provides the canonical agent definition types.
gemini
Package gemini provides the Gemini CLI agent adapter.
Package gemini provides the Gemini CLI agent adapter.
kiro
Package kiro provides the AWS Kiro CLI agent adapter.
Package kiro provides the AWS Kiro CLI agent adapter.
cmd
genagents command
Command genagents generates platform-specific agent files from canonical specs.
Command genagents generates platform-specific agent files from canonical specs.
generate command
Command generate converts CONTEXT.json to tool-specific formats.
Command generate converts CONTEXT.json to tool-specific formats.
Package commands provides adapters for AI assistant command/prompt definitions.
Package commands provides adapters for AI assistant command/prompt definitions.
claude
Package claude provides the Claude Code command adapter.
Package claude provides the Claude Code command adapter.
codex
Package codex provides the OpenAI Codex CLI prompt adapter.
Package codex provides the OpenAI Codex CLI prompt adapter.
core
Package core provides canonical types for AI assistant command/prompt definitions.
Package core provides canonical types for AI assistant command/prompt definitions.
gemini
Package gemini provides the Gemini CLI command adapter.
Package gemini provides the Gemini CLI command adapter.
Package context provides a tool-agnostic system for managing project context that can be converted to various AI assistant formats (CLAUDE.md, .cursorrules, etc.).
Package context provides a tool-agnostic system for managing project context that can be converted to various AI assistant formats (CLAUDE.md, .cursorrules, etc.).
claude
Package claude provides a converter for generating CLAUDE.md files from the canonical project context format.
Package claude provides a converter for generating CLAUDE.md files from the canonical project context format.
core
Package core provides the canonical types for project context that can be converted to various AI assistant formats (CLAUDE.md, .cursorrules, etc.).
Package core provides the canonical types for project context that can be converted to various AI assistant formats (CLAUDE.md, .cursorrules, etc.).
Package hooks provides a unified interface for managing hook configurations across multiple AI coding assistants.
Package hooks provides a unified interface for managing hook configurations across multiple AI coding assistants.
claude
Package claude provides an adapter for Claude Code hooks configuration.
Package claude provides an adapter for Claude Code hooks configuration.
core
Package core provides the canonical types for hook configuration that can be converted to/from various AI assistant formats.
Package core provides the canonical types for hook configuration that can be converted to/from various AI assistant formats.
cursor
Package cursor provides an adapter for Cursor IDE hooks configuration.
Package cursor provides an adapter for Cursor IDE hooks configuration.
windsurf
Package windsurf provides an adapter for Windsurf (Codeium) hooks configuration.
Package windsurf provides an adapter for Windsurf (Codeium) hooks configuration.
mcp
Package mcp provides a unified interface for managing MCP (Model Context Protocol) server configurations across multiple AI coding assistants.
Package mcp provides a unified interface for managing MCP (Model Context Protocol) server configurations across multiple AI coding assistants.
claude
Package claude provides an adapter for Claude Code / Claude Desktop MCP configuration files (.mcp.json).
Package claude provides an adapter for Claude Code / Claude Desktop MCP configuration files (.mcp.json).
cline
Package cline provides an adapter for Cline VS Code extension MCP configuration.
Package cline provides an adapter for Cline VS Code extension MCP configuration.
codex
Package codex provides an adapter for OpenAI Codex CLI MCP configuration.
Package codex provides an adapter for OpenAI Codex CLI MCP configuration.
core
Package core provides the canonical types for MCP server configuration that can be converted to/from various AI assistant formats.
Package core provides the canonical types for MCP server configuration that can be converted to/from various AI assistant formats.
cursor
Package cursor provides an adapter for Cursor IDE MCP configuration.
Package cursor provides an adapter for Cursor IDE MCP configuration.
kiro
Package kiro provides an adapter for AWS Kiro CLI MCP configuration.
Package kiro provides an adapter for AWS Kiro CLI MCP configuration.
roo
Package roo provides an adapter for Roo Code VS Code extension MCP configuration.
Package roo provides an adapter for Roo Code VS Code extension MCP configuration.
vscode
Package vscode provides an adapter for VS Code / GitHub Copilot MCP configuration.
Package vscode provides an adapter for VS Code / GitHub Copilot MCP configuration.
windsurf
Package windsurf provides an adapter for Windsurf (Codeium) MCP configuration.
Package windsurf provides an adapter for Windsurf (Codeium) MCP configuration.
Package plugins provides adapters for AI assistant plugin/extension manifests.
Package plugins provides adapters for AI assistant plugin/extension manifests.
claude
Package claude provides the Claude Code plugin adapter.
Package claude provides the Claude Code plugin adapter.
core
Package core provides canonical types for AI assistant plugin/extension definitions.
Package core provides canonical types for AI assistant plugin/extension definitions.
gemini
Package gemini provides the Gemini CLI extension adapter.
Package gemini provides the Gemini CLI extension adapter.
Package publish provides publishers for submitting plugins to AI assistant marketplaces.
Package publish provides publishers for submitting plugins to AI assistant marketplaces.
claude
Package claude provides a publisher for the Claude Code official marketplace.
Package claude provides a publisher for the Claude Code official marketplace.
core
Package core provides the Publisher interface for marketplace submissions.
Package core provides the Publisher interface for marketplace submissions.
github
Package github provides GitHub API utilities for marketplace submissions.
Package github provides GitHub API utilities for marketplace submissions.
Package skills provides adapters for AI assistant skill definitions.
Package skills provides adapters for AI assistant skill definitions.
claude
Package claude provides the Claude Code skill adapter.
Package claude provides the Claude Code skill adapter.
codex
Package codex provides the OpenAI Codex skill adapter.
Package codex provides the OpenAI Codex skill adapter.
core
Package core provides canonical types for AI assistant skill definitions.
Package core provides canonical types for AI assistant skill definitions.
Package teams provides multi-agent team orchestration definitions.
Package teams provides multi-agent team orchestration definitions.
core
Package core provides canonical types for multi-agent team orchestration.
Package core provides canonical types for multi-agent team orchestration.
Package validation provides configuration types for release validation areas.
Package validation provides configuration types for release validation areas.
claude
Package claude provides the Claude Code validation area adapter.
Package claude provides the Claude Code validation area adapter.
cmd/generate command
Command generate creates validation area files from canonical specs.
Command generate creates validation area files from canonical specs.
codex
Package codex provides the OpenAI Codex validation area adapter.
Package codex provides the OpenAI Codex validation area adapter.
core
Package core provides canonical types for validation area definitions.
Package core provides canonical types for validation area definitions.
gemini
Package gemini provides the Gemini CLI validation area adapter.
Package gemini provides the Gemini CLI validation area adapter.

Jump to

Keyboard shortcuts

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