Files
OCR/openspec/changes/archive/2025-12-02-unify-environment-scripts/tasks.md
egg d7f7166a2d feat: unify environment scripts with start.sh
- Add unified start.sh script with subcommands (all/backend/frontend)
- Add process management (--stop, --status)
- Remove separate start_backend.sh and start_frontend.sh
- Update setup_dev_env.sh with pre-flight checks and --cpu-only/--skip-db options
- Update .env.example to remove sensitive data and add DIFY translation config
- Add .pid/ to .gitignore for process management

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 12:48:52 +08:00

1.6 KiB

Tasks: Unify Environment Scripts

1. Package Audit and Update

  • 1.1 Review Python dependencies in requirements.txt for unused/outdated packages
  • 1.2 Review Node.js dependencies in frontend/package.json
  • 1.3 Document system-level dependencies (apt packages, nvm, pandoc, etc.)
  • 1.4 Update requirements.txt with corrected versions and comments

2. Environment Configuration Cleanup

  • 2.1 Audit .env, .env.local, .env.example files in root and frontend
  • 2.2 Consolidate duplicate environment variables
  • 2.3 Update .env.example with all required variables
  • 2.4 Remove sensitive data from version control (if any)

3. Update Setup Script

  • 3.1 Add pre-flight checks (disk space, memory, existing installations)
  • 3.2 Improve error messages with solutions
  • 3.3 Add optional component installation (e.g., skip GPU detection if not needed)
  • 3.4 Add database initialization step to setup script
  • 3.5 Test setup on clean Ubuntu 22.04/WSL2 environment

4. Create Unified Startup Script

  • 4.1 Create start.sh with subcommands (all/backend/frontend)
  • 4.2 Add process management (start, stop, restart, status)
  • 4.3 Add log output options (combined/separate)
  • 4.4 Preserve individual scripts for backwards compatibility (optional) - Removed old scripts
  • 4.5 Test unified script in development environment

5. Documentation

  • 5.1 Update README with new startup instructions (skipped per user request)
  • 5.2 Add troubleshooting section for common issues (skipped per user request)