Skip to main content

Repository Selection

Repository selection defines the workspace PastePrompt is allowed to inspect. Every file tree, search result, token count, preview, Git detail, and generated context bundle starts from the local folder you choose.

What it does

PastePrompt lets you choose a repository folder from the macOS file picker. After selection, the app scans that local folder, builds a file tree, applies ignore rules, reads Git metadata when available, and prepares the repository for context-building workflows.

The selected repository becomes the workspace root. PastePrompt should treat that root as a safety boundary for filesystem reads, editor-open actions, exports, and saved workspace references.

Why it matters

Security reviews and audit workflows depend on clear scope. If the tool reads too broadly, you risk including unrelated source code or sensitive files. If it reads too narrowly, the LLM bundle may miss important dependencies, tests, or configuration.

Repository selection also supports reproducibility. A saved workspace can refer back to the same canonical project path, selected files, prompt instructions, ignore settings, and Git state.

How to use it

  1. Open PastePrompt.
  2. Select Open Repository or Select Repository.
  3. Choose the local project folder from the macOS file dialog.
  4. Prefer the real repository root, usually the folder containing .git, package.json, Cargo.toml, pyproject.toml, or another project manifest.
  5. Review the displayed path before continuing.
  6. Grant macOS folder permission if prompted.
  7. Wait for the file tree and repository metadata to load.
  8. Review any warnings about unreadable files, ignored files, nested repositories, symlinks, or missing Git metadata.

Permissions

macOS may require explicit permission before a desktop app can read folders under locations such as Documents, Desktop, Downloads, external drives, network drives, or synced folders. If PastePrompt cannot scan a repository, first confirm the app has access to the selected folder in macOS settings.

For more detail, see File system access and macOS install troubleshooting.

Canonical path safety

PastePrompt should canonicalize selected paths before reading files. In practice, that means resolving .. segments, symlinks, and equivalent path spellings so the app can verify whether a file is inside the selected workspace.

This matters for:

  • Preventing accidental reads outside the selected repository.
  • Handling symlinks intentionally.
  • Avoiding duplicate entries for the same file under different path spellings.
  • Making saved workspace references more stable.

If a symlink points outside the selected repository, PastePrompt should treat that as an explicit edge case instead of silently following it.

Example workflow

  1. Select /Users/alex/reviews/client-app.
  2. Confirm the repository root contains the expected source folders, tests, project manifest, and .git.
  3. Let PastePrompt scan the tree.
  4. Check that .gitignore and .pastepromptignore exclusions are applied.
  5. Save the repository as a workspace named Client App Review - May.
  6. Use the workspace to build repeatable audit bundles during the review.

Limitations

  • PastePrompt can only read files macOS allows it to access.
  • Ignored files are not read by default.
  • Binary files, very large files, invalid UTF-8, and unreadable files may be skipped or shown with warnings.
  • Symlinks and nested repositories can create ambiguous scope and should be reviewed carefully.
  • A moved or deleted repository path can break a saved workspace until you select the repository again.
  • Repository selection does not upload the repository or make any security claim about the code.