Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRootCmd ¶
NewRootCmd creates the root cobra command with all subcommands attached. @intent 공통 초기화와 서브커맨드 구성을 한곳에 모아 ccg CLI 진입점을 만든다. @sideEffect 환경 변수와 설정 파일을 읽고 InitFunc가 있으면 DB 초기화를 트리거한다. @mutates deps.Logger, 전역 slog 기본 로거
Types ¶
type Deps ¶
type Deps struct {
Logger *slog.Logger
DB *gorm.DB
Store store.GraphStore
SearchBackend search.Backend
Walkers map[string]*treesitter.Walker
Syncer *incremental.Syncer
ServeFunc func(cfg ServeConfig) error
InitFunc func(dbDriver, dsn string) error
MigrateFunc func(cfg MigrateConfig) error
CleanupFunc func()
Version VersionInfo
}
Deps holds shared dependencies injected into all subcommands. @intent 중앙 CLI 초기화 단계에서 만든 런타임 의존성을 하위 명령에 전달한다.
type MigrateConfig ¶
MigrateConfig contains the database and external migration source settings. @intent carry the driver, DSN, and migration source needed for one explicit schema migration run.
type ServeConfig ¶
type ServeConfig struct {
CacheTTL time.Duration
NoCache bool
Transport string // deprecated compatibility flag; only "stdio" is accepted by ccg
OTELEndpoint string
NamespaceRoot string
MaxFileBytes int64
MaxTotalParsedBytes int64
}
ServeConfig holds parsed flags for the local stdio MCP serve subcommand. @intent keep the ccg binary focused on local stdio MCP use while ccg-server owns HTTP/webhook hosting.
type VersionInfo ¶
VersionInfo holds build-time version metadata injected via ldflags. @intent 빌드 시 주입된 버전 정보를 구조체로 묶어 CLI 출력에 활용한다.