Skip to content

Example: Interactive CLI Tool (enzu-powered git assistant) #26

Description

@teilomillet

Goal

Developer-friendly example showing enzu in an interactive CLI tool.

Use Case

Git commit message generator with session context and budget awareness.

What It Demonstrates

  • Session usage - preserve context across interactions
  • Interactive workflow - user prompts + enzu responses
  • Budget visibility - show remaining budget to user
  • Local deployment - no server required
  • Graceful degradation - handle budget exhaustion mid-session
  • CLI best practices - rich output, progress bars

Deliverables

  • examples/git_assistant/
    • cli.py - main CLI using Click or Typer
    • assistant.py - enzu session management
    • README.md - installation, usage, examples
    • demo.gif - terminal recording
    • Tests for session handling

User Experience

$ git-assistant
🤖 Git Assistant (budget: $1.00)
❯ analyze changes
📊 3 files changed, analyzing...
✓ Changes focus on: budget telemetry
💰 Cost: $0.15 | Remaining: $0.85

❯ write commit message
✓ Generated commit message:
   feat: add telemetry for adaptive budget scaling
💰 Cost: $0.08 | Remaining: $0.77

❯ make it shorter
⚠ Budget low (23%) - using concise mode
✓ Shortened message
💰 Cost: $0.05 | Remaining: $0.72

Success Criteria

  • Clean CLI UX with rich formatting
  • Session preserves context
  • Shows budget to user
  • Gracefully handles budget exhaustion
  • Easy to install and run locally
  • Works with local git repo

Target Audience

Developers, CLI tool builders

Estimated Effort

Small (1-2 days)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions