This is the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

Claude Code

    AI-Assisted Development

    Learn to use Claude Code for AI-assisted development in Piglet Run.

    Prerequisites

    You need an Anthropic API key. Set it up:

    export ANTHROPIC_API_KEY="your-api-key"
    

    Getting Started

    1. Launch Claude Code

    In VS Code terminal:

    claude
    

    2. Give Instructions

    Ask Claude to help with your project:

    > Create a FastAPI app with PostgreSQL integration
    

    3. Review and Accept

    Claude will:

    • Analyze your request
    • Generate code
    • Explain the changes
    • Wait for your approval

    Best Practices

    PracticeReason
    Create snapshotsRoll back if needed
    Review changesVerify before accepting
    Be specificBetter results
    IterateRefine step by step

    Safety

    Piglet Run makes AI coding safer:

    • Snapshots: Restore any time
    • Monitoring: Track AI activity
    • Isolation: Sandboxed environment

    Monitoring

    View Claude Code activity at:

    http://<ip>/ui/d/claude-code
    

    Next Steps