viruagent-cli 0.3.7 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.ko.md +41 -25
- package/README.md +40 -24
- package/bin/index.js +91 -1
- package/package.json +3 -2
- package/skills/viruagent-insta.md +163 -0
- package/skills/viruagent-naver.md +122 -0
- package/skills/viruagent-tistory.md +117 -0
- package/skills/viruagent.md +37 -246
- package/src/providers/insta/apiClient.js +630 -0
- package/src/providers/insta/auth.js +135 -0
- package/src/providers/insta/index.js +293 -0
- package/src/providers/insta/session.js +118 -0
- package/src/providers/insta/smartComment.js +67 -0
- package/src/providers/insta/utils.js +34 -0
- package/src/runner.js +82 -9
- package/src/services/providerManager.js +5 -2
package/README.ko.md
CHANGED
|
@@ -18,25 +18,33 @@
|
|
|
18
18
|
<a href="README.ko.md"><img src="https://img.shields.io/badge/한국어-red" alt="Korean"></a>
|
|
19
19
|
</p>
|
|
20
20
|
|
|
21
|
-
**AI 에이전트가
|
|
21
|
+
**AI 에이전트가 블로그 발행부터 SNS 활동까지 자동으로 처리하는 CLI 도구**
|
|
22
22
|
|
|
23
23
|
사람이 아닌 **AI 에이전트를 위해** 설계되었습니다.
|
|
24
24
|
|
|
25
|
+
## 지원 플랫폼
|
|
26
|
+
|
|
27
|
+
| 플랫폼 | 로그인 | 주요 기능 | 가이드 |
|
|
28
|
+
|--------|--------|----------|--------|
|
|
29
|
+
| **Tistory** | Playwright (카카오) | 글 발행, 임시저장, 카테고리, 이미지 업로드 | [가이드](docs/ko/guide-tistory.md) |
|
|
30
|
+
| **Naver Blog** | Playwright (네이버) | 글 발행, 카테고리, SE Editor, 이미지 업로드 | [가이드](docs/ko/guide-naver.md) |
|
|
31
|
+
| **Instagram** | HTTP (브라우저 불필요) | 좋아요, 댓글, 팔로우, 포스팅, 프로필, 피드 | [가이드](docs/ko/guide-instagram.md) |
|
|
32
|
+
|
|
25
33
|
## 동작 방식
|
|
26
34
|
|
|
27
|
-
**CLI + 스킬 기반**으로 작동합니다. CLI 자체는 인터페이스만 담당하고,
|
|
35
|
+
**CLI + 스킬 기반**으로 작동합니다. CLI 자체는 인터페이스만 담당하고, 스킬 파일(`viruagent.md`)이 AI 에이전트에게 워크플로우를 지시합니다.
|
|
28
36
|
|
|
29
37
|
```
|
|
30
38
|
사용자: "블로그 써줘"
|
|
31
39
|
→ 스킬이 에이전트에게 워크플로우 지시
|
|
32
40
|
→ 에이전트가 CLI를 호출 (로그인, 카테고리 조회, 발행 등)
|
|
33
41
|
|
|
34
|
-
사용자:
|
|
35
|
-
→
|
|
42
|
+
사용자: "@username 게시물 전부 좋아요하고 댓글 달아줘"
|
|
43
|
+
→ 에이전트가 Instagram 프로바이더 사용 (로그인, listPosts, like, analyzePost, comment)
|
|
36
44
|
```
|
|
37
45
|
|
|
38
|
-
- **스킬 파일**: 에이전트가 무엇을, 어떤 순서로 할지 정의
|
|
39
|
-
- **CLI**: 스킬의 지시를 받아 실제 작업 수행
|
|
46
|
+
- **스킬 파일**: 에이전트가 무엇을, 어떤 순서로 할지 정의
|
|
47
|
+
- **CLI**: 스킬의 지시를 받아 실제 작업 수행
|
|
40
48
|
- **에이전트**: 스킬을 읽고 CLI를 조합하여 자율적으로 실행
|
|
41
49
|
- **커스텀**: 스킬 파일을 직접 수정하여 원하는 대로 동작하도록 설정 가능
|
|
42
50
|
|
|
@@ -44,7 +52,7 @@
|
|
|
44
52
|
|
|
45
53
|

|
|
46
54
|
|
|
47
|
-
아래 내용을 AI 에이전트에게 그대로 복사해서 보여주세요.
|
|
55
|
+
아래 내용을 AI 에이전트에게 그대로 복사해서 보여주세요.
|
|
48
56
|
|
|
49
57
|
```
|
|
50
58
|
You are installing viruagent-cli, a blog publishing CLI tool. Follow these steps in order.
|
|
@@ -67,30 +75,44 @@ Tell the user that viruagent-cli installation is complete.
|
|
|
67
75
|
### Tistory
|
|
68
76
|
|
|
69
77
|
```bash
|
|
70
|
-
|
|
71
|
-
npx viruagent-cli login --username <id> --password <pw> --headless
|
|
78
|
+
npx viruagent-cli login --provider tistory --username <카카오 ID> --password <비밀번호> --headless
|
|
72
79
|
```
|
|
80
|
+
> "티스토리 로그인해줘" — 에이전트가 알아서 처리
|
|
73
81
|
|
|
74
82
|
### Naver Blog
|
|
75
83
|
|
|
76
84
|
```bash
|
|
77
|
-
|
|
78
|
-
|
|
85
|
+
npx viruagent-cli login --provider naver --username <네이버 ID> --password <비밀번호>
|
|
86
|
+
```
|
|
87
|
+
> "네이버 블로그 로그인해줘" — 에이전트가 알아서 처리
|
|
88
|
+
|
|
89
|
+
### Instagram
|
|
79
90
|
|
|
80
|
-
|
|
81
|
-
npx viruagent-cli login --provider
|
|
91
|
+
```bash
|
|
92
|
+
npx viruagent-cli login --provider insta --username <인스타 ID> --password <비밀번호>
|
|
82
93
|
```
|
|
94
|
+
> "인스타 로그인해줘" — 에이전트가 알아서 처리
|
|
95
|
+
>
|
|
96
|
+
> 전체 API 레퍼런스와 rate limit 규칙은 [Instagram 가이드](docs/ko/guide-instagram.md)를 참고하세요.
|
|
83
97
|
|
|
84
98
|
## 사용법
|
|
85
99
|
|
|
86
100
|
| 이렇게 말하면 | 에이전트가 알아서 |
|
|
87
101
|
|---|---|
|
|
88
|
-
| "블로그 써줘" | 로그인 → 카테고리 → 글 작성 → 태그 → 발행 |
|
|
102
|
+
| "티스토리에 블로그 써줘" | 로그인 → 카테고리 → 글 작성 → 태그 → 발행 |
|
|
103
|
+
| "네이버에 글 올려줘" | 네이버 로그인 → 카테고리 → 발행 |
|
|
89
104
|
| "임시저장해줘" | 같은 흐름, 발행 대신 임시저장 |
|
|
90
105
|
| "최근 글 보여줘" | 최근 발행 글 목록 조회 |
|
|
91
|
-
| "
|
|
106
|
+
| "@user 게시물 전부 좋아요해줘" | 로그인 → listPosts → like (rate limit 자동 적용) |
|
|
107
|
+
| "이 사람 피드 분석해서 댓글 달아줘" | analyzePost → AI 댓글 생성 → comment |
|
|
108
|
+
| "@user 팔로우해줘" | 로그인 → follow (딜레이 자동 적용) |
|
|
109
|
+
| "인스타 rate limit 확인해줘" | rate-limit-status → 카운터 표시 |
|
|
92
110
|
|
|
93
|
-
|
|
111
|
+
## 플랫폼별 가이드
|
|
112
|
+
|
|
113
|
+
- **[Tistory 가이드](docs/ko/guide-tistory.md)** — 블로그 발행, 이미지 업로드, 카테고리
|
|
114
|
+
- **[Naver Blog 가이드](docs/ko/guide-naver.md)** — SE Editor, 블로그 발행, 이미지 업로드
|
|
115
|
+
- **[Instagram 가이드](docs/ko/guide-instagram.md)** — 18개 API 메서드, rate limit 규칙, AI 댓글
|
|
94
116
|
|
|
95
117
|
## 지원 환경
|
|
96
118
|
|
|
@@ -100,21 +122,15 @@ npx viruagent-cli login --provider naver --username <id> --password <pw>
|
|
|
100
122
|
| bash 실행 가능한 모든 AI 에이전트 | 지원 |
|
|
101
123
|
| Node.js | >= 18 |
|
|
102
124
|
|
|
103
|
-
## 지원 플랫폼
|
|
104
|
-
|
|
105
|
-
| 플랫폼 | 상태 |
|
|
106
|
-
| --- | --- |
|
|
107
|
-
| Tistory | 지원 |
|
|
108
|
-
| Naver Blog | 지원 |
|
|
109
|
-
|
|
110
125
|
## 기술 스택
|
|
111
126
|
|
|
112
127
|
| 영역 | 기술 |
|
|
113
128
|
| --- | --- |
|
|
114
129
|
| CLI 프레임워크 | Commander.js |
|
|
115
|
-
| 브라우저 자동화 | Playwright (
|
|
116
|
-
|
|
|
130
|
+
| 브라우저 자동화 | Playwright (Tistory, Naver만 사용) |
|
|
131
|
+
| Instagram API | 순수 HTTP fetch (브라우저 불필요) |
|
|
117
132
|
| 세션 관리 | JSON 파일 (`~/.viruagent-cli/`) |
|
|
133
|
+
| Rate Limiting | 유저별 영속 카운터 + 랜덤 딜레이 |
|
|
118
134
|
| 이미지 검색 | DuckDuckGo, Wikimedia Commons |
|
|
119
135
|
| 네이버 에디터 | SE Editor 컴포넌트 모델 + RabbitWrite API |
|
|
120
136
|
| 출력 형식 | JSON envelope (`{ ok, data }` / `{ ok, error, hint }`) |
|
package/README.md
CHANGED
|
@@ -18,10 +18,18 @@
|
|
|
18
18
|
<a href="README.ko.md"><img src="https://img.shields.io/badge/한국어-red" alt="Korean"></a>
|
|
19
19
|
</p>
|
|
20
20
|
|
|
21
|
-
**A CLI tool where AI agents write,
|
|
21
|
+
**A CLI tool where AI agents write, publish, and engage across blog & social platforms automatically.**
|
|
22
22
|
|
|
23
23
|
Designed not for humans, but for **AI agents**.
|
|
24
24
|
|
|
25
|
+
## Supported Platforms
|
|
26
|
+
|
|
27
|
+
| Platform | Login | Features | Guide |
|
|
28
|
+
|----------|-------|----------|-------|
|
|
29
|
+
| **Tistory** | Playwright (Kakao) | Publish, Draft, Categories, Image Upload | [Guide](docs/en/guide-tistory.md) |
|
|
30
|
+
| **Naver Blog** | Playwright (Naver) | Publish, Categories, SE Editor, Image Upload | [Guide](docs/en/guide-naver.md) |
|
|
31
|
+
| **Instagram** | HTTP (No Browser) | Like, Comment, Follow, Post, Profile, Feed, Rate Limit | [Guide](docs/en/guide-instagram.md) |
|
|
32
|
+
|
|
25
33
|
## How It Works
|
|
26
34
|
|
|
27
35
|
Operates via **CLI + skill files**. The CLI handles the interface; the skill file (`viruagent.md`) instructs the AI agent on workflow, formatting, and rules.
|
|
@@ -31,13 +39,13 @@ User: "Write a blog post"
|
|
|
31
39
|
→ Skill instructs the agent on workflow
|
|
32
40
|
→ Agent calls CLI (login, list categories, publish, etc.)
|
|
33
41
|
|
|
34
|
-
User:
|
|
35
|
-
→
|
|
42
|
+
User: "Like and comment on all posts from @username"
|
|
43
|
+
→ Agent uses Instagram provider (login, listPosts, like, analyzePost, comment)
|
|
36
44
|
```
|
|
37
45
|
|
|
38
|
-
- **Skill file**: Defines what to do and in what order
|
|
39
|
-
- **CLI**: Executes tasks per skill instructions
|
|
40
|
-
- **Agent**: Reads the skill and orchestrates
|
|
46
|
+
- **Skill file**: Defines what to do and in what order
|
|
47
|
+
- **CLI**: Executes tasks per skill instructions
|
|
48
|
+
- **Agent**: Reads the skill and orchestrates commands autonomously
|
|
41
49
|
- **Custom**: Edit the skill file to customize behavior
|
|
42
50
|
|
|
43
51
|
## Quick Start
|
|
@@ -67,30 +75,44 @@ Tell the user that viruagent-cli installation is complete.
|
|
|
67
75
|
### Tistory
|
|
68
76
|
|
|
69
77
|
```bash
|
|
70
|
-
|
|
71
|
-
npx viruagent-cli login --username <id> --password <pw> --headless
|
|
78
|
+
npx viruagent-cli login --provider tistory --username <kakao_id> --password <pw> --headless
|
|
72
79
|
```
|
|
80
|
+
> "Login to Tistory" — Agent handles it automatically
|
|
73
81
|
|
|
74
82
|
### Naver Blog
|
|
75
83
|
|
|
76
84
|
```bash
|
|
77
|
-
# Manual login via browser
|
|
78
|
-
npx viruagent-cli login --provider naver --manual
|
|
79
|
-
|
|
80
|
-
# Auto login with credentials
|
|
81
85
|
npx viruagent-cli login --provider naver --username <id> --password <pw>
|
|
82
86
|
```
|
|
87
|
+
> "Login to Naver Blog" — Agent handles it automatically
|
|
88
|
+
|
|
89
|
+
### Instagram
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
npx viruagent-cli login --provider insta --username <id> --password <pw>
|
|
93
|
+
```
|
|
94
|
+
> "Login to Instagram" — Agent handles it automatically
|
|
95
|
+
>
|
|
96
|
+
> See the [Instagram Guide](docs/en/guide-instagram.md) for full API reference and rate limit rules.
|
|
83
97
|
|
|
84
98
|
## Usage
|
|
85
99
|
|
|
86
100
|
| Say this | Agent handles |
|
|
87
101
|
|---|---|
|
|
88
|
-
| "Write a blog post" | Login → Categories → Draft → Tags → Publish |
|
|
102
|
+
| "Write a blog post on Tistory" | Login → Categories → Draft → Tags → Publish |
|
|
103
|
+
| "Post to Naver Blog" | Naver login → Categories → Publish |
|
|
89
104
|
| "Save as draft" | Same flow, saves as draft instead |
|
|
90
105
|
| "Show recent posts" | Lists recent published posts |
|
|
91
|
-
| "
|
|
106
|
+
| "Like all posts from @user" | Login → listPosts → like (with rate limit) |
|
|
107
|
+
| "Analyze and comment on @user's feed" | analyzePost → AI generates comment → comment |
|
|
108
|
+
| "Follow @user" | Login → follow (with delay) |
|
|
109
|
+
| "Check Instagram rate limit" | rate-limit-status → show counters |
|
|
110
|
+
|
|
111
|
+
## Platform Guides
|
|
92
112
|
|
|
93
|
-
|
|
113
|
+
- **[Tistory Guide](docs/en/guide-tistory.md)** — Blog publishing, image upload, categories
|
|
114
|
+
- **[Naver Blog Guide](docs/en/guide-naver.md)** — SE Editor, blog publishing, image upload
|
|
115
|
+
- **[Instagram Guide](docs/en/guide-instagram.md)** — 18 API methods, rate limits, AI commenting
|
|
94
116
|
|
|
95
117
|
## Supported Environments
|
|
96
118
|
|
|
@@ -100,21 +122,15 @@ Ask the agent for detailed usage or customization help.
|
|
|
100
122
|
| Any AI agent with bash access | Supported |
|
|
101
123
|
| Node.js | >= 18 |
|
|
102
124
|
|
|
103
|
-
## Supported Platforms
|
|
104
|
-
|
|
105
|
-
| Platform | Status |
|
|
106
|
-
| --- | --- |
|
|
107
|
-
| Tistory | Supported |
|
|
108
|
-
| Naver Blog | Supported |
|
|
109
|
-
|
|
110
125
|
## Tech Stack
|
|
111
126
|
|
|
112
127
|
| Area | Tech |
|
|
113
128
|
| --- | --- |
|
|
114
129
|
| CLI Framework | Commander.js |
|
|
115
|
-
| Browser Automation | Playwright (
|
|
116
|
-
|
|
|
130
|
+
| Browser Automation | Playwright (Tistory, Naver only) |
|
|
131
|
+
| Instagram API | Pure HTTP fetch (no browser) |
|
|
117
132
|
| Session Management | JSON file (`~/.viruagent-cli/`) |
|
|
133
|
+
| Rate Limiting | Per-user persistent counters with random delays |
|
|
118
134
|
| Image Search | DuckDuckGo, Wikimedia Commons |
|
|
119
135
|
| Naver Editor | SE Editor component model + RabbitWrite API |
|
|
120
136
|
| Output Format | JSON envelope (`{ ok, data }` / `{ ok, error, hint }`) |
|
package/bin/index.js
CHANGED
|
@@ -18,7 +18,7 @@ program
|
|
|
18
18
|
|
|
19
19
|
// Global options
|
|
20
20
|
const addProviderOption = (cmd) =>
|
|
21
|
-
cmd.option('--provider <name>', 'Provider name (tistory
|
|
21
|
+
cmd.option('--provider <name>', 'Provider name (tistory, naver, insta)', 'tistory');
|
|
22
22
|
|
|
23
23
|
const addDryRunOption = (cmd) =>
|
|
24
24
|
cmd.option('--dry-run', 'Validate params without executing', false);
|
|
@@ -102,6 +102,7 @@ const listPostsCmd = program
|
|
|
102
102
|
.description('List recent posts');
|
|
103
103
|
addProviderOption(listPostsCmd);
|
|
104
104
|
listPostsCmd
|
|
105
|
+
.option('--username <username>', 'Target username (required for insta)')
|
|
105
106
|
.option('--limit <n>', 'Number of posts to retrieve', '20')
|
|
106
107
|
.action((opts) => execute('list-posts', opts));
|
|
107
108
|
|
|
@@ -130,6 +131,95 @@ const listProvidersCmd = program
|
|
|
130
131
|
.description('List supported providers');
|
|
131
132
|
listProvidersCmd.action((opts) => execute('list-providers', opts));
|
|
132
133
|
|
|
134
|
+
// --- Instagram / SNS commands ---
|
|
135
|
+
|
|
136
|
+
const getProfileCmd = program
|
|
137
|
+
.command('get-profile')
|
|
138
|
+
.description('Get user profile info');
|
|
139
|
+
addProviderOption(getProfileCmd);
|
|
140
|
+
getProfileCmd
|
|
141
|
+
.option('--username <username>', 'Target username')
|
|
142
|
+
.action((opts) => execute('get-profile', opts));
|
|
143
|
+
|
|
144
|
+
const getFeedCmd = program
|
|
145
|
+
.command('get-feed')
|
|
146
|
+
.description('Get feed timeline');
|
|
147
|
+
addProviderOption(getFeedCmd);
|
|
148
|
+
getFeedCmd.action((opts) => execute('get-feed', opts));
|
|
149
|
+
|
|
150
|
+
const likeCmd = program
|
|
151
|
+
.command('like')
|
|
152
|
+
.description('Like a post');
|
|
153
|
+
addProviderOption(likeCmd);
|
|
154
|
+
likeCmd
|
|
155
|
+
.option('--post-id <shortcode>', 'Post shortcode')
|
|
156
|
+
.action((opts) => execute('like', opts));
|
|
157
|
+
|
|
158
|
+
const unlikeCmd = program
|
|
159
|
+
.command('unlike')
|
|
160
|
+
.description('Unlike a post');
|
|
161
|
+
addProviderOption(unlikeCmd);
|
|
162
|
+
unlikeCmd
|
|
163
|
+
.option('--post-id <shortcode>', 'Post shortcode')
|
|
164
|
+
.action((opts) => execute('unlike', opts));
|
|
165
|
+
|
|
166
|
+
const commentCmd = program
|
|
167
|
+
.command('comment')
|
|
168
|
+
.description('Comment on a post');
|
|
169
|
+
addProviderOption(commentCmd);
|
|
170
|
+
commentCmd
|
|
171
|
+
.option('--post-id <shortcode>', 'Post shortcode')
|
|
172
|
+
.option('--text <text>', 'Comment text')
|
|
173
|
+
.action((opts) => execute('comment', opts));
|
|
174
|
+
|
|
175
|
+
const followCmd = program
|
|
176
|
+
.command('follow')
|
|
177
|
+
.description('Follow a user');
|
|
178
|
+
addProviderOption(followCmd);
|
|
179
|
+
followCmd
|
|
180
|
+
.option('--username <username>', 'Target username')
|
|
181
|
+
.action((opts) => execute('follow', opts));
|
|
182
|
+
|
|
183
|
+
const unfollowCmd = program
|
|
184
|
+
.command('unfollow')
|
|
185
|
+
.description('Unfollow a user');
|
|
186
|
+
addProviderOption(unfollowCmd);
|
|
187
|
+
unfollowCmd
|
|
188
|
+
.option('--username <username>', 'Target username')
|
|
189
|
+
.action((opts) => execute('unfollow', opts));
|
|
190
|
+
|
|
191
|
+
const likeCommentCmd = program
|
|
192
|
+
.command('like-comment')
|
|
193
|
+
.description('Like a comment');
|
|
194
|
+
addProviderOption(likeCommentCmd);
|
|
195
|
+
likeCommentCmd
|
|
196
|
+
.option('--comment-id <id>', 'Comment ID')
|
|
197
|
+
.action((opts) => execute('like-comment', opts));
|
|
198
|
+
|
|
199
|
+
const unlikeCommentCmd = program
|
|
200
|
+
.command('unlike-comment')
|
|
201
|
+
.description('Unlike a comment');
|
|
202
|
+
addProviderOption(unlikeCommentCmd);
|
|
203
|
+
unlikeCommentCmd
|
|
204
|
+
.option('--comment-id <id>', 'Comment ID')
|
|
205
|
+
.action((opts) => execute('unlike-comment', opts));
|
|
206
|
+
|
|
207
|
+
const analyzePostCmd = program
|
|
208
|
+
.command('analyze-post')
|
|
209
|
+
.description('Analyze a post (thumbnail + caption + profile)');
|
|
210
|
+
addProviderOption(analyzePostCmd);
|
|
211
|
+
analyzePostCmd
|
|
212
|
+
.option('--post-id <shortcode>', 'Post shortcode')
|
|
213
|
+
.action((opts) => execute('analyze-post', opts));
|
|
214
|
+
|
|
215
|
+
const rateLimitCmd = program
|
|
216
|
+
.command('rate-limit-status')
|
|
217
|
+
.description('Show current rate limit usage');
|
|
218
|
+
addProviderOption(rateLimitCmd);
|
|
219
|
+
rateLimitCmd.action((opts) => execute('rate-limit-status', opts));
|
|
220
|
+
|
|
221
|
+
// --- Utility commands ---
|
|
222
|
+
|
|
133
223
|
const installSkillCmd = program
|
|
134
224
|
.command('install-skill')
|
|
135
225
|
.description('Install viruagent skill for Claude Code / Codex')
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "viruagent-cli",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "AI-agent-optimized CLI for blog publishing (Tistory, Naver)",
|
|
3
|
+
"version": "0.4.1",
|
|
4
|
+
"description": "AI-agent-optimized CLI for blog publishing (Tistory, Naver) and Instagram automation",
|
|
5
5
|
"private": false,
|
|
6
6
|
"type": "commonjs",
|
|
7
7
|
"license": "MIT",
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
"blog",
|
|
12
12
|
"tistory",
|
|
13
13
|
"naver",
|
|
14
|
+
"instagram",
|
|
14
15
|
"publishing",
|
|
15
16
|
"automation",
|
|
16
17
|
"llm",
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: viruagent-insta
|
|
3
|
+
description: Instagram automation via viruagent-cli — like, comment, follow, post, analyze feed. Handles rate limits and bot detection avoidance.
|
|
4
|
+
triggers:
|
|
5
|
+
- 인스타
|
|
6
|
+
- 인스타그램
|
|
7
|
+
- instagram
|
|
8
|
+
- insta
|
|
9
|
+
- 좋아요
|
|
10
|
+
- 댓글 달아
|
|
11
|
+
- 팔로우
|
|
12
|
+
- 언팔로우
|
|
13
|
+
- 피드
|
|
14
|
+
- like
|
|
15
|
+
- comment
|
|
16
|
+
- follow
|
|
17
|
+
- unfollow
|
|
18
|
+
- feed
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
# viruagent-insta — Instagram Automation Skill
|
|
22
|
+
|
|
23
|
+
You are an Instagram automation agent using `viruagent-cli`. Always use `npx viruagent-cli` with `--provider insta`.
|
|
24
|
+
|
|
25
|
+
## Step 1: Check authentication
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
npx viruagent-cli status --provider insta
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
If not logged in:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
npx viruagent-cli login --provider insta --username <user> --password <pass>
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Environment variables `INSTA_USERNAME` / `INSTA_PASSWORD` also work.
|
|
38
|
+
|
|
39
|
+
## Step 2: Available commands
|
|
40
|
+
|
|
41
|
+
### Profile & Feed
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
# Get user profile
|
|
45
|
+
npx viruagent-cli get-profile --provider insta --username <username>
|
|
46
|
+
|
|
47
|
+
# Get your feed timeline
|
|
48
|
+
npx viruagent-cli get-feed --provider insta
|
|
49
|
+
|
|
50
|
+
# List user's posts (with pagination)
|
|
51
|
+
npx viruagent-cli list-posts --provider insta --username <username> --limit 20
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### Engagement (auto rate-limit delays applied)
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
# Like a post
|
|
58
|
+
npx viruagent-cli like --provider insta --post-id <shortcode>
|
|
59
|
+
|
|
60
|
+
# Comment on a post
|
|
61
|
+
npx viruagent-cli comment --provider insta --post-id <shortcode> --text "comment text"
|
|
62
|
+
|
|
63
|
+
# Follow / Unfollow
|
|
64
|
+
npx viruagent-cli follow --provider insta --username <username>
|
|
65
|
+
npx viruagent-cli unfollow --provider insta --username <username>
|
|
66
|
+
|
|
67
|
+
# Like / Unlike a comment
|
|
68
|
+
npx viruagent-cli like-comment --provider insta --comment-id <id>
|
|
69
|
+
npx viruagent-cli unlike-comment --provider insta --comment-id <id>
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### Analyze & Smart Comment
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
# Analyze post (returns caption + thumbnail base64 + profile)
|
|
76
|
+
npx viruagent-cli analyze-post --provider insta --post-id <shortcode>
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Use `analyze-post` to get the thumbnail image, then visually analyze it to write contextual comments.
|
|
80
|
+
|
|
81
|
+
### Publish
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
# Publish an image post (provide imageUrl or imagePath in code)
|
|
85
|
+
# CLI does not have a direct publish command — use the Node.js API:
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
```javascript
|
|
89
|
+
const insta = require('viruagent-cli/src/services/providerManager').createProviderManager().getProvider('insta');
|
|
90
|
+
await insta.publish({ imageUrl: 'https://...', caption: 'My post' });
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### Rate Limit
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
npx viruagent-cli rate-limit-status --provider insta
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
## Workflows
|
|
100
|
+
|
|
101
|
+
### "Like all posts from @user"
|
|
102
|
+
|
|
103
|
+
1. `list-posts --username <user> --limit 20`
|
|
104
|
+
2. For each post: `like --post-id <shortcode>`
|
|
105
|
+
3. Rate limit delays are automatic (20~40s between likes)
|
|
106
|
+
|
|
107
|
+
### "Comment on all @user's posts"
|
|
108
|
+
|
|
109
|
+
1. `list-posts --username <user> --limit 20`
|
|
110
|
+
2. For each post:
|
|
111
|
+
a. Check if already commented (use `analyze-post` to see existing comments)
|
|
112
|
+
b. `analyze-post --post-id <shortcode>` — read thumbnail + caption
|
|
113
|
+
c. Visually analyze the thumbnail to understand the content
|
|
114
|
+
d. Write a contextual, natural comment (1~2 sentences, 1~2 emoji max)
|
|
115
|
+
e. `comment --post-id <shortcode> --text "..."`
|
|
116
|
+
3. Rate limit delays are automatic (5~7min between comments)
|
|
117
|
+
|
|
118
|
+
### "Follow @user and engage with their feed"
|
|
119
|
+
|
|
120
|
+
1. `follow --username <user>`
|
|
121
|
+
2. `list-posts --username <user> --limit 20`
|
|
122
|
+
3. Like + comment each post (as above)
|
|
123
|
+
|
|
124
|
+
### Comment Writing Rules
|
|
125
|
+
|
|
126
|
+
- Write in the same language as the post caption
|
|
127
|
+
- Be specific to the content — reference what's in the image/caption
|
|
128
|
+
- 1~2 sentences max, 1~2 emoji
|
|
129
|
+
- No hashtags in comments
|
|
130
|
+
- No generic phrases like "Nice post!" or "Great content!"
|
|
131
|
+
- Vary tone and style across comments — don't repeat patterns
|
|
132
|
+
- If the post is a video (릴스), analyze the thumbnail + caption to understand context
|
|
133
|
+
|
|
134
|
+
## Rate Limit Safety (New Account)
|
|
135
|
+
|
|
136
|
+
| Action | Delay | Hourly | Daily |
|
|
137
|
+
|--------|-------|--------|-------|
|
|
138
|
+
| Like | 20~40s | 15 | 500 |
|
|
139
|
+
| Comment | 5~7min | 5 | 100 |
|
|
140
|
+
| Follow | 1~2min | 15 | 250 |
|
|
141
|
+
| Unfollow | 1~2min | 10 | 200 |
|
|
142
|
+
| DM | 2~5min | 5 | 30 |
|
|
143
|
+
| Post | 1~2min | 3 | 25 |
|
|
144
|
+
|
|
145
|
+
All delays are randomized and applied automatically. Counters persist across sessions per userId.
|
|
146
|
+
|
|
147
|
+
## Error Recovery
|
|
148
|
+
|
|
149
|
+
| Error | Action |
|
|
150
|
+
|---|---|
|
|
151
|
+
| `hourly_limit` | Wait for the specified time, then retry |
|
|
152
|
+
| `daily_limit` | Wait until tomorrow |
|
|
153
|
+
| `rate_limit` (spam detected) | Wait 24~48 hours |
|
|
154
|
+
| `challenge` (302 redirect to /challenge/) | User must verify identity in browser |
|
|
155
|
+
| `SESSION_EXPIRED` | Run `login` again |
|
|
156
|
+
|
|
157
|
+
## Important Notes
|
|
158
|
+
|
|
159
|
+
- Always check `rate-limit-status` before bulk operations
|
|
160
|
+
- New accounts (< 20 days) have stricter limits
|
|
161
|
+
- Uniform action intervals trigger bot detection — delays are randomized
|
|
162
|
+
- challenge requires manual browser verification
|
|
163
|
+
- Session + counters stored locally at `~/.viruagent-cli/sessions/insta-session.json`
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: viruagent-naver
|
|
3
|
+
description: Naver Blog publishing via viruagent-cli. Login, categories, HTML-to-SE-Editor conversion, image upload, and publishing.
|
|
4
|
+
triggers:
|
|
5
|
+
- 네이버
|
|
6
|
+
- naver
|
|
7
|
+
- 네이버 블로그
|
|
8
|
+
- naver blog
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# viruagent-naver — Naver Blog Publishing Skill
|
|
12
|
+
|
|
13
|
+
You are a Naver blog publishing agent using `viruagent-cli`. Always use `--provider naver`.
|
|
14
|
+
|
|
15
|
+
## Step 1: Check authentication
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npx viruagent-cli status --provider naver
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
If not logged in:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
# Auto login
|
|
25
|
+
npx viruagent-cli login --provider naver --username <naver_id> --password <pass>
|
|
26
|
+
|
|
27
|
+
# Manual login (browser)
|
|
28
|
+
npx viruagent-cli login --provider naver --manual
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Environment variables: `NAVER_USERNAME` / `NAVER_PASSWORD`
|
|
32
|
+
|
|
33
|
+
Note: Naver has aggressive bot detection. Use `--manual` if auto login fails.
|
|
34
|
+
|
|
35
|
+
## Step 2: Get categories
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
npx viruagent-cli list-categories --provider naver
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Ask the user which category to use if not specified.
|
|
42
|
+
|
|
43
|
+
## Step 3: Create content
|
|
44
|
+
|
|
45
|
+
Write content in plain HTML. Do NOT use `data-ke-*` attributes — Naver's SE Editor ignores them.
|
|
46
|
+
|
|
47
|
+
### HTML Template
|
|
48
|
+
|
|
49
|
+
```html
|
|
50
|
+
<!-- 1. Hook -->
|
|
51
|
+
<blockquote>[One impactful sentence]</blockquote>
|
|
52
|
+
<p> </p>
|
|
53
|
+
|
|
54
|
+
<!-- 2. Introduction (2~3 paragraphs) -->
|
|
55
|
+
<p>[Context and reader empathy, 3~5 sentences]</p>
|
|
56
|
+
<p>[What this post covers]</p>
|
|
57
|
+
<p> </p>
|
|
58
|
+
|
|
59
|
+
<!-- 3. Body (3~4 sections) -->
|
|
60
|
+
<h2>[Section Title]</h2>
|
|
61
|
+
<p>[3~5 sentences with evidence]</p>
|
|
62
|
+
<p>[Analysis and implications]</p>
|
|
63
|
+
<p> </p>
|
|
64
|
+
|
|
65
|
+
<!-- Repeat for 2~3 more sections -->
|
|
66
|
+
|
|
67
|
+
<!-- 4. Summary -->
|
|
68
|
+
<h2>핵심 정리</h2>
|
|
69
|
+
<ul>
|
|
70
|
+
<li>[Takeaway 1]</li>
|
|
71
|
+
<li>[Takeaway 2]</li>
|
|
72
|
+
<li>[Takeaway 3]</li>
|
|
73
|
+
</ul>
|
|
74
|
+
<p> </p>
|
|
75
|
+
|
|
76
|
+
<!-- 5. Closing -->
|
|
77
|
+
<p>[Specific actionable suggestion]</p>
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### Naver-Specific Rules
|
|
81
|
+
|
|
82
|
+
- Use plain `<p>` tags — no `data-ke-*` attributes
|
|
83
|
+
- Use `<p> </p>` for spacing
|
|
84
|
+
- Use plain `<blockquote>` for hook — Naver converts it to a quotation component
|
|
85
|
+
- HTML is auto-converted to SE Editor components server-side
|
|
86
|
+
|
|
87
|
+
## Step 4: Publish
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
npx viruagent-cli publish \
|
|
91
|
+
--provider naver \
|
|
92
|
+
--title "Post Title" \
|
|
93
|
+
--content "<h2>...</h2><p>...</p>" \
|
|
94
|
+
--category <id> \
|
|
95
|
+
--tags "tag1,tag2,tag3,tag4,tag5" \
|
|
96
|
+
--visibility public \
|
|
97
|
+
--related-image-keywords "keyword1,keyword2" \
|
|
98
|
+
--image-upload-limit 1 \
|
|
99
|
+
--minimum-image-count 1
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
For drafts: Naver saves as private post (`save-draft` uses `--visibility private`).
|
|
103
|
+
|
|
104
|
+
### Image Rules
|
|
105
|
+
|
|
106
|
+
- Always include `--related-image-keywords` with 2~3 English keywords
|
|
107
|
+
- Set `--image-upload-limit 1` and `--minimum-image-count 1`
|
|
108
|
+
- Never use `--no-auto-upload-images` unless user explicitly asks
|
|
109
|
+
|
|
110
|
+
## Step 5: Verify
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
npx viruagent-cli list-posts --provider naver --limit 1
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
## Other Commands
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
npx viruagent-cli read-post --provider naver --post-id <id>
|
|
120
|
+
npx viruagent-cli list-posts --provider naver --limit 10
|
|
121
|
+
npx viruagent-cli logout --provider naver
|
|
122
|
+
```
|