Documentation
¶
Index ¶
- func EnsureEnabled(name string, enabled *bool) error
- func Run(root string) ([]warnings.Warning, error)
- func RunWithProject(sys System, root string, project *config.ProjectConfig) ([]warnings.Warning, error)
- func RunWithSystemFS(sys System, fsys fs.FS, root string) ([]warnings.Warning, error)
- func WriteAntigravitySkills(sys System, root string, commands []config.SlashCommand) error
- func WriteClaudeSettings(sys System, root string, project *config.ProjectConfig) error
- func WriteCodexConfig(sys System, root string, project *config.ProjectConfig) error
- func WriteCodexInstructions(sys System, root string, instructions []config.InstructionFile) error
- func WriteCodexRules(sys System, root string, project *config.ProjectConfig) error
- func WriteCodexSkills(sys System, root string, commands []config.SlashCommand) error
- func WriteGeminiSettings(sys System, root string, project *config.ProjectConfig) error
- func WriteInstructionShims(sys System, root string, instructions []config.InstructionFile) error
- func WriteMCPConfig(sys System, root string, project *config.ProjectConfig) error
- func WriteVSCodeLaunchers(sys System, root string) error
- func WriteVSCodeMCPConfig(sys System, root string, project *config.ProjectConfig) error
- func WriteVSCodePrompts(sys System, root string, commands []config.SlashCommand) error
- func WriteVSCodeSettings(sys System, root string, project *config.ProjectConfig) error
- type OrderedMap
- type RealSystem
- func (RealSystem) LookPath(file string) (string, error)
- func (RealSystem) MarshalIndent(v any, prefix, indent string) ([]byte, error)
- func (RealSystem) MkdirAll(path string, perm os.FileMode) error
- func (RealSystem) ReadFile(name string) ([]byte, error)
- func (RealSystem) Stat(name string) (os.FileInfo, error)
- func (RealSystem) WriteFileAtomic(filename string, data []byte, perm os.FileMode) error
- type System
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnsureEnabled ¶
EnsureEnabled is a helper for command handlers.
func Run ¶
Run regenerates all configured outputs for the repo. Returns any sync-time warnings and an error if sync failed.
func RunWithProject ¶
func RunWithProject(sys System, root string, project *config.ProjectConfig) ([]warnings.Warning, error)
RunWithProject regenerates outputs using an already loaded project config. Returns any sync-time warnings and an error if sync failed.
func RunWithSystemFS ¶ added in v0.5.7
RunWithSystemFS loads project config from fsys and runs sync with the provided System. sys provides OS operations for sync writers; fsys must be rooted at repo root.
func WriteAntigravitySkills ¶
func WriteAntigravitySkills(sys System, root string, commands []config.SlashCommand) error
WriteAntigravitySkills generates Antigravity skill files for slash commands.
func WriteClaudeSettings ¶
func WriteClaudeSettings(sys System, root string, project *config.ProjectConfig) error
WriteClaudeSettings generates .claude/settings.json.
func WriteCodexConfig ¶
func WriteCodexConfig(sys System, root string, project *config.ProjectConfig) error
WriteCodexConfig generates .codex/config.toml.
func WriteCodexInstructions ¶
func WriteCodexInstructions(sys System, root string, instructions []config.InstructionFile) error
WriteCodexInstructions generates the Codex-specific instruction shim.
func WriteCodexRules ¶
func WriteCodexRules(sys System, root string, project *config.ProjectConfig) error
WriteCodexRules generates .codex/rules/default.rules.
func WriteCodexSkills ¶
func WriteCodexSkills(sys System, root string, commands []config.SlashCommand) error
WriteCodexSkills generates Codex skill files for slash commands.
func WriteGeminiSettings ¶
func WriteGeminiSettings(sys System, root string, project *config.ProjectConfig) error
WriteGeminiSettings generates .gemini/settings.json.
func WriteInstructionShims ¶
func WriteInstructionShims(sys System, root string, instructions []config.InstructionFile) error
WriteInstructionShims generates instruction shims for supported clients.
func WriteMCPConfig ¶
func WriteMCPConfig(sys System, root string, project *config.ProjectConfig) error
WriteMCPConfig generates .mcp.json for Claude Code.
func WriteVSCodeLaunchers ¶
WriteVSCodeLaunchers generates VS Code launchers for macOS, Windows, and Linux: - .agent-layer/open-vscode.command (macOS Terminal script) - .agent-layer/open-vscode.app (macOS app bundle - no Terminal window) - .agent-layer/open-vscode.bat (Windows batch file) - .agent-layer/open-vscode.desktop (Linux desktop entry)
func WriteVSCodeMCPConfig ¶
func WriteVSCodeMCPConfig(sys System, root string, project *config.ProjectConfig) error
WriteVSCodeMCPConfig generates .vscode/mcp.json.
func WriteVSCodePrompts ¶
func WriteVSCodePrompts(sys System, root string, commands []config.SlashCommand) error
WriteVSCodePrompts generates VS Code prompt files for slash commands.
func WriteVSCodeSettings ¶
func WriteVSCodeSettings(sys System, root string, project *config.ProjectConfig) error
WriteVSCodeSettings generates .vscode/settings.json.
Types ¶
type OrderedMap ¶
OrderedMap marshals map keys in a stable order.
func (OrderedMap[T]) MarshalJSON ¶
func (m OrderedMap[T]) MarshalJSON() ([]byte, error)
MarshalJSON encodes a map with sorted keys for deterministic output.
type RealSystem ¶ added in v0.5.4
type RealSystem struct{}
RealSystem implements System using actual system calls.
func (RealSystem) LookPath ¶ added in v0.5.4
func (RealSystem) LookPath(file string) (string, error)
LookPath searches for an executable named file in the directories named by the PATH environment variable.
func (RealSystem) MarshalIndent ¶ added in v0.5.4
func (RealSystem) MarshalIndent(v any, prefix, indent string) ([]byte, error)
MarshalIndent returns the JSON encoding of v with indentation.
func (RealSystem) MkdirAll ¶ added in v0.5.4
func (RealSystem) MkdirAll(path string, perm os.FileMode) error
MkdirAll creates a directory named path, along with any necessary parents.
func (RealSystem) ReadFile ¶ added in v0.5.4
func (RealSystem) ReadFile(name string) ([]byte, error)
ReadFile reads the named file and returns the contents.
func (RealSystem) Stat ¶ added in v0.5.4
func (RealSystem) Stat(name string) (os.FileInfo, error)
Stat returns a FileInfo describing the named file.
func (RealSystem) WriteFileAtomic ¶ added in v0.5.4
WriteFileAtomic writes data to a file atomically by writing to a temp file and renaming.
type System ¶ added in v0.5.4
type System interface {
LookPath(file string) (string, error)
Stat(name string) (os.FileInfo, error)
MkdirAll(path string, perm os.FileMode) error
WriteFileAtomic(filename string, data []byte, perm os.FileMode) error
MarshalIndent(v any, prefix, indent string) ([]byte, error)
ReadFile(name string) ([]byte, error)
}
System abstracts system-level operations to enable dependency injection in sync logic.