Commit Graph

19 Commits

Author SHA1 Message Date
jakevin
0da8101c2f Merge pull request #18 from Pleasurecruise/main
feat: add `show` command with short-index cache
2026-03-14 04:06:47 +08:00
jackwener
b77f1ffe14 docs: align SKILL.md version to 0.8.0 2026-03-13 14:13:41 +08:00
Pleasurecruise
5335516d57 feat: add show command with short-index cache
Persist last displayed tweet lists and allow opening a tweet by index.

- Add twitter_cli/cache.py: stores a short-index cache (~/.twitter-cli/last_results.json) with a 1h TTL and helpers to resolve index->tweet-id and cache size.
- Update twitter_cli/cli.py: save list results to cache, display a hint, and add `twitter show <N>` command which fetches a tweet by cached index and prints detail/replies (supports --full-text, --json, structured output, and max replies).
- Update README.md and SKILL.md to document the new `show` usage.
- Add .idea/ to .gitignore and bump package version in uv.lock to 0.8.0.

This change makes it easy to open items from the last feed/search without copying IDs.
2026-03-12 22:12:27 +00:00
jackwener
41d8ad676e docs: update README and SKILL.md with image upload support
- Add image upload to Features lists (EN + CN)
- Add --image/-i usage examples to Usage sections
- Add 'Post with images' agent workflow in SKILL.md
- Update Limitations: 'text only' → 'images only (no video yet)'
2026-03-13 02:03:03 +08:00
jackwener
1313eb0be1 feat: add full-text option for tweet tables 2026-03-11 20:58:12 +08:00
jackwener
53a700ec60 feat: support Chrome multi-profile cookie extraction
Auto-iterates all Chrome/Arc/Edge/Brave profiles (Default, Profile 1,
Profile 2, ...) to find Twitter cookies. Falls back to the default
browser_cookie3 behavior when no profile dirs are found.

Set TWITTER_CHROME_PROFILE env var to specify a profile explicitly:
  TWITTER_CHROME_PROFILE='Profile 2' twitter feed

Closes #6
2026-03-11 12:53:25 +08:00
jackwener
84504b1477 docs: add upgrade instructions to README and SKILL.md 2026-03-11 12:43:51 +08:00
jackwener
e9efa11fa5 fix: warn when querying other users' likes (private since Jun 2024)
Twitter/X made all likes private since June 2024. The likes command now:
- Detects if the target user differs from the authenticated user
- Shows a clear warning that only your own likes are visible
- Updated SKILL.md and README.md with likes privacy limitation

Closes #8
2026-03-11 12:34:17 +08:00
jackwener
fa6255f2ee docs: document structured output schema 2026-03-10 21:22:35 +08:00
jackwener
32d074dc9f feat: anti-detection hardening, transaction cache, article parsing, structured write output
Anti-detection:
- Add 6 sec-ch-ua-* Client Hints headers (arch, bitness, full-version, etc.)
- POST requests now send Referer: x.com/compose/post + Priority: u=1, i
- follow/unfollow REST adds include_profile_interstitial_type param

Performance:
- Transaction ID cache with 1h TTL (~/.twitter-cli/transaction_cache.json)
- resolve_user_id: auto-detect screen_name vs numeric user_id

Features:
- Twitter Article parsing: extract long-form content as Markdown
- Write operations emit structured JSON/YAML when piped or OUTPUT env set
  ActionResult: {success, action, id, url, ...}

84 tests passing
2026-03-10 20:48:42 +08:00
jackwener
97708889c9 docs: enhance SKILL.md with auth guide, agent workflows, compact mode, error ref
- Add step-by-step authentication guidance for agents (3 methods)
- Add 10+ agent workflow examples (post/reply/quote/thread/search+jq)
- Document compact mode (-c) for LLM token efficiency
- Add new commands: whoami, reply, quote, follow/unfollow
- Add complete error reference table
- Add limitations section
2026-03-10 20:13:47 +08:00
jackwener
250fca46f0 docs: add structured output guidance for AI agents 2026-03-10 15:47:06 +08:00
jackwener
19ab11d6a4 fix: harden auth flow and sync browser support docs 2026-03-10 11:02:34 +08:00
jackwener
bbe0bc8de3 docs: rename rt/unrt → retweet/unretweet, update SKILL.md + README.md
- Rename rt/unrt commands to retweet/unretweet for clarity
- SKILL.md: fix Python version, add --output/--filter examples, safety notes
- README.md: dynamic Chrome fingerprint, write delays, --output examples
- Sync Chinese section with English changes
2026-03-09 21:20:05 +08:00
jackwener
df9b58ed0a docs: comprehensive SKILL.md rewrite — add install, all commands, patterns, error handling, safety notes 2026-03-09 01:38:51 +08:00
jackwener
0a7b6a6b78 fix: console output to stderr for clean --json output
- Change Console() to Console(stderr=True) so all status/progress
  messages go to stderr, keeping stdout pure JSON when --json is used
- Add missing exception handling in likes command for fetch_user
- Fix SKILL.md: favorite -> favorites (correct command name)
2026-03-08 22:37:00 +08:00
jackwener
0df8f3af9b Improve skill metadata and npx skills docs 2026-03-06 21:16:29 +08:00
jackwener
81486e31d5 docs: add skill metadata frontmatter for ClawHub publish 2026-03-05 16:54:08 +08:00
jackwener
dc1a76ddbb docs: add AI skill and ClawHub sections with SKILL.md 2026-03-05 16:52:04 +08:00