commands

package
v0.8.0 Latest Latest
Warning

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

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

Documentation

Overview

Package commands provides adapters for AI assistant command/prompt definitions.

Supported tools:

  • Claude Code: commands/*.md (Markdown with YAML frontmatter)
  • Gemini CLI: commands/*.toml (TOML format)
  • OpenAI Codex: prompts/*.md (Markdown with YAML frontmatter)

Example usage:

package main

import (
    "github.com/agentplexus/assistantkit/commands"
)

func main() {
    // Create a new command
    cmd := commands.NewCommand("release", "Execute full release workflow")
    cmd.AddRequiredArgument("version", "Semantic version", "v1.2.3")
    cmd.AddProcessStep("Run validation checks")
    cmd.AddProcessStep("Generate changelog")
    cmd.AddProcessStep("Create and push git tag")
    cmd.Instructions = "Execute a full release workflow..."

    // Write to Claude format
    claudeAdapter, _ := commands.GetAdapter("claude")
    claudeAdapter.WriteFile(cmd, "./commands/release.md")

    // Write to Gemini format
    geminiAdapter, _ := commands.GetAdapter("gemini")
    geminiAdapter.WriteFile(cmd, "./commands/release.toml")

    // Write to Codex format
    codexAdapter, _ := commands.GetAdapter("codex")
    codexAdapter.WriteFile(cmd, "./prompts/release.md")
}

Index

Constants

This section is empty.

Variables

View Source
var (
	NewCommand         = core.NewCommand
	GetAdapter         = core.GetAdapter
	AdapterNames       = core.AdapterNames
	Convert            = core.Convert
	ReadCanonicalFile  = core.ReadCanonicalFile
	WriteCanonicalFile = core.WriteCanonicalFile
	ReadCanonicalDir   = core.ReadCanonicalDir
	WriteCommandsToDir = core.WriteCommandsToDir
)

Re-export core functions

Functions

This section is empty.

Types

type Adapter

type Adapter = core.Adapter

Re-export core types for convenience

type Argument

type Argument = core.Argument

Re-export core types for convenience

type Command

type Command = core.Command

Re-export core types for convenience

type Example

type Example = core.Example

Re-export core types for convenience

type MarshalError

type MarshalError = core.MarshalError

Re-export error types

type ParseError

type ParseError = core.ParseError

Re-export error types

type ReadError

type ReadError = core.ReadError

Re-export error types

type WriteError

type WriteError = core.WriteError

Re-export error types

Directories

Path Synopsis
Package claude provides the Claude Code command adapter.
Package claude provides the Claude Code command adapter.
Package codex provides the OpenAI Codex CLI prompt adapter.
Package codex provides the OpenAI Codex CLI prompt adapter.
Package core provides canonical types for AI assistant command/prompt definitions.
Package core provides canonical types for AI assistant command/prompt definitions.
Package gemini provides the Gemini CLI command adapter.
Package gemini provides the Gemini CLI command adapter.

Jump to

Keyboard shortcuts

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