Metadata-Version: 2.4
Name: hawkx
Version: 0.1.0
Summary: CLI to fetch tweets from X using your Chrome session
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: requests
Requires-Dist: cryptography
Requires-Dist: pyyaml
Requires-Dist: playwright

# hawkx

CLI to fetch tweets from X using your Chrome session. No API key — uses your logged-in Chrome cookies.

**Requirement:** Be logged into x.com in Chrome.

## Disclaimer

This tool automates access to X using your own browser session. You are responsible for complying with X's Terms of Service and acceptable use policies. Use at your own risk. The authors do not endorse or encourage any use that violates X's policies.

## Setup

```bash
pip install -r requirements.txt
```

Or from source:

```bash
pip install -e .
```

## Usage

```bash
hawkx getuser <name> [number]             # e.g. hawkx getuser elonmusk 20
hawkx getuser elonmusk 100 -R -I -t       # 100 posts, replies, images, text only
hawkx getpost <post_id> [-R] [-I]         # -R include replies, -I include image URLs
hawkx getbookmarks [number] [-R] [-I]
hawkx setprofile 'Profile 1'              # set Chrome profile (saved to ~/.hawkx/settings.json)
```

Run `hawkx` or `hawkx help` for command list.

## Settings

Profile is stored in `~/.hawkx/settings.json`:

```json
{"profile": "Profile 1"}
```

Update with `hawkx setprofile 'Profile 1'`. Default is `"1"` (Profile 1).

## Output

Default: JSON with `id`, `text`, `created_at`, `user`, `favorites`, `retweets`, `replies`. Add `-I` for `images` array, `-R` for reply metadata / reply thread. Use `-t` for text only.

## SDK

```python
from twitter.package import get_user_tweets, get_bookmarks, get_post, get_post_simple
entries = get_user_tweets("elonmusk", limit=40)
```
