Project Sentinel
A-share intelligent investment advisor system that fetches real-time market data via AkShare and generates trading recommendations using Gemini AI.
Usage
Important: You must cd to the project directory and activate the virtual environment first.
Generate Analysis Report
# Midday analysis (default), output to terminal
cd /Users/lan/Desktop/code/ai_sentiney && source .venv/bin/activate && python -m src.main --mode midday
# Closing review
cd /Users/lan/Desktop/code/ai_sentiney && source .venv/bin/activate && python -m src.main --mode close
# Morning brief
cd /Users/lan/Desktop/code/ai_sentiney && source .venv/bin/activate && python -m src.main --mode morning
# Generate and push to Telegram
cd /Users/lan/Desktop/code/ai_sentiney && source .venv/bin/activate && python -m src.main --mode midday --publish --publish-target telegram
# Push to both Feishu and Telegram
cd /Users/lan/Desktop/code/ai_sentiney && source .venv/bin/activate && python -m src.main --mode midday --publish --publish-target feishu telegram
# JSON output (for programmatic consumption)
cd /Users/lan/Desktop/code/ai_sentiney && source .venv/bin/activate && python -m src.main --mode midday --output json
Follow-up Analysis
# Follow up on the most recent analysis
cd /Users/lan/Desktop/code/ai_sentiney && source .venv/bin/activate && python -m src.main --ask "How is gold ETF doing today"
# Follow up on a specific date
cd /Users/lan/Desktop/code/ai_sentiney && source .venv/bin/activate && python -m src.main --ask "How is the semiconductor sector doing" --date 2026-02-07
# Follow up on closing analysis
cd /Users/lan/Desktop/code/ai_sentiney && source .venv/bin/activate && python -m src.main --ask "What should I do tomorrow" --mode close
Trend Analysis
# One-week trend (automatically detects trend keywords)
cd /Users/lan/Desktop/code/ai_sentiney && source .venv/bin/activate && python -m src.main --ask "What is the market trend for the past week"
# One-month trend
cd /Users/lan/Desktop/code/ai_sentiney && source .venv/bin/activate && python -m src.main --ask "How is my portfolio performing this month"
Use Cases
⚠️ Core Routing Rules (must be strictly followed):
- Only execute
--modecommands when the user explicitly asks to "run analysis / generate report / push" - All other questions (including follow-ups, evaluations, accuracy inquiries, casual chat) must use
--ask "the user's original question"and forward it to the Sentinel CLI - Do not fabricate your own answers to replace the CLI output. You must execute the command and return stdout verbatim to the user
- When unsure which command to use, default to
--ask
Generate Report (only when the user explicitly asks to generate / run / push)
When the user says:
- "Run midday analysis"
- "Generate closing review"
- "Analyze morning brief"
Execute: cd /Users/lan/Desktop/code/ai_sentiney && source .venv/bin/activate && python -m src.main --mode midday
Push to Telegram
When the user says:
- "Push analysis to Telegram"
- "Push to Telegram"
- "Send midday report"
Execute: cd /Users/lan/Desktop/code/ai_sentiney && source .venv/bin/activate && python -m src.main --mode midday --publish --publish-target telegram
Push to Both Feishu and Telegram
When the user says:
- "Push to all channels"
- "Send to both Feishu and Telegram"
Execute: cd /Users/lan/Desktop/code/ai_sentiney && source .venv/bin/activate && python -m src.main --mode midday --publish --publish-target feishu telegram
All Other Questions (Follow-ups, Accuracy, Evaluation, Casual Chat, etc.)
When the user says anything other than "generate report", including but not limited to:
- Follow-up on a specific asset: "How is gold ETF today", "Should I buy Zijin Mining"
- Accuracy-related: "Is it accurate", "accuracy", "hit rate", "is it reliable", "trustworthy", "win rate"
- Trend-related: "Market trend for the past week", "This month's portfolio trend"
- Any other question
Always execute: cd /Users/lan/Desktop/code/ai_sentiney && source .venv/bin/activate && python -m src.main --ask "the user's original question"
Return the stdout output verbatim to the user, do not process or fabricate content yourself.
Data Cache
- SQLite database:
data/sentinel.db - JSON snapshot:
data/latest_context.json - Supports historical replay:
--replayparameter