initialize

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package initialize implements the "ctx init" command for initializing a .context/ directory with template files.

The init command creates the foundation for persistent AI context by generating template files for constitution rules, tasks, decisions, learnings, conventions, and architecture documentation. It also sets up Claude Code integration with hooks and slash commands.

File Organization

  • init.go: Command definition and flag registration
  • run.go: Main execution logic and orchestration
  • validate.go: PATH validation for ctx executable
  • fs.go: File system operations and marker handling
  • claude.go: CLAUDE.md creation and merge logic
  • tpl.go: Entry template creation
  • cmd.go: Claude Code slash command creation
  • hook.go: Claude Code hook and settings creation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cmd

func Cmd() *cobra.Command

Cmd returns the "ctx init" command for initializing a .context/ directory.

The command creates template files for maintaining persistent context for AI coding assistants. Files include constitution rules, tasks, decisions, learnings, conventions, and architecture documentation.

Flags:

  • --force, -f: Overwrite existing context files without prompting
  • --minimal, -m: Only create essential files (TASKS, DECISIONS, CONSTITUTION)
  • --merge: Auto-merge ctx content into existing CLAUDE.md

Returns:

  • *cobra.Command: Configured init command with flags registered

Types

This section is empty.

Jump to

Keyboard shortcuts

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