Metadata-Version: 2.4
Name: jike-web-cli
Version: 0.1.1
Summary: Agent-native CLI for Jike (即刻) — interact with web.okjike.com from the terminal
Author: doublewater777
License-Expression: MIT
Keywords: jike,即刻,cli,social-media,agent
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: click>=8.0
Requires-Dist: httpx>=0.24
Requires-Dist: rich>=13.0
Requires-Dist: prompt_toolkit>=3.0
Provides-Extra: auth
Requires-Dist: playwright>=1.30; extra == "auth"
Dynamic: requires-python

# jike

CLI for [Jike (即刻)](https://web.okjike.com/) — a Chinese social networking platform.

## Installation

```bash
pip install -e jike/agent-harness
```

For browser-based authentication:
```bash
pip install -e "jike/agent-harness[auth]"
playwright install chromium
```

## Quick Start

```bash
# Authenticate (opens browser for SMS/WeChat login)
jike auth login

# Your following feed
jike feed following

# Create a post
jike posts create "Hello Jike"

# Create a post with an image
jike posts create "Check this out" --image ~/photo.png

# All commands support --json output
jike --json feed following --limit 5
```

## Commands

### auth
| Command | Description |
|---------|-------------|
| `auth login` | Open browser for SMS/WeChat login |
| `auth status [--json]` | Check authentication state |
| `auth logout` | Remove saved credentials |

### feed
| Command | Description |
|---------|-------------|
| `feed following [--limit N] [--load-more-key K]` | Your following feed |
| `feed explore [--limit N] [--load-more-key K]` | Explore/discover feed |

### posts
| Command | Description |
|---------|-------------|
| `posts get <id>` | Get a post by ID |
| `posts create <content> [--topic-id ID] [--image PATH]` | Create a post, optionally with an image |
| `posts suggest <draft>` | Get topic suggestions for a draft |

### users
| Command | Description |
|---------|-------------|
| `users profile [username]` | Get your own or another user's profile |
| `users following <username> [--limit N]` | List who a user follows |
| `users followers <username> [--limit N]` | List a user's followers |

### topics
| Command | Description |
|---------|-------------|
| `topics get <id>` | Get topic/圈子 details |
| `topics feed <id> [--limit N]` | Get posts from a topic |

### notifications
| Command | Description |
|---------|-------------|
| `notifications list [--limit N]` | List notifications |
| `notifications unread` | Unread notification count |

### search
| Command | Description |
|---------|-------------|
| `search suggestions <keyword> [--limit N]` | Search autocomplete (topics, users, keywords) |

### comments
| Command | Description |
|---------|-------------|
| `comments list <post_id> [--limit N]` | List primary comments on a post |

## Auth

JWT token stored at `~/.config/jike/auth.json` (chmod 600).
For CI/CD, set the `CLI_WEB_JIKE_AUTH_JSON` environment variable with a JSON `{"token": "..."}` value.

Token expiration: tokens are short-lived. Run `auth login` to refresh via browser.

## REPL Mode

Run `jike` without arguments to enter interactive REPL mode with:
- Command history
- Auto-completion
- Branded banner

```bash
jike
> feed following --limit 3
> users profile
> exit
```
