Files
ClaudaCoding/cc_status.py
Dani 1c57d3a7c4 Fix Windows console encoding in cc_status.py
Removed emoji characters that cause UnicodeEncodeError on Windows.
Script now works perfectly on all platforms!

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-04 23:23:36 -04:00

84 lines
2.2 KiB
Python

#!/usr/bin/env python3
"""
CC Status Viewer
Quick view of CC's current status and memory
"""
import json
from pathlib import Path
from datetime import datetime
ZONE = Path(__file__).parent
MEMORY_FILE = ZONE / "memory.json"
SESSIONS_DIR = ZONE / "sessions"
def show_status():
"""Display CC's current status"""
# Load memory
with open(MEMORY_FILE, 'r') as f:
memory = json.load(f)
print("=" * 60)
print("CC'S CURRENT STATUS")
print("=" * 60)
# Session info
print(f"\nLast Session: {memory.get('last_session', 'Unknown')}")
print(f"Total Sessions: {memory.get('sessions_count', 0)}")
# Current context
print(f"\nCurrent Context:")
print(f" {memory.get('quick_context', 'No context set')}")
# Active projects
print(f"\nActive Projects:")
projects = memory.get('active_projects', [])
if projects:
for project in projects:
project_info = memory.get('project_notes', {}).get(project, {})
status = project_info.get('status', 'unknown')
print(f" - {project} ({status})")
else:
print(" No active projects")
# What's next
print(f"\nNext Up:")
next_items = memory.get('next_up', [])
if next_items:
for item in next_items:
print(f" - {item}")
else:
print(" Nothing scheduled")
# Recent learnings
print(f"\nRecent Learnings:")
learnings = memory.get('key_learnings', [])
if learnings:
for learning in learnings[-3:]: # Show last 3
print(f" - {learning}")
else:
print(" No learnings yet")
# Recent sessions
print(f"\nRecent Sessions:")
session_files = sorted(SESSIONS_DIR.glob('*.md'), reverse=True)[:3]
if session_files:
for session in session_files:
print(f" - {session.name}")
else:
print(" No sessions logged")
# User preferences
print(f"\nUser Profile:")
prefs = memory.get('user_preferences', {})
print(f" Skill Level: {prefs.get('skill_level', 'Unknown')}")
print(f" Style: {prefs.get('style', 'Unknown')}")
print("\n" + "=" * 60)
print("Ready to code!")
print("=" * 60)
if __name__ == "__main__":
show_status()