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 ¶
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. |
Click to show internal directories.
Click to hide internal directories.