file

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: 2 Imported by: 0

Documentation

Overview

Package file defines file extension, filename, and profile constants used across ctx.

Index

Constants

View Source
const (
	// ExtMarkdown is the Markdown file extension.
	ExtMarkdown = ".md"
	// ExtTxt is the plain text file extension.
	ExtTxt = ".txt"
	// ExtJSONL is the JSON Lines file extension.
	ExtJSONL = ".jsonl"
	// ExtExample is the suffix for example/template files that are safe
	// to have in the working directory (e.g., .env.example).
	ExtExample = ".example"
	// ExtSample is the suffix for sample files that are safe to have
	// in the working directory (e.g., config.sample).
	ExtSample = ".sample"
)

File extension constants.

View Source
const (
	// Readme is the standard README filename.
	Readme = "README.md"
	// Index is the standard index filename for generated sites.
	Index = "index.md"
)

Common filenames.

View Source
const (
	// CtxRC is the optional runtime configuration file.
	CtxRC       = ".ctxrc"
	CtxRCBase   = ".ctxrc.base"
	CtxRCDev    = ".ctxrc.dev"
	ProfileDev  = "dev"
	ProfileBase = "base"
	ProfileProd = "prod" // Alias for ProfileBase
)

Profile file names and identifiers for .ctxrc management.

View Source
const BackupFormat = "%s.%d.bak"

BackupFormat is the format string for timestamped backup file names. Args: original filename, Unix timestamp.

View Source
const FileGitignore = ".gitignore"

FileGitignore is the .gitignore filename.

View Source
const GitignoreHeader = "# ctx managed entries"

GitignoreHeader is the section comment prepended to ctx-managed entries.

View Source
const (
	// MaxNameLen is the maximum character length for sanitized filename components.
	MaxNameLen = 50
)

Session defaults.

Variables

View Source
var Gitignore = []string{
	path.Join(dir.Context, dir.Journal, "/"),
	path.Join(dir.Context, dir.JournalSite, "/"),
	path.Join(dir.Context, dir.JournalObsidian, "/"),
	path.Join(dir.Context, dir.Logs, "/"),
	".context/.ctx.key",
	".context/state/",
	".claude/settings.local.json",
}

Gitignore lists the recommended .gitignore entries added by ctx init.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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