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 ¶
- func PrepareClaudeConfig(log *logger.Logger, hostConfigDir, containerHomeDir, containerWorkDir string) (stagingDir string, cleanup func(), err error)
- func PrepareCredentials(log *logger.Logger, hostConfigDir string) (stagingDir string, cleanup func(), err error)
- func PreparePostInitTar(cfg config.Config, script string) (io.Reader, error)
- func ResolveHostConfigDir() (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PrepareClaudeConfig ¶
func PrepareClaudeConfig(log *logger.Logger, 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(log *logger.Logger, 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 ¶
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 ¶
ResolveHostConfigDir returns the claude config dir ($CLAUDE_CONFIG_DIR or ~/.claude/). Returns error if the directory doesn't exist.
Types ¶
This section is empty.