Skip to content

file:write

← Back to CLI Commands

Write file with audit trail

pnpm file:write

Options:

FlagDescriptionRequired
--path <path>Path to file (alternative to positional)No
--content <content>Content to write (required)No
--encoding <enc>File encoding (default: utf-8)No
--no-create-dirsDon’t create parent directoriesNo
--workspace-root <dir>Contain writes to this directory (default: derived from git top-level / workspace root).No
--worktree-root <dir>Reject writes outside this directory. Pass the output of git rev-parse —show-toplevel from inside your declared worktree to defend against parallel-agent cwd-inheritance leaks.No
--allow-outside-workspaceEscape workspace containment. Its use is recorded in the audit trail.No

← Back to CLI Commands