Metadata-Version: 2.4
Name: context-packager
Version: 0.1.1
Summary: Convert documents to Markdown (MarkItDown), package with Repomix, and serve a Streamlit UI for copyable LLM context.
Project-URL: Homepage, https://github.com/ruizmr/resume-context-builder
Author: Context Tools
License: MIT
License-File: LICENSE
Keywords: hnsw,llm,markdown,resume,retrieval,streamlit,tfidf
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Information Analysis
Classifier: Topic :: Text Processing :: Indexing
Requires-Python: >=3.10
Requires-Dist: pdfminer-six==20250506
Requires-Dist: psycopg[binary,pool]==3.2.1
Requires-Dist: repomix==0.3.4
Requires-Dist: scikit-learn==1.5.2
Requires-Dist: sqlalchemy==2.0.35
Requires-Dist: streamlit==1.50.0
Requires-Dist: tiktoken==0.11.0
Provides-Extra: ann
Requires-Dist: hnswlib==0.8.0; extra == 'ann'
Provides-Extra: full
Requires-Dist: markitdown[all]==0.1.3; extra == 'full'
Requires-Dist: onnxruntime==1.23.0; (sys_platform == 'darwin') and extra == 'full'
Requires-Dist: watchdog>=4.0.0; extra == 'full'
Description-Content-Type: text/markdown

# Context Packager

Convert documents to Markdown (MarkItDown), package into a single LLM-ready context (Repomix), and use a sleek Streamlit UI to copy/download.

## 1. Quick start (uv)



### macOS/Linux (full extras)
```bash
sh -c 'command -v uv >/dev/null 2>&1 || (curl -LsSf https://astral.sh/uv/install.sh | sh); PATH="$HOME/.local/bin:$PATH" uvx --python 3.12 --refresh --from git+https://github.com/ruizmr/resume-context-builder.git?extra=full resume-ui'
```


### Windows (full extras)
```powershell
powershell -NoProfile -ExecutionPolicy Bypass -Command "if (-not (Get-Command uv -EA SilentlyContinue)) { iwr https://astral.sh/uv/install.ps1 -UseBasicParsing | iex }; $env:Path = \"$env:USERPROFILE\.local\bin;$env:Path\"; uvx --python 3.12 --refresh --from git+https://github.com/ruizmr/resume-context-builder.git?extra=full resume-ui"
```

Use the sidebar to upload files or point to a folder. Download/copy packaged chunks. Check "Include in knowledge base" to persist chunks and use the built-in search.

For smoother live reload and file watching, the `full` extras include Watchdog.

KB persistence defaults to a local SQLite file at `~/.context-packager-state/context.db`. To use a shared DB, set `CONTEXT_DB_URL` before launching, for example on Linux/macOS:
```bash
export CONTEXT_DB_URL="sqlite:////absolute/path/to/context.db"
resume-ui
```

## 2. Install a shortcut (one-time)
Creates a persistent `resume-ui` command on your PATH.



### macOS/Linux (full extras)
```bash
sh -c 'command -v uv >/dev/null 2>&1 || (curl -LsSf https://astral.sh/uv/install.sh | sh); PATH="$HOME/.local/bin:$PATH" uv tool install --python 3.12 --force "git+https://github.com/ruizmr/resume-context-builder.git?extra=full" && echo "Installed. Next time just run: resume-ui"'
```


### Windows (full extras)
```powershell
powershell -NoProfile -ExecutionPolicy Bypass -Command "if (-not (Get-Command uv -EA SilentlyContinue)) { iwr https://astral.sh/uv/install.ps1 -UseBasicParsing | iex }; $env:Path = \"$env:USERPROFILE\.local\bin;$env:Path\"; uv tool install --python 3.12 --force \"git+https://github.com/ruizmr/resume-context-builder.git?extra=full\"; Write-Host 'Installed. Next time just run: resume-ui'"
```

## 4. Install from PyPI
```bash
python -m pip install --upgrade context-packager[full]
```

Available commands after install:
```bash
# Launch UI (Home + Manage knowledge)
resume-ui

# Convert to Markdown then upsert to KB (cron-friendly)
context-ingest "/path/to/input_dir" "/path/to/markdown_out_dir"

# Upsert existing Markdown into KB
context-upsert "/path/to/markdown_out_dir"
```

Available commands after install:
```bash
# Launch UI (Home + Manage knowledge)
resume-ui

# Convert to Markdown then upsert to KB (cron-friendly)
context-ingest "/path/to/input_dir" "/path/to/markdown_out_dir"

# Upsert existing Markdown into KB
context-upsert "/path/to/markdown_out_dir"
```

One-shot (no install):
```bash
# UI
sh -c 'command -v uv >/dev/null 2>&1 || (curl -LsSf https://astral.sh/uv/install.sh | sh); PATH="$HOME/.local/bin:$PATH" uvx --python 3.12 --refresh --from git+https://github.com/ruizmr/resume-context-builder.git?extra=full resume-ui'

# Ingest (convert + upsert)
sh -c 'command -v uv >/dev/null 2>&1 || (curl -LsSf https://astral.sh/uv/install.sh | sh); PATH="$HOME/.local/bin:$PATH" uvx --python 3.12 --refresh --from git+https://github.com/ruizmr/resume-context-builder.git?extra=full context-ingest "/path/to/input_dir" "/path/to/markdown_out_dir"'
```

ANN acceleration (optional):
```bash
python -m pip install context-packager[ann]
```
If ANN install fails, the package falls back to an exact TF‑IDF search automatically.

Database configuration:
```bash
# SQLite (default)
# ~/.context-packager-state/context.db

# Postgres
export CONTEXT_DB_URL='postgresql+psycopg://user:pass@host:5432/dbname'
resume-ui
```

## 3. Troubleshooting PATH
- macOS/Linux: ensure `~/.local/bin` is on PATH (e.g., add `export PATH="$HOME/.local/bin:$PATH"` to your shell rc).
- Windows: ensure `%USERPROFILE%\.local\bin` is on PATH, then open a new terminal.

If `resume-ui` is not found right after install
- Quick fix (macOS/Linux):
```bash
source "$HOME/.local/bin/env" || { echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc && source ~/.zshrc; }
```
- Run via absolute path once:
```bash
"$HOME/.local/bin/resume-ui"
```
- Windows PowerShell:
```powershell
& "$env:USERPROFILE\.local\bin\resume-ui.exe"
```
