containerfs

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package containerfs prepares host Claude Code configuration for container injection.

This is a leaf package: it imports internal/keyring, internal/logger, and stdlib only. No docker imports allowed.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrepareClaudeConfig

func PrepareClaudeConfig(hostConfigDir, containerHomeDir, containerWorkDir string) (stagingDir string, cleanup func(), err error)

PrepareClaudeConfig creates a staging directory with host claude config prepared for container injection. Caller must call cleanup() when done.

Handles: settings.json enabledPlugins merge, agents/, skills/, commands/, plugins/ (excluding install-counts-cache.json), known_marketplaces.json path fixup, symlink resolution.

func PrepareCredentials

func PrepareCredentials(hostConfigDir string) (stagingDir string, cleanup func(), err error)

PrepareCredentials creates a staging directory with credentials.json. Sources: keyring first, then fallback to $CLAUDE_CONFIG_DIR/.credentials.json.

func PreparePostInitTar

func PreparePostInitTar(cfg config.Config, script string) (io.Reader, error)

PreparePostInitTar creates a tar archive containing a post-init script at .clawker/post-init.sh. The script is prefixed with a bash shebang and set -e, then the user's commands verbatim. The tar is designed for extraction at /home/claude, producing /home/claude/.clawker/post-init.sh. Returns an error if the script is empty or whitespace-only.

func ResolveHostConfigDir

func ResolveHostConfigDir() (string, error)

ResolveHostConfigDir returns the claude config dir ($CLAUDE_CONFIG_DIR or ~/.claude/). Returns error if the directory doesn't exist.

Types

This section is empty.

Jump to

Keyboard shortcuts

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