cli

package
v2.5.1 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2026 License: AGPL-3.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AtomicWrite

func AtomicWrite(path string, content []byte) error

AtomicWrite writes content to a file atomically using temp file + fsync + rename This ensures the file is never in a partially-written state

func BuildDaemonCommand

func BuildDaemonCommand() *cli3.Command

BuildDaemonCommand builds the daemon command

func BuildDiagnosticsCommand

func BuildDiagnosticsCommand() *cli3.Command

BuildDiagnosticsCommand builds the diagnostics command

func BuildEditCommand added in v2.4.0

func BuildEditCommand() *cli3.Command

BuildEditCommand builds the edit command

func BuildGraphCommand

func BuildGraphCommand() *cli3.Command

BuildGraphCommand builds the graph command

func BuildIndexCommand

func BuildIndexCommand() *cli3.Command

BuildIndexCommand builds the index command

func BuildInitCommand

func BuildInitCommand() *cli3.Command

BuildInitCommand builds the init command

func BuildNewCommand

func BuildNewCommand() *cli3.Command

BuildNewCommand builds the new command

func BuildQueryCommand

func BuildQueryCommand() *cli3.Command

BuildQueryCommand builds the query command

func BuildRootCommand

func BuildRootCommand() *cli3.Command

BuildRootCommand builds the root CLI command

func BuildViewCommand added in v2.5.0

func BuildViewCommand() *cli3.Command

BuildViewCommand builds the view command

func GetVaultFromContext

func GetVaultFromContext(ctx context.Context, cmd *cli3.Command) (string, error)

GetVaultFromContext extracts the vault path from the CLI context The vault flag is on the root command, so we need to check the root

func ResolveVault

func ResolveVault(vaultFlag string) (string, error)

ResolveVault resolves the vault root directory It walks upward from the current working directory until it finds a .touchlog/ directory If --vault flag is provided, it uses that instead

func ValidateVault

func ValidateVault(vaultRoot string) error

ValidateVault validates that a vault has the required structure For Phase 0, we only check that .touchlog/config.yaml exists (except for init command)

Types

type DiagnosticResult

type DiagnosticResult struct {
	NodeID    string     `json:"node_id"`
	NodeType  string     `json:"node_type,omitempty"`
	NodeKey   string     `json:"node_key,omitempty"`
	Level     string     `json:"level"`
	Code      string     `json:"code"`
	Message   string     `json:"message"`
	Span      model.Span `json:"span"`
	CreatedAt string     `json:"created_at,omitempty"`
}

DiagnosticResult represents a diagnostic with node information

type TypeBundle

type TypeBundle struct {
	Name        string
	Description string
	Types       map[string]TypeDef
}

TypeBundle represents a predefined set of note types

type TypeDef

type TypeDef struct {
	Description  string
	DefaultState string
}

TypeDef represents a type definition for the config

Jump to

Keyboard shortcuts

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