Skip to main content

Agent-friendly web fetch CLI

Project description

kyotool-fetch

kyotool-fetch는 URL을 가져와 본문을 추출하고, Markdown 또는 JSON 형태로 출력하는 CLI 도구입니다.

프로젝트 구조

kyotool-fetch/
├─ pyproject.toml
├─ README.md
├─ PLAN.md
├─ SPEC.md
├─ src/
│  └─ kyotool_fetch/
│     ├─ __init__.py
│     └─ cli.py
├─ tests/
│  └─ test_cli.py
├─ main.py
└─ uv.lock

주요 파일

  • pyproject.toml: 패키지 메타데이터, 의존성, CLI 엔트리포인트
  • src/kyotool_fetch/cli.py: fetch 및 CLI 실행 로직
  • tests/test_cli.py: CLI와 fetch 동작을 검증하는 테스트
  • SPEC.md: 구현 기준 문서
  • PLAN.md: 구현 순서와 검증 계획

요구 환경

  • Python 3.14 이상
  • uv 권장

설치

개발 환경

uv venv
uv pip install -e .

일반 설치

pip install -e .

실행

kyotool-fetch https://example.com

옵션 예시:

kyotool-fetch https://example.com --json
kyotool-fetch https://example.com --format text
kyotool-fetch https://example.com --links-only

빌드

패키지 배포용 산출물을 만들려면 다음 명령을 사용한다.

uv build

산출물은 일반적으로 dist/ 아래에 생성된다.

테스트

테스트는 표준 라이브러리 unittest로 실행한다.

uv run python -m unittest discover -s tests -v

개별 테스트 파일만 실행하려면 다음과 같이 할 수 있다.

uv run python -m unittest tests.test_cli -v

배포

1. 로컬 검증

배포 전에 다음을 확인한다.

uv run python -m unittest discover -s tests -v
uv run kyotool-fetch --help

2. 배포 아티팩트 생성

uv build

3. 패키지 배포

PyPI에 배포하는 경우 dist/에 생성된 파일을 업로드한다.

python -m twine upload dist/*

실제 배포 전에는 대상 저장소, 버전, 인증 정보를 확인해야 한다.

현재 구현 범위

  • CLI 인자 파싱
  • HTTP GET fetch
  • 성공/실패 결과 객체 반환
  • --json 출력
  • --links-only 출력

본문 추출, Markdown 변환, 메타데이터 추출은 이후 단계에서 확장할 수 있다.

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

kyotool_fetch-0.1.0.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

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

kyotool_fetch-0.1.0-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file kyotool_fetch-0.1.0.tar.gz.

File metadata

  • Download URL: kyotool_fetch-0.1.0.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for kyotool_fetch-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f023c525c0d95a2b5cd865488d4a1aa528349edd8ebd3f8a5540f32276553efe
MD5 8e1acf7768535ab161be3a61a5707835
BLAKE2b-256 4cc2ee31335400c13a4d0767f85eb07aee0db5ded0541f729b562c05c9fd3d70

See more details on using hashes here.

File details

Details for the file kyotool_fetch-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: kyotool_fetch-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for kyotool_fetch-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d4d7ea8aa43552cc02298ce907bad8de441739d8e873ccb6660181877706d3e1
MD5 fc35414ed2a7a7af958c5397a6393d19
BLAKE2b-256 8c6b29014633c7058806dbd7bf7e1d767d67b6137a070d38ef74f54728d8c5ad

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