Skip to content

Repository files navigation

Note: This app only copies context. To read diffs from your clipboard and apply them with a single click, try ReptClip for VS Code:

PipxClip - Fast Context for Your ChatBot

A fast, cross-platform CLI that turns a project directory into clean Markdown context for an LLM chat (no .gitignoreed files), and copies it straight to your clipboard.

Preview

Install

Windows

After installing Python, run:

pip install pipxclip

Ubuntu

sudo apt update && sudo apt install pipx
pipx install pipxclip
pipx ensurepath

Basic Usage

Run the pipxclip command from the root of your project:

pipxclip

This copies a Markdown snapshot of your project structure (every non-ignored file) to the clipboard, ready to paste into an LLM chat.

Example output:

# Project structure

```
.gitignore
README.md
docs/README.md
src/functions.py
src/main.py
```

# Prompt

<- Cursor stays here, you can quickly start typing

Natural CLI Syntax

PipxClip supports simple, readable English commands.

Including & Excluding Files

Glob patterns are used to specify which files to include in the context. For example:

pipxclip "AGENTS.md"

Example output for this command:

# Project structure

```
.gitignore
README.md
docs/README.md
src/functions.py
src/main.py
```

# AGENTS.md

```
Contents of AGENTS.md.
```

# Prompt

To specify files to exclude, use e or exclude. Here is an example:

pipxclip "**/*.py" "AGENTS.md" e "src/secret.py"

This includes all .py files and AGENTS.md, while excluding secret.py.

Output, Clipboard & Prompt Tail Controls

You can control output targets and prompt behavior directly from the command line:

  • Output File: o "output.md" or output "output.md" writes the snapshot to a file (use "" to disable).
  • Clipboard Toggle: c / clipboard enables copying; nc / no-clipboard disables it.
  • Prompt Tail Toggle: pt / prompt-tail appends # Prompt\n\n at the end; npt / no-prompt-tail disables it.

Example combining options:

pipxclip "**/*.py" npt o "out.md" nc

Config File, Default Settings, and Presets

You can define presets in pipxclip-config.toml. Create a default one by running:

pipxclip init

Default configuration:

[[presets]]
name = "default"
include = ["AGENTS.md"]
exclude = []
output = ""
clipboard = true
prompt_tail = true

[[presets]]
name = "all"
include = ["**"]
exclude = []

The preset named default is always applied. This can be used for defining default configurations. Other presets can be applied using p or preset:

pipxclip p mypreset

Command Reference

Action Short Long Alternate / Flag forms
Include i include -i, --include
Exclude e exclude -e, --exclude
Preset p preset -p, --preset
Output File o output -o, --output
Clipboard On c clipboard -c, --clipboard
Clipboard Off nc no-clipboard --no-clipboard
Prompt Tail On pt prompt-tail --prompt-tail
Prompt Tail Off npt no-prompt-tail --no-prompt-tail

Notes

  • GitIgnore Aware: Files ignored by .gitignore rules are automatically excluded via pure Python tree traversal.
  • Automatic Guards: Binary files and files over 1 MB are automatically skipped with descriptive placeholders instead of causing errors.
  • Rule Precedence: CLI options extend and override configured preset rules sequentially.

About

A fast, cross-platform CLI that turns a project directory into clean Markdown context for an LLM chat, and copies it straight to your clipboard.

Resources

Contributing

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages