-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtwitter-agent.bat
More file actions
56 lines (45 loc) · 1.27 KB
/
twitter-agent.bat
File metadata and controls
56 lines (45 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
@echo off
REM Twitter Agent Launcher - Activates venv and runs the agent
REM Usage: twitter-agent.bat "<twitter task>" [max_steps]
setlocal enabledelayedexpansion
REM Get the directory where this batch file is located
set "SCRIPT_DIR=%~dp0"
cd /d "%SCRIPT_DIR%"
REM Check if venv exists
if not exist ".venv\Scripts\activate.bat" (
echo [ERROR] Virtual environment not found!
echo Please run: python run_agent.py "x.com" "test" 0
echo This will create the venv automatically.
pause
exit /b 1
)
REM Activate virtual environment
call .venv\Scripts\activate.bat
REM Check if task argument is provided
if "%~1"=="" (
echo Usage: twitter-agent.bat "<twitter task>" [max_steps]
echo.
echo Examples:
echo twitter-agent.bat "search for AI accounts and follow 10" 0
echo twitter-agent.bat "post a tweet about crypto" 0
echo twitter-agent.bat "find crypto tweets and like 5 of them" 0
echo.
pause
exit /b 1
)
REM Get task and steps
set "TASK=%~1"
set "STEPS=%~2"
REM Default to unlimited steps if not provided
if "%STEPS%"=="" set "STEPS=0"
REM Run the agent
echo Starting Twitter Agent...
echo Task: %TASK%
echo Steps: %STEPS%
echo.
python run_agent.py "x.com" "%TASK%" %STEPS%
REM Deactivate venv
deactivate
echo.
echo Agent finished.
pause