viruagent-cli 0.5.1 → 0.6.0

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.
Files changed (35) hide show
  1. package/package.json +1 -1
  2. package/skills/persona-blogger/SKILL.md +47 -0
  3. package/skills/persona-influencer-manager/SKILL.md +40 -0
  4. package/skills/persona-sns-marketer/SKILL.md +38 -0
  5. package/skills/recipe-blog-publish/SKILL.md +59 -0
  6. package/skills/recipe-cross-post/SKILL.md +41 -0
  7. package/skills/recipe-daily-engagement/SKILL.md +57 -0
  8. package/skills/recipe-engage-feed/SKILL.md +56 -0
  9. package/skills/recipe-grow-followers/SKILL.md +52 -0
  10. package/skills/va-insta/SKILL.md +64 -0
  11. package/skills/va-insta-comment/SKILL.md +59 -0
  12. package/skills/va-insta-dm/SKILL.md +51 -0
  13. package/skills/va-insta-feed/SKILL.md +72 -0
  14. package/skills/va-insta-follow/SKILL.md +42 -0
  15. package/skills/va-insta-like/SKILL.md +55 -0
  16. package/skills/va-insta-login/SKILL.md +57 -0
  17. package/skills/va-naver/SKILL.md +43 -0
  18. package/skills/va-naver-categories/SKILL.md +25 -0
  19. package/skills/va-naver-draft/SKILL.md +33 -0
  20. package/skills/va-naver-login/SKILL.md +58 -0
  21. package/skills/va-naver-posts/SKILL.md +38 -0
  22. package/skills/va-naver-publish/SKILL.md +97 -0
  23. package/skills/va-shared/SKILL.md +133 -0
  24. package/skills/va-tistory/SKILL.md +42 -0
  25. package/skills/va-tistory-categories/SKILL.md +37 -0
  26. package/skills/va-tistory-draft/SKILL.md +31 -0
  27. package/skills/va-tistory-login/SKILL.md +54 -0
  28. package/skills/va-tistory-posts/SKILL.md +38 -0
  29. package/skills/va-tistory-publish/SKILL.md +90 -0
  30. package/src/providers/insta/index.js +25 -4
  31. package/src/runner.js +26 -16
  32. package/skills/viruagent-insta.md +0 -163
  33. package/skills/viruagent-naver.md +0 -122
  34. package/skills/viruagent-tistory.md +0 -117
  35. package/skills/viruagent.md +0 -77
@@ -0,0 +1,54 @@
1
+ ---
2
+ name: va-tistory-login
3
+ version: 1.0.0
4
+ description: "Tistory: 카카오 계정으로 로그인 (2FA 지원)"
5
+ metadata:
6
+ category: "command"
7
+ provider: "tistory"
8
+ requires:
9
+ bins: ["viruagent-cli"]
10
+ cliHelp: "viruagent-cli login --help"
11
+ ---
12
+
13
+ # va-tistory-login — Tistory 로그인
14
+
15
+ ## 인증 상태 확인
16
+
17
+ ```bash
18
+ npx viruagent-cli status --provider tistory
19
+ ```
20
+
21
+ ## 로그인
22
+
23
+ ```bash
24
+ npx viruagent-cli login --provider tistory --username <kakao_id> --password <pass> --headless
25
+ ```
26
+
27
+ ### 옵션
28
+
29
+ | 플래그 | 설명 | 기본값 |
30
+ |--------|------|--------|
31
+ | `--username` | 카카오 아이디 | - |
32
+ | `--password` | 카카오 비밀번호 | - |
33
+ | `--headless` | 헤드리스 브라우저 모드 | false |
34
+ | `--two-factor-code` | 2FA 인증 코드 | - |
35
+
36
+ ### 2FA 처리
37
+
38
+ 로그인 결과가 `pending_2fa`인 경우:
39
+ 1. 사용자에게 카카오 앱에서 인증 승인 요청
40
+ 2. 승인 후 `status` 재확인
41
+
42
+ ### 환경변수
43
+
44
+ `TISTORY_USERNAME` / `TISTORY_PASSWORD` 설정 시 자동 사용.
45
+
46
+ ## 로그아웃
47
+
48
+ ```bash
49
+ npx viruagent-cli logout --provider tistory
50
+ ```
51
+
52
+ ## See Also
53
+
54
+ va-tistory, va-shared
@@ -0,0 +1,38 @@
1
+ ---
2
+ name: va-tistory-posts
3
+ version: 1.0.0
4
+ description: "Tistory: 글 목록 조회 및 개별 글 읽기"
5
+ metadata:
6
+ category: "command"
7
+ provider: "tistory"
8
+ requires:
9
+ bins: ["viruagent-cli"]
10
+ cliHelp: "viruagent-cli list-posts --help"
11
+ ---
12
+
13
+ # va-tistory-posts — 글 목록 & 읽기
14
+
15
+ ## 글 목록
16
+
17
+ ```bash
18
+ npx viruagent-cli list-posts --provider tistory --limit 10
19
+ ```
20
+
21
+ | 플래그 | 설명 | 기본값 |
22
+ |--------|------|--------|
23
+ | `--limit` | 조회할 글 수 | 20 |
24
+
25
+ ## 글 읽기
26
+
27
+ ```bash
28
+ npx viruagent-cli read-post --provider tistory --post-id <id>
29
+ ```
30
+
31
+ | 플래그 | 설명 |
32
+ |--------|------|
33
+ | `--post-id` | 글 ID |
34
+ | `--include-draft` | 임시저장 포함 |
35
+
36
+ ## See Also
37
+
38
+ va-tistory, va-shared
@@ -0,0 +1,90 @@
1
+ ---
2
+ name: va-tistory-publish
3
+ version: 1.0.0
4
+ description: "Tistory: 블로그 글 발행 (HTML 콘텐츠 + 이미지)"
5
+ metadata:
6
+ category: "command"
7
+ provider: "tistory"
8
+ requires:
9
+ bins: ["viruagent-cli"]
10
+ cliHelp: "viruagent-cli publish --help"
11
+ ---
12
+
13
+ # va-tistory-publish — Tistory 글 발행
14
+
15
+ ## 사용법
16
+
17
+ ```bash
18
+ npx viruagent-cli publish \
19
+ --provider tistory \
20
+ --title "Post Title" \
21
+ --content "<h2>...</h2><p>...</p>" \
22
+ --category <id> \
23
+ --tags "tag1,tag2,tag3,tag4,tag5" \
24
+ --visibility public \
25
+ --related-image-keywords "keyword1,keyword2" \
26
+ --image-upload-limit 2 \
27
+ --minimum-image-count 1
28
+ ```
29
+
30
+ ### 옵션
31
+
32
+ | 플래그 | 설명 | 기본값 |
33
+ |--------|------|--------|
34
+ | `--title` | 글 제목 | (필수) |
35
+ | `--content` | HTML 콘텐츠 | - |
36
+ | `--content-file` | HTML 파일 경로 (절대) | - |
37
+ | `--category` | 카테고리 ID | - |
38
+ | `--tags` | 쉼표 구분 태그 (5개) | - |
39
+ | `--visibility` | public / private | public |
40
+ | `--related-image-keywords` | 이미지 검색 키워드 (영어) | - |
41
+ | `--image-upload-limit` | 최대 이미지 수 | 1 |
42
+ | `--minimum-image-count` | 최소 이미지 수 | 1 |
43
+ | `--dry-run` | 파라미터만 검증 | false |
44
+
45
+ ## HTML 템플릿
46
+
47
+ ```html
48
+ <!-- 1. Hook -->
49
+ <blockquote data-ke-style="style2">[한 문장 임팩트]</blockquote>
50
+ <p data-ke-size="size16">&nbsp;</p>
51
+
52
+ <!-- 2. 서론 (2~3단락) -->
53
+ <p data-ke-size="size18">[맥락과 공감, 3~5문장]</p>
54
+ <p data-ke-size="size18">[이 글에서 다룰 내용]</p>
55
+ <p data-ke-size="size16">&nbsp;</p>
56
+
57
+ <!-- 3. 본문 (3~4 섹션) -->
58
+ <h2>[섹션 제목]</h2>
59
+ <p data-ke-size="size18">[3~5문장, 근거 포함]</p>
60
+ <p data-ke-size="size18">[분석과 시사점]</p>
61
+ <p data-ke-size="size16">&nbsp;</p>
62
+
63
+ <!-- 4. 핵심 정리 -->
64
+ <h2>핵심 정리</h2>
65
+ <ul>
66
+ <li>[핵심 1]</li>
67
+ <li>[핵심 2]</li>
68
+ <li>[핵심 3]</li>
69
+ </ul>
70
+ <p data-ke-size="size16">&nbsp;</p>
71
+
72
+ <!-- 5. 마무리 -->
73
+ <p data-ke-size="size18">[구체적 실행 제안]</p>
74
+ ```
75
+
76
+ ## 이미지 규칙
77
+
78
+ - `--related-image-keywords`에 영어 키워드 2~3개 항상 포함
79
+ - `--image-upload-limit 2`, `--minimum-image-count 1` 설정
80
+ - `--no-auto-upload-images`는 사용자 명시 요청 시만
81
+
82
+ ## 발행 후 검증
83
+
84
+ ```bash
85
+ npx viruagent-cli list-posts --provider tistory --limit 1
86
+ ```
87
+
88
+ ## See Also
89
+
90
+ va-tistory, va-tistory-draft, va-shared
@@ -225,12 +225,33 @@ const createInstaProvider = ({ sessionPath }) => {
225
225
  });
226
226
  },
227
227
 
228
- async publish({ imageUrl, imagePath, caption = '' } = {}) {
228
+ async publish({ imageUrl, imagePath, caption = '', content, title, relatedImageKeywords = [], imageUrls = [] } = {}) {
229
229
  return withProviderSession(async () => {
230
- if (!imageUrl && !imagePath) {
231
- throw new Error('Either imageUrl or imagePath is required.');
230
+ // Use content as caption if caption is not provided
231
+ const finalCaption = caption || content || '';
232
+
233
+ // Resolve image: explicit imageUrl/imagePath > imageUrls > relatedImageKeywords search
234
+ let resolvedImageUrl = imageUrl;
235
+ if (!resolvedImageUrl && !imagePath) {
236
+ if (imageUrls.length > 0) {
237
+ resolvedImageUrl = imageUrls[0];
238
+ } else if (relatedImageKeywords.length > 0) {
239
+ const { buildKeywordImageCandidates } = require('../tistory/imageSources');
240
+ for (const keyword of relatedImageKeywords) {
241
+ const candidates = await buildKeywordImageCandidates(keyword);
242
+ if (candidates.length > 0) {
243
+ resolvedImageUrl = candidates[0];
244
+ break;
245
+ }
246
+ }
247
+ }
248
+ }
249
+
250
+ if (!resolvedImageUrl && !imagePath) {
251
+ throw new Error('No image found. Provide --image-urls, --related-image-keywords, or use imageUrl/imagePath.');
232
252
  }
233
- const result = await instaApi.publishPost({ imageUrl, imagePath, caption });
253
+
254
+ const result = await instaApi.publishPost({ imageUrl: resolvedImageUrl, imagePath, caption: finalCaption });
234
255
  return {
235
256
  provider: 'insta',
236
257
  mode: 'publish',
package/src/runner.js CHANGED
@@ -47,26 +47,36 @@ const runCommand = async (command, opts = {}) => {
47
47
 
48
48
  if (command === 'install-skill') {
49
49
  const skillsDir = path.resolve(__dirname, '..', 'skills');
50
- const skillFiles = ['viruagent.md', 'viruagent-tistory.md', 'viruagent-naver.md', 'viruagent-insta.md'];
51
-
52
50
  const targetDir = opts.target
53
51
  || path.join(os.homedir(), '.claude', 'commands');
54
- fs.mkdirSync(targetDir, { recursive: true });
55
-
56
- const installed = [];
57
- for (const file of skillFiles) {
58
- const src = path.join(skillsDir, file);
59
- if (!fs.existsSync(src)) continue;
60
- const dest = path.join(targetDir, file);
61
- fs.copyFileSync(src, dest);
62
- installed.push(dest);
63
- }
64
52
 
65
- if (installed.length === 0) {
66
- throw createError('FILE_NOT_FOUND', 'Skill files not found in package');
53
+ // Install only the main router skill as /viruagent
54
+ const routerSrc = path.join(skillsDir, 'va-shared', 'SKILL.md');
55
+ if (!fs.existsSync(routerSrc)) {
56
+ throw createError('FILE_NOT_FOUND', 'Router skill (va-shared/SKILL.md) not found');
67
57
  }
68
58
 
69
- return { installed: true, paths: installed, count: installed.length };
59
+ const destDir = path.join(targetDir, 'viruagent');
60
+ fs.mkdirSync(destDir, { recursive: true });
61
+ const dest = path.join(destDir, 'SKILL.md');
62
+ fs.copyFileSync(routerSrc, dest);
63
+
64
+ // Inject actual skills directory path into the installed SKILL.md
65
+ const skillsAbsPath = skillsDir;
66
+ let content = fs.readFileSync(dest, 'utf-8');
67
+ content = content.replace(
68
+ 'SKILLS_DIR: <viruagent-cli 설치 경로>/skills/',
69
+ `SKILLS_DIR: ${skillsAbsPath}/`
70
+ );
71
+ fs.writeFileSync(dest, content, 'utf-8');
72
+
73
+ return {
74
+ installed: true,
75
+ paths: [dest],
76
+ count: 1,
77
+ skillsDir: skillsAbsPath,
78
+ note: 'Only /viruagent is registered as a slash command. Sub-skills are loaded on demand from ' + skillsAbsPath,
79
+ };
70
80
  }
71
81
 
72
82
  const manager = createProviderManager();
@@ -110,7 +120,7 @@ const runCommand = async (command, opts = {}) => {
110
120
 
111
121
  case 'publish': {
112
122
  const content = readContent(opts);
113
- if (!content) {
123
+ if (!content && providerName !== 'insta') {
114
124
  throw createError('MISSING_CONTENT', 'publish requires --content or --content-file', 'viruagent-cli publish --spec');
115
125
  }
116
126
  return withProvider(() =>
@@ -1,163 +0,0 @@
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`
@@ -1,122 +0,0 @@
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>&nbsp;</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>&nbsp;</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>&nbsp;</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>&nbsp;</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>&nbsp;</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
- ```
@@ -1,117 +0,0 @@
1
- ---
2
- name: viruagent-tistory
3
- description: Tistory blog publishing via viruagent-cli. Login, categories, content creation, image upload, and publishing.
4
- triggers:
5
- - 티스토리
6
- - tistory
7
- - 티스토리 블로그
8
- - tistory blog
9
- ---
10
-
11
- # viruagent-tistory — Tistory Blog Publishing Skill
12
-
13
- You are a Tistory blog publishing agent using `viruagent-cli`. Always use `--provider tistory`.
14
-
15
- ## Step 1: Check authentication
16
-
17
- ```bash
18
- npx viruagent-cli status --provider tistory
19
- ```
20
-
21
- If not logged in:
22
-
23
- ```bash
24
- npx viruagent-cli login --provider tistory --username <kakao_id> --password <pass> --headless
25
- ```
26
-
27
- If 2FA is required (`pending_2fa`), ask the user to approve in Kakao app, then retry status check.
28
-
29
- Environment variables: `TISTORY_USERNAME` / `TISTORY_PASSWORD`
30
-
31
- ## Step 2: Get categories
32
-
33
- ```bash
34
- npx viruagent-cli list-categories --provider tistory
35
- ```
36
-
37
- Ask the user which category to use if not specified.
38
-
39
- ## Step 3: Create content
40
-
41
- Write content in HTML using the Tistory template. Tistory uses `data-ke-*` attributes.
42
-
43
- ### HTML Template
44
-
45
- ```html
46
- <!-- 1. Hook -->
47
- <blockquote data-ke-style="style2">[One impactful sentence]</blockquote>
48
- <p data-ke-size="size16">&nbsp;</p>
49
-
50
- <!-- 2. Introduction (2~3 paragraphs) -->
51
- <p data-ke-size="size18">[Context and reader empathy, 3~5 sentences]</p>
52
- <p data-ke-size="size18">[What this post covers]</p>
53
- <p data-ke-size="size16">&nbsp;</p>
54
-
55
- <!-- 3. Body (3~4 sections) -->
56
- <h2>[Section Title]</h2>
57
- <p data-ke-size="size18">[3~5 sentences with evidence]</p>
58
- <p data-ke-size="size18">[Analysis and implications]</p>
59
- <p data-ke-size="size16">&nbsp;</p>
60
-
61
- <!-- Repeat for 2~3 more sections -->
62
-
63
- <!-- 4. Summary -->
64
- <h2>핵심 정리</h2>
65
- <ul>
66
- <li>[Takeaway 1]</li>
67
- <li>[Takeaway 2]</li>
68
- <li>[Takeaway 3]</li>
69
- </ul>
70
- <p data-ke-size="size16">&nbsp;</p>
71
-
72
- <!-- 5. Closing -->
73
- <p data-ke-size="size18">[Specific actionable suggestion]</p>
74
- ```
75
-
76
- ### Tistory-Specific Rules
77
-
78
- - Use `<p data-ke-size="size18">` for body text
79
- - Use `<p data-ke-size="size16">&nbsp;</p>` for spacing
80
- - Use `<blockquote data-ke-style="style2">` for hook
81
-
82
- ## Step 4: Publish
83
-
84
- ```bash
85
- npx viruagent-cli publish \
86
- --provider tistory \
87
- --title "Post Title" \
88
- --content "<h2>...</h2><p>...</p>" \
89
- --category <id> \
90
- --tags "tag1,tag2,tag3,tag4,tag5" \
91
- --visibility public \
92
- --related-image-keywords "keyword1,keyword2" \
93
- --image-upload-limit 2 \
94
- --minimum-image-count 1
95
- ```
96
-
97
- For drafts: `save-draft` instead of `publish`.
98
-
99
- ### Image Rules
100
-
101
- - Always include `--related-image-keywords` with 2~3 English keywords
102
- - Set `--image-upload-limit 2` and `--minimum-image-count 1`
103
- - Never use `--no-auto-upload-images` unless user explicitly asks
104
-
105
- ## Step 5: Verify
106
-
107
- ```bash
108
- npx viruagent-cli list-posts --provider tistory --limit 1
109
- ```
110
-
111
- ## Other Commands
112
-
113
- ```bash
114
- npx viruagent-cli read-post --provider tistory --post-id <id>
115
- npx viruagent-cli list-posts --provider tistory --limit 10
116
- npx viruagent-cli logout --provider tistory
117
- ```