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.
This commit is contained in:
Pleasurecruise
2026-03-12 22:12:27 +00:00
parent 41d8ad676e
commit 5335516d57
6 changed files with 135 additions and 3 deletions

View File

@@ -165,6 +165,9 @@ twitter search "topic" -o results.json # Save to file
twitter tweet 1234567890 # Tweet detail + replies
twitter tweet 1234567890 --full-text # Full text in reply table
twitter tweet https://x.com/user/status/12345 # Accepts URL
twitter show 2 # Open tweet #2 from last feed/search list
twitter show 2 --full-text # Full text in reply table
twitter show 2 --json # Structured output
twitter list 1539453138322673664 # List timeline
twitter list 1539453138322673664 --full-text
twitter user-posts elonmusk --max 20 # User's tweets