Skip to main content

CLI tool to fetch and save web content as Markdown files using Jina Reader API. Handles authentication and provides rich terminal output.

Project description

JinaFetch

A CLI tool to fetch web content and save it as Markdown using Jina Reader API.

Features

  • 🚀 Fast web content conversion to Markdown
  • 🔑 Secure API key management via .env
  • 🎨 Rich terminal output with success/error formatting
  • 📂 Automatic filename generation with fallback

Installation

pipx install jinafetch  # Recommended
# or
pip install jinafetch

Usage

Configure API Key

jinafetch configure  # Update stored API key
jinafetch show-config  # See where credentials are stored

Basic fetching

jinafetch fetch https://example.com

Specify output file

jinafetch fetch https://example.com --output my_document.md

Pipe output to other commands

jinafetch fetch https://example.com --stdout | pbcopy  # Example: pipe to clipboard

Environment Configuration

The CLI will guide you through first-time setup:

  1. Run any command (e.g. jinafetch fetch https://example.com)
  2. You'll be prompted to enter your Jina API key
  3. Your key will be securely stored in:
    • Linux: ~/.config/jinafetch/config.ini
    • macOS: ~/Library/Application Support/jinafetch/config.ini
    • Windows: C:\Users\<user>\AppData\Local\jinafetch\config.ini

For CI/CD use cases, you can still set via environment variable:

export JINA_API_KEY=your_key_here
# or
JINA_API_KEY=your_key_here jinafetch fetch...

Error Handling

Common error scenarios include:

  • 🔒 Missing API key
  • 🌐 Network errors
  • 💾 File write permissions
  • 🔗 Invalid URLs

Errors display clear messages in red with details.

Requirements

  • Python 3.12+
  • Valid Jina Reader API key

📝 Note: Requires valid authentication via Jina Reader API

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jinafetch-0.3.0.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

jinafetch-0.3.0-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file jinafetch-0.3.0.tar.gz.

File metadata

  • Download URL: jinafetch-0.3.0.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.13.1

File hashes

Hashes for jinafetch-0.3.0.tar.gz
Algorithm Hash digest
SHA256 aeec7f4536ff4a05746eda1b2569dfde04e3e0549bf9d3f903abb57b0b8633d3
MD5 f48a28b88814ae0bbdaba53ddb5ccf99
BLAKE2b-256 875d9caa07e2b49ec3352ad105d9c1b32b68597c137aff17d45ede1969ca5ee8

See more details on using hashes here.

File details

Details for the file jinafetch-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: jinafetch-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 5.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.13.1

File hashes

Hashes for jinafetch-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 61edfd3a7c5ba074d77a384bc415435b73593089878eb38c8d56d06e7ec3446c
MD5 6b4da11bc91b5ede4c82eb45bec2a793
BLAKE2b-256 f87e759185a039ed59424a982a7256f22dbdf95d3cd9dc8e2be4d9cb35d5b267

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page