root

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package root implements the ctx load command.

It outputs assembled context Markdown from .context/ files in the recommended read order within a configurable token budget.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cmd

func Cmd() *cobra.Command

Cmd returns the "ctx load" command for outputting assembled context.

The command loads context files from .context/ and outputs them in the recommended read order, suitable for providing to an AI assistant.

Flags:

  • --budget: Token budget for assembly (default 8000)
  • --raw: Output raw file contents without headers or assembly

Returns:

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

func Run

func Run(cmd *cobra.Command, budget int, raw bool) error

Run executes the load command logic.

Loads context from .context/ and outputs it in either raw or assembled format based on the flags.

Parameters:

  • cmd: Cobra command for output stream
  • budget: Token budget for assembled output
  • raw: If true, output raw file contents without assembly

Returns:

  • error: Non-nil if context loading fails or .context/ is not found

Types

This section is empty.

Jump to

Keyboard shortcuts

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