Ramener reads the first few pages of a PDF, calls Aliyun Bailian (qwen3-omni-flash) to extract metadata, then renames the file to YYYY-MM-DD_Source_Title.pdf. It is optimised for macOS and ships as a standalone app plus light Finder integrations.
- Build (or download) the latest
Ramener.dmgand dragRamener.appinto/Applications. - Launch
Ramener.app. If no credentials are found, a native settings window appears—fill in the service name, API key, model, and base URL. Values are saved to~/.config/ramener/settings.jsonfor both the app and CLI.- API key placement:
- Preferred: in the settings window, paste the Aliyun Bailian key (format typically
sk-...). - CLI-friendly: store the key in
~/.config/ramener/api_key(first line only) or exportRAMENER_API_KEY.
- Preferred: in the settings window, paste the Aliyun Bailian key (format typically
- Model/base URL default to Aliyun’s public endpoint; customise only if you use a private gateway.
- API key placement:
- Open Finder and select any PDF, then choose your preferred integration:
- Double-click
Ramener.appand browse to a PDF when prompted, or - Add the toolbar/script integrations below for one-click access.
- Double-click
Run the helper script to generate a ready-to-use toolbar applet:
./scripts/install_finder_toolbar.shThe script creates ~/Applications/Ramener Toolbar.app, detects an installed ramener CLI or the bundled /Applications/Ramener.app, and then opens Finder so you can drag the helper into the toolbar (View → Customize Toolbar…). Clicking the button processes the selected PDFs and reveals the renamed file.
-
Open Automator → Quick Action.
-
Configure the workflow to receive
PDF filesinFinderand ensure Output replaces selected items is unchecked. -
Add a Run Shell Script action with:
- Shell:
/bin/zsh - Pass input:
as arguments
- Shell:
-
Example script body:
"/Applications/Ramener.app/Contents/MacOS/ramener" "${1}"
(Adjust if you keep the app elsewhere.)
-
Save as
Rename PDF via AI. It now appears under Finder → Quick Actions.
The app bundle includes a console entry point. After pip install -e '.[mac]' (for contributors) or when the CLI is otherwise available, you can run:
ramener /path/to/report.pdfHelpful flags:
--dry-runprints the target filename without copying or trashing.--page-limit,--max-text-chars, and--ocr-modeltune extraction behaviour.--settingsopens the macOS settings window from the terminal.
- Detailed logs roll to
~/Library/Logs/Ramener/ramener.logby default; override with--log-fileorRAMENER_LOG_PATH. - To debug a frozen app run, execute
/Applications/Ramener.app/Contents/MacOS/ramener --verbose --log-file ~/Desktop/ramener-debug.log. - OCR fallback needs Poppler (
brew install poppler) plus Pillow/pdf2image when running from source. - Failures surface as macOS alerts when triggered via Automator/toolbar.
Ramener is packaged with PyInstaller, but the following is useful for local development:
-
Requirements: macOS, Python 3.10+, Poppler (for OCR), Aliyun Bailian API access.
-
Bootstrap environment:
python3 -m venv .venv source .venv/bin/activate pip install -e '.[mac]'
-
Optional environment overrides:
RAMENER_API_KEY_FILE,RAMENER_BASE_URL,RAMENER_MODEL,RAMENER_OCR_MODEL,RAMENER_PAGE_LIMIT,RAMENER_TIMEOUT,RAMENER_MAX_TEXT_CHARS,RAMENER_LOG_PATH,RAMENER_SERVICE_NAME.
- Ensure PyInstaller is installed in your environment (
pip install pyinstaller). - Run
./scripts/build_dmg.sh. - The script produces
dist/Ramener.appanddist/Ramener.dmg. Codesign and notarisedist/Ramener.appas needed before distributing the DMG.
Icons live under packaging/ (ramener.png source, ramener.icns bundle icon). If you edit the PNG, regenerate the .icns with python scripts/make_icns.py before rebuilding.
- Build artefacts locally:
This produces
./scripts/build_dmg.sh
dist/Ramener.appanddist/Ramener.dmg. - Tag the release:
git tag v0.2.0 git push origin main --tags
- Create a GitHub release (web UI or
gh release create v0.2.0 dist/Ramener.dmg --notes "…") and attachdist/Ramener.dmg. Optionally adddist/Ramener.appfor users who prefer copying bundles manually. - Include release notes summarising changes, system requirements, and any notarisation status.
You can automate the process via the helper script:
./scripts/create_release.sh v0.2.0 --notes "Bug fixes and Finder integration improvements"The script rebuilds the DMG, creates the Git tag if it doesn’t already exist, pushes it to the origin remote (override with GIT_REMOTE=upstream), and then creates or updates the GitHub release (requires the GitHub CLI gh).