Tyche Lite — Free Invoice Preview
Track up to 5 invoices and get a friendly reminder template.
Free vs Pro
| Feature |
Tyche Lite (Free) |
Tyche Pro |
| Invoices |
5 max |
Unlimited |
| Tax calculation |
❌ |
✅ |
| Late fee calculation |
❌ |
✅ |
| Reminder tiers |
1 (friendly only) |
3 tiers |
| Multi-currency |
❌ |
✅ |
| Project grouping |
❌ |
✅ |
| Aged receivables |
❌ |
✅ 30/60/90d |
| Analytics export |
❌ |
✅ |
👉 Upgrade: openclaw skills install tyche-pro — key at ko-fi.com/s/4e0d922f4c
💰 Bundle deal: all 5 Pro skills for $29 → ko-fi.com/s/7625accf3f (save $16)
Step 1 — Install
pip3 install rich --break-system-packages --quiet
Step 2 — Invoice overview (Lite)
import os, csv, re
from datetime import datetime, timedelta
from rich.console import Console
from rich.table import Table
from rich.panel import Panel
from rich import box
console = Console()
INVOICES_FILE = os.environ.get("INVOICES_FILE","").strip()
YOUR_NAME = os.environ.get("YOUR_NAME","Your Name")
CURRENCY = os.environ.get("CURRENCY","USD").upper()
SYM = {"USD":"$","EUR":"€","GBP":"£"}.get(CURRENCY,"$")
INVOICE_LIMIT = 5 # Lite cap
now = datetime.now()
def fmt(a): return f"{SYM}{a:,.2f}"
def parse_amount(r):
c = re.sub(r"[^0-9.]","",str(r)) or "0"
try: return float(c) if c.count(".")<=1 else 0.0
except: return 0.0
def parse_date(raw):
for f in ("%Y-%m-%d","%m/%d/%Y","%d/%m/%Y"):
try: return datetime.strptime(raw.strip(),f)
except: pass
return None
invoices = []
if INVOICES_FILE and os.path.exists(INVOICES_FILE):
with open(INVOICES_FILE,encoding="utf-8",errors="replace") as f:
reader = csv.DictReader(f)
for i,row in enumerate(reader,1):
if i > INVOICE_LIMIT:
console.print(f"[yellow]⚠️ Lite limit: showing first {INVOICE_LIMIT} invoices only. Upgrade to Pro for unlimited.[/yellow]")
break
rk = {k.lower().strip():v.strip() for k,v in row.items()}
invoices.append({
"inv_number": rk.get("inv_number",f"INV-{i:04d}"),
"client_name": rk.get("client_name","Client"),
"client_email": rk.get("client_email",""),
"description": rk.get("description","Services"),
"amount": parse_amount(rk.get("amount","0")),
"due_date": rk.get("due_date",""),
"status": rk.get("status","unpaid").lower(),
})
else:
console.print("[yellow]ℹ️ No INVOICES_FILE — using demo data.[/yellow]\n")
invoices = [
{"inv_number":"INV-0001","client_name":"Acme Corp","client_email":"billing@acme.com","description":"Website redesign","amount":2500,"due_date":(now-timedelta(days=15)).strftime("%Y-%m-%d"),"status":"overdue"},
{"inv_number":"INV-0002","client_name":"Globex Inc","client_email":"ap@globex.com","description":"Consulting","amount":1800,"due_date":(now+timedelta(days=10)).strftime("%Y-%m-%d"),"status":"unpaid"},
{"inv_number":"INV-0003","client_name":"Initech Ltd","client_email":"pay@initech.com","description":"Logo design","amount":750,"due_date":(now-timedelta(days=5)).strftime("%Y-%m-%d"),"status":"paid"},
]
for inv in invoices:
due = parse_date(inv["due_date"])
inv["due_dt"] = due
inv["days_late"] = max(0,(now-due).days) if due and inv["status"] in ("overdue","unpaid") else 0
total_invoiced = sum(i["amount"] for i in invoices)
total_paid = sum(i["amount"] for i in invoices if i["status"]=="paid")
total_outstanding = total_invoiced - total_paid
console.print()
console.print(Panel.fit(
f"[bold yellow]⚖️ Tyche Lite — Invoice Overview[/bold yellow]\n"
f"Invoiced: [white]{fmt(total_invoiced)}[/white] Paid: [green]{fmt(total_paid)}[/green] Outstanding: [red]{fmt(total_outstanding)}[/red]\n"
f"[dim]Lite: showing {len(invoices)}/{INVOICE_LIMIT} invoices max[/dim]",
border_style="yellow"
))
SC = {"paid":"green","unpaid":"yellow","overdue":"red","partial":"cyan"}
console.print()
tbl = Table(title="Invoice Status", box=box.ROUNDED, border_style="yellow")
tbl.add_column("Inv #", width=10, style="dim")
tbl.add_column("Client", width=18, style="cyan")
tbl.add_column("Amount", width=12, justify="right")
tbl.add_column("Due", width=12, style="dim")
tbl.add_column("Late", width=8, style="red", justify="right")
tbl.add_column("Status", width=10)
for inv in sorted(invoices, key=lambda x: -(x["days_late"] or 0)):
sc = SC.get(inv["status"],"white")
late = f"{inv['days_late']}d" if inv["days_late"] else "—"
tbl.add_row(inv["inv_number"],inv["client_name"][:16],fmt(inv["amount"]),inv["due_date"],late,f"[{sc}]{inv['status'].title()}[/{sc}]")
console.print(tbl)
# 1 reminder (Lite: friendly only)
overdue = [i for i in invoices if i["days_late"] > 0]
if overdue:
inv = overdue[0]
console.print()
console.print(Panel(
f"To: {inv['client_email']}\nSubject: Friendly Reminder — Invoice {inv['inv_number']}\n\n"
f"Dear {inv['client_name']},\n\n"
f"I hope you're well. Invoice {inv['inv_number']} for {fmt(inv['amount'])} was due {inv['due_date']}. "
f"Could you confirm when payment will be processed?\n\n"
f"Kind regards,\n{YOUR_NAME}",
title=f"[yellow]Friendly Reminder — {inv['client_name']} ({inv['days_late']}d overdue)[/yellow]",
border_style="yellow"
))
if len(overdue) > 1:
console.print(f"[dim]+ {len(overdue)-1} more overdue invoice(s) — upgrade to Pro for all reminder tiers.[/dim]")
console.print()
console.print(Panel(
f"[bold yellow]🔓 Want more?[/bold yellow]\n\n"
f"Tyche Pro handles [bold]unlimited invoices[/bold], calculates [bold]late fees & tax[/bold], "
f"sends [bold]3-tier reminders[/bold], groups by project, and gives you an aged receivables dashboard.\n\n"
f"[bold cyan]openclaw skills install tyche-pro[/bold cyan]\n"
f"Get your key → [bold]ko-fi.com/s/4e0d922f4c[/bold]",
title="Upgrade to Tyche Pro",
border_style="cyan"
))
1---2name: tyche-lite3description: "Tyche Lite — Invoice Tracker (Free). Process up to 5 invoices from a CSV, see payment status, and get a friendly reminder template. A free preview of what Tyche Pro does for your full client book."4version: "1.0.4"5metadata:6 source: https://skillmd.com/skills/lord1egypt/tyche-lite7 openclaw:8 requires:9 env: []10 bins: [python3, pip3]11 primaryEnv: "INVOICES_FILE"12 homepage: https://clawhub.ai/occupythemilkyway/tyche-lite13 emoji: "⚖️"14 tags: [invoicing, payments, billing, business, freelance, free, lite, tyche]15 envVars:16 - name: INVOICES_FILE17 required: false18 description: "Path to invoices CSV (client_name, client_email, description, amount, due_date, status). Max 5 rows in Lite."19 default: ""20 - name: YOUR_NAME21 required: false22 description: Your name or company23 default: "Your Name"24 - name: CURRENCY25 required: false26 description: "Currency: USD, EUR, GBP"27 default: "USD"28---2930# Tyche Lite — Free Invoice Preview3132Track up to 5 invoices and get a friendly reminder template.3334## Free vs Pro3536| Feature | Tyche Lite (Free) | Tyche Pro |37|---------|------------------|-----------|38| Invoices | **5 max** | Unlimited |39| Tax calculation | ❌ | ✅ |40| Late fee calculation | ❌ | ✅ |41| Reminder tiers | 1 (friendly only) | 3 tiers |42| Multi-currency | ❌ | ✅ |43| Project grouping | ❌ | ✅ |44| Aged receivables | ❌ | ✅ 30/60/90d |45| Analytics export | ❌ | ✅ |4647👉 **Upgrade:** `openclaw skills install tyche-pro` — key at **ko-fi.com/s/4e0d922f4c**4849💰 **Bundle deal:** all 5 Pro skills for **$29** → **ko-fi.com/s/7625accf3f** (save $16)5051---5253## Step 1 — Install5455```bash56pip3 install rich --break-system-packages --quiet57```5859---6061## Step 2 — Invoice overview (Lite)6263```python64import os, csv, re65from datetime import datetime, timedelta66from rich.console import Console67from rich.table import Table68from rich.panel import Panel69from rich import box7071console = Console()7273INVOICES_FILE = os.environ.get("INVOICES_FILE","").strip()74YOUR_NAME = os.environ.get("YOUR_NAME","Your Name")75CURRENCY = os.environ.get("CURRENCY","USD").upper()76SYM = {"USD":"$","EUR":"€","GBP":"£"}.get(CURRENCY,"$")77INVOICE_LIMIT = 5 # Lite cap78now = datetime.now()7980def fmt(a): return f"{SYM}{a:,.2f}"81def parse_amount(r):82 c = re.sub(r"[^0-9.]","",str(r)) or "0"83 try: return float(c) if c.count(".")<=1 else 0.084 except: return 0.085def parse_date(raw):86 for f in ("%Y-%m-%d","%m/%d/%Y","%d/%m/%Y"):87 try: return datetime.strptime(raw.strip(),f)88 except: pass89 return None9091invoices = []92if INVOICES_FILE and os.path.exists(INVOICES_FILE):93 with open(INVOICES_FILE,encoding="utf-8",errors="replace") as f:94 reader = csv.DictReader(f)95 for i,row in enumerate(reader,1):96 if i > INVOICE_LIMIT:97 console.print(f"[yellow]⚠️ Lite limit: showing first {INVOICE_LIMIT} invoices only. Upgrade to Pro for unlimited.[/yellow]")98 break99 rk = {k.lower().strip():v.strip() for k,v in row.items()}100 invoices.append({101 "inv_number": rk.get("inv_number",f"INV-{i:04d}"),102 "client_name": rk.get("client_name","Client"),103 "client_email": rk.get("client_email",""),104 "description": rk.get("description","Services"),105 "amount": parse_amount(rk.get("amount","0")),106 "due_date": rk.get("due_date",""),107 "status": rk.get("status","unpaid").lower(),108 })109else:110 console.print("[yellow]ℹ️ No INVOICES_FILE — using demo data.[/yellow]\n")111 invoices = [112 {"inv_number":"INV-0001","client_name":"Acme Corp","client_email":"billing@acme.com","description":"Website redesign","amount":2500,"due_date":(now-timedelta(days=15)).strftime("%Y-%m-%d"),"status":"overdue"},113 {"inv_number":"INV-0002","client_name":"Globex Inc","client_email":"ap@globex.com","description":"Consulting","amount":1800,"due_date":(now+timedelta(days=10)).strftime("%Y-%m-%d"),"status":"unpaid"},114 {"inv_number":"INV-0003","client_name":"Initech Ltd","client_email":"pay@initech.com","description":"Logo design","amount":750,"due_date":(now-timedelta(days=5)).strftime("%Y-%m-%d"),"status":"paid"},115 ]116117for inv in invoices:118 due = parse_date(inv["due_date"])119 inv["due_dt"] = due120 inv["days_late"] = max(0,(now-due).days) if due and inv["status"] in ("overdue","unpaid") else 0121122total_invoiced = sum(i["amount"] for i in invoices)123total_paid = sum(i["amount"] for i in invoices if i["status"]=="paid")124total_outstanding = total_invoiced - total_paid125126console.print()127console.print(Panel.fit(128 f"[bold yellow]⚖️ Tyche Lite — Invoice Overview[/bold yellow]\n"129 f"Invoiced: [white]{fmt(total_invoiced)}[/white] Paid: [green]{fmt(total_paid)}[/green] Outstanding: [red]{fmt(total_outstanding)}[/red]\n"130 f"[dim]Lite: showing {len(invoices)}/{INVOICE_LIMIT} invoices max[/dim]",131 border_style="yellow"132))133134SC = {"paid":"green","unpaid":"yellow","overdue":"red","partial":"cyan"}135console.print()136tbl = Table(title="Invoice Status", box=box.ROUNDED, border_style="yellow")137tbl.add_column("Inv #", width=10, style="dim")138tbl.add_column("Client", width=18, style="cyan")139tbl.add_column("Amount", width=12, justify="right")140tbl.add_column("Due", width=12, style="dim")141tbl.add_column("Late", width=8, style="red", justify="right")142tbl.add_column("Status", width=10)143for inv in sorted(invoices, key=lambda x: -(x["days_late"] or 0)):144 sc = SC.get(inv["status"],"white")145 late = f"{inv['days_late']}d" if inv["days_late"] else "—"146 tbl.add_row(inv["inv_number"],inv["client_name"][:16],fmt(inv["amount"]),inv["due_date"],late,f"[{sc}]{inv['status'].title()}[/{sc}]")147console.print(tbl)148149# 1 reminder (Lite: friendly only)150overdue = [i for i in invoices if i["days_late"] > 0]151if overdue:152 inv = overdue[0]153 console.print()154 console.print(Panel(155 f"To: {inv['client_email']}\nSubject: Friendly Reminder — Invoice {inv['inv_number']}\n\n"156 f"Dear {inv['client_name']},\n\n"157 f"I hope you're well. Invoice {inv['inv_number']} for {fmt(inv['amount'])} was due {inv['due_date']}. "158 f"Could you confirm when payment will be processed?\n\n"159 f"Kind regards,\n{YOUR_NAME}",160 title=f"[yellow]Friendly Reminder — {inv['client_name']} ({inv['days_late']}d overdue)[/yellow]",161 border_style="yellow"162 ))163 if len(overdue) > 1:164 console.print(f"[dim]+ {len(overdue)-1} more overdue invoice(s) — upgrade to Pro for all reminder tiers.[/dim]")165166console.print()167console.print(Panel(168 f"[bold yellow]🔓 Want more?[/bold yellow]\n\n"169 f"Tyche Pro handles [bold]unlimited invoices[/bold], calculates [bold]late fees & tax[/bold], "170 f"sends [bold]3-tier reminders[/bold], groups by project, and gives you an aged receivables dashboard.\n\n"171 f"[bold cyan]openclaw skills install tyche-pro[/bold cyan]\n"172 f"Get your key → [bold]ko-fi.com/s/4e0d922f4c[/bold]",173 title="Upgrade to Tyche Pro",174 border_style="cyan"175))176```