Skip to content

Conversation

@codegen-sh
Copy link

@codegen-sh codegen-sh bot commented Oct 14, 2025

🎯 Overview

This PR adds 4 production-ready shell scripts to simplify the Codegen SDK demo experience for developers.

📦 What's New

Created Scripts:

  1. setup.sh - Environment initialization

    • Checks Python 3.8+ installation
    • Creates virtual environment
    • Installs Codegen SDK
    • Generates demo.py template
    • Creates .env.example
  2. start.sh - Run the demo

    • Activates virtual environment
    • Validates credentials
    • Executes demo application
    • Shows status and results
  3. send_request.sh - Custom API requests

    • Accepts custom prompts via CLI
    • Sends to Codegen API
    • Waits for completion (60s timeout)
    • Displays formatted results
  4. all.sh - Complete workflow

    • Runs full setup → validate → execute pipeline
    • Beautiful progress indicators
    • Comprehensive error messages
    • Shows next steps

Documentation:

  • SCRIPTS_README.md - Complete guide with:
    • Usage instructions for each script
    • Quick start guide
    • Workflow diagrams
    • Troubleshooting section
    • Examples and tips

✨ Features

  • Error Handling: All scripts use set -e for fail-fast behavior
  • Validation: Checks for dependencies and credentials
  • User Experience: Beautiful output with emojis and formatting
  • Security: TruffleHog scan passed (no secrets)
  • Syntax: All bash scripts validated
  • Permissions: Executable flags set

🚀 Quick Start

# Get credentials from https://codegen.com/token
export CODEGEN_ORG_ID='your-org-id'
export CODEGEN_TOKEN='your-api-token'

# Run everything at once
./all.sh

# Or try a custom prompt
./send_request.sh "Create a Python function to validate emails"

📋 Testing

All scripts have been tested and validated:

  • Bash syntax check passed
  • Executable permissions set
  • TruffleHog security scan passed
  • Error handling verified
  • User experience validated

📚 Documentation

Complete documentation available in SCRIPTS_README.md including:

  • Detailed script descriptions
  • Usage examples
  • Troubleshooting guide
  • Workflow diagrams

🎯 Use Cases

These scripts are perfect for:

  • New developers trying out the SDK
  • Quick API testing
  • Demo presentations
  • Development environment setup
  • CI/CD automation

🔗 Links


Files Changed: 5 files, 635+ lines added
Scripts: setup.sh, start.sh, send_request.sh, all.sh, SCRIPTS_README.md


💻 View my work • 👤 Initiated by @ZeeeepaAbout Codegen
⛔ Remove Codegen from PR🚫 Ban action checks

Description by Korbit AI

What change is being made?

Add a complete set of Codegen SDK demo scripts (setup.sh, start.sh, send_request.sh, all.sh) along with an updated SCRIPTS_README.md to provide end-to-end setup, execution, and testing workflows for the demo.

Why are these changes being made?

Introduce an all-in-one, user-friendly demo workflow to quickly initialize the environment, run the demo, and test custom prompts, improving onboarding and experimentation with the Codegen SDK.

Is this description stale? Ask me to generate a new description by commenting /korbit-generate-pr-description

- setup.sh: Initialize environment, create venv, install SDK
- start.sh: Run demo with credential validation
- send_request.sh: Send custom prompts to API
- all.sh: Complete workflow automation
- SCRIPTS_README.md: Comprehensive documentation

All scripts include:
✅ Error handling with set -e
✅ Credential validation
✅ User-friendly output with emojis
✅ Syntax validation passed
✅ Executable permissions

Quick start: ./all.sh after setting credentials
Get token at: https://codegen.com/token

Co-authored-by: Zeeeepa <[email protected]>
@korbit-ai
Copy link

korbit-ai bot commented Oct 14, 2025

By default, I don't review pull requests opened by bots. If you would like me to review this pull request anyway, you can request a review via the /korbit-review command in a comment.

@coderabbitai
Copy link

coderabbitai bot commented Oct 14, 2025

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants