Skip to main content

File System Access

PastePrompt needs local filesystem access to scan, preview, count, and package repository files. The selected repository root is the main boundary for those operations.

Repository root boundary

When you select a repository, PastePrompt should treat that folder as the workspace root. File reads, previews, token counting, context generation, editor-open actions, and exports should be validated against that root unless you intentionally choose another path.

This boundary helps prevent accidental inclusion of unrelated files such as:

  • Personal files outside the repository.
  • Neighboring client repositories.
  • Global shell configuration.
  • Local credential stores.
  • Build artifacts from another project.

Path validation

Paths should be canonicalized and validated before use. Canonicalization resolves path forms such as .., symlinks, duplicate separators, and equivalent local path spellings.

Path validation should answer a simple question before a file is read: is this file inside the selected workspace or explicitly allowed by the user?

This matters for repository scanning, preview, export paths, editor handoff, and any command that touches local files.

Symlinks can point outside the selected repository. PastePrompt should treat them as explicit edge cases, not ordinary files to follow silently.

Practical guidance:

  1. Review symlink warnings before selecting files.
  2. Avoid including symlinked directories unless you know where they point.
  3. Be careful with dependency folders that are symlinked into a monorepo.
  4. If a symlink target is outside the workspace, include it only through an intentional user action or supported override.

Ignored files

PastePrompt should respect .gitignore and .pastepromptignore by default.

  • .gitignore mirrors project-level ignore behavior.
  • .pastepromptignore is for context-specific exclusions, such as local config, generated output, large fixtures, or files that should not be copied into LLM workflows.

Ignored files should not be read by default. If you override ignore behavior, review the resulting selection and run the secret scanner carefully.

PastePrompt supports workspace-level include ignored paths for narrow exceptions. Treat these patterns as an explicit opt-in to read files that ignore rules would otherwise hide. Prefer scoped patterns such as vendor/package/src/** over broad patterns such as vendor/**.

Binary and large files

Binary files are usually not useful in text-based LLM context bundles. PastePrompt should detect or warn about binary files instead of trying to paste unreadable bytes into XML-like or Markdown output.

Very large files can slow preview, token estimation, syntax highlighting, and bundle generation. PastePrompt should surface large-file states clearly so you can decide whether to include, exclude, or inspect the file externally.

macOS permissions

macOS may require permission before an app can read folders such as:

  • Documents.
  • Desktop.
  • Downloads.
  • iCloud Drive or other synced folders.
  • External drives.
  • Network-mounted folders.

If a scan fails or files appear missing:

  1. Re-select the repository through the PastePrompt file picker.
  2. Confirm the repository is still present at the selected path.
  3. Check macOS privacy and security settings for file access.
  4. Avoid moving the repository while PastePrompt is scanning it.
  5. Review any permission warnings in the app.

Example safe workflow

  1. Select the repository root through the macOS picker.
  2. Confirm the displayed path is the intended project.
  3. Let PastePrompt apply .gitignore and .pastepromptignore.
  4. Review warnings for symlinks, binary files, unreadable files, and large files.
  5. Select only the files needed for the review.
  6. Enable and run the secret scanner before copy or export when handling sensitive repositories.