Skip to content

Commit 3c6827b

Browse files
committed
Add local setup instructions for copying/pasting keys
1 parent 0923e14 commit 3c6827b

4 files changed

Lines changed: 87 additions & 1 deletion

File tree

LOCAL_SETUP.md

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# Local Setup (Copy/Paste Keys)
2+
3+
When you `git clone` this repo, your API keys and passwords are **not** included.
4+
They live in:
5+
6+
- Local runs: your local `.env` file (not committed; see `.gitignore`)
7+
- GitHub Actions: repo secrets (Settings -> Secrets and variables -> Actions)
8+
9+
Important:
10+
11+
- GitHub does **not** let you view secret values after you save them. Keep your keys in a password manager / notes so you can paste them again later.
12+
13+
## 1) Clone
14+
15+
```bash
16+
git clone https://github.com/Rohan5commit/tech_losers_bot.git
17+
cd tech_losers_bot
18+
```
19+
20+
## 2) Create your `.env` file
21+
22+
```bash
23+
cp .env.example .env
24+
```
25+
26+
## 3) Paste your keys into `.env`
27+
28+
Open `.env` in an editor:
29+
30+
```bash
31+
# Terminal editor (simple)
32+
nano .env
33+
34+
# OR macOS TextEdit
35+
open -e .env
36+
```
37+
38+
Paste your values after the `=` signs. Example format (use your real values):
39+
40+
```env
41+
FMP_API_KEY=PASTE_HERE
42+
SMTP_USER=PASTE_HERE
43+
SMTP_PASSWORD=PASTE_HERE
44+
GMAIL_SENDER=PASTE_HERE
45+
EMAIL_RECIPIENTS=PASTE_HERE
46+
```
47+
48+
Notes:
49+
50+
- You can paste multiple FMP keys as `FMP_API_KEY_2` ... `FMP_API_KEY_6`.
51+
- Optional AI summary uses `NVIDIA_API_KEY` + `NVIDIA_MODEL`.
52+
53+
## 4) Install + run
54+
55+
```bash
56+
python3 -m venv .venv
57+
source .venv/bin/activate
58+
pip install -r requirements.txt
59+
60+
python3 main.py --status
61+
python3 main.py --no-wait
62+
```
63+

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@ US Technology Losers <= -5% (Close-to-Close), mcap >= $1B — YYYY-MM-DD
169169
### Body Contents
170170
- Run timestamp with timezone
171171
- Summary counts:
172+
- Total scanned
172173
- Candidates from losers feed
173174
- After -5% filter
174175
- After sector + mcap filter

main.py

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,19 @@
3535
from src.cache import ProfileCache
3636

3737

38+
def print_local_setup_help():
39+
print("\nLocal setup (copy/paste your keys):")
40+
print(" 1) Create .env from template:")
41+
print(" cp .env.example .env")
42+
print(" 2) Open .env and paste values after '=':")
43+
print(" nano .env")
44+
print(" # or on macOS")
45+
print(" open -e .env")
46+
print(" 3) Re-run:")
47+
print(" python3 main.py --status")
48+
print("Docs: README.md and LOCAL_SETUP.md")
49+
50+
3851
def wait_for_network(check_interval: int = 300):
3952
"""
4053
Wait for network connectivity, checking every 5 minutes until next day.
@@ -208,7 +221,8 @@ def main():
208221
print("Configuration errors:")
209222
for error in errors:
210223
print(f" - {error}")
211-
print("\nRun with --dry-run to test without email, or fix configuration.")
224+
print_local_setup_help()
225+
print("\nTip: use --dry-run to skip email sending (SMTP), but FMP_API_KEY is still required to scan.")
212226
return 1
213227

214228
print(f"\n{'='*60}")
@@ -219,6 +233,7 @@ def main():
219233
if not FMP_API_KEY:
220234
print("\n[Error] FMP_API_KEY is required!")
221235
print("Get your free API key at: https://financialmodelingprep.com/developer/docs/")
236+
print_local_setup_help()
222237
return 1
223238

224239
# Initialize provider router

src/config.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,3 +149,10 @@ def print_config_status():
149149
if NVIDIA_MODEL:
150150
print(f"AI Model: {NVIDIA_MODEL}")
151151
print("=" * 50)
152+
153+
if not FMP_API_KEY:
154+
print("\nNext steps (local):")
155+
print(" cp .env.example .env")
156+
print(" open -e .env # or: nano .env")
157+
print(" python3 main.py --status")
158+
print("See: LOCAL_SETUP.md")

0 commit comments

Comments
 (0)