ruvector/scripts
Claude 3be7020c23 feat: Prepare packages for npm publishing with comprehensive validation
Package 1: @ruvector/psycho-symbolic-integration
- Add npm publishing metadata (repository, bugs, homepage, publishConfig)
- Include LICENSE file
- Create .npmignore for clean package distribution
- Configure files array for selective publishing
- Package size: 9.3 KB tarball, 32.7 KB unpacked (6 files)

Package 2: @ruvector/psycho-synth-examples
- Add npm publishing metadata with bin entries
- Include LICENSE file
- Create .npmignore for clean package distribution
- Configure files array (dist, bin, examples, src, README, LICENSE)
- Package size: 26.9 KB tarball, 112.7 KB unpacked (11 files)
- CLI binaries: psycho-synth-examples, pse (short alias)

Validation & Documentation:
- Create comprehensive PUBLISHING-GUIDE.md with step-by-step instructions
- Create detailed PACKAGE-VALIDATION-REPORT.md with all validation results
- Add validation scripts (validate-packages.sh, validate-packages-simple.sh)
- Verify npm pack --dry-run for both packages
- Test CLI functionality (list command working)

Publishing Status:
 All metadata complete
 Documentation comprehensive
 LICENSE files included
 .npmignore configured
 npm pack validation passed
 CLI tested and working
 READY FOR PUBLISHING

Next Steps:
1. npm login
2. npm publish --access public (both packages)
3. Verify with npm view and npx commands
2025-11-23 04:44:45 +00:00
..
check-and-publish-router-wasm.sh feat: Phase 3 - WASM architecture with in-memory storage 2025-11-21 13:40:34 +00:00
publish-crates.sh feat: Phase 3 - WASM architecture with in-memory storage 2025-11-21 13:40:34 +00:00
publish-router-wasm.sh feat: Phase 3 - WASM architecture with in-memory storage 2025-11-21 13:40:34 +00:00
README.md feat: Phase 3 - WASM architecture with in-memory storage 2025-11-21 13:40:34 +00:00
validate-packages-simple.sh feat: Prepare packages for npm publishing with comprehensive validation 2025-11-23 04:44:45 +00:00
validate-packages.sh feat: Prepare packages for npm publishing with comprehensive validation 2025-11-23 04:44:45 +00:00

Ruvector Scripts

Automation scripts for development, publishing, and maintenance.

Publishing Scripts

publish-crates.sh

Automated script to publish all Ruvector crates to crates.io in the correct dependency order.

Prerequisites:

  • Rust and Cargo installed
  • CRATES_API_KEY in .env file (never hardcoded!)
  • All crates build successfully
  • All tests pass

Usage:

# Make executable
chmod +x scripts/publish-crates.sh

# Run publishing
./scripts/publish-crates.sh

What it does:

  1. Loads CRATES_API_KEY from .env (secure, not hardcoded)
  2. Authenticates with crates.io
  3. Publishes crates in dependency order:
    • Phase 1: ruvector-core, router-core (base crates)
    • Phase 2: ruvector-node, ruvector-wasm, ruvector-cli, ruvector-bench
    • Phase 3: router-cli, router-ffi, router-wasm
  4. Waits between publishes for crates.io indexing
  5. Reports success/failure summary

Safety Features:

  • Reads credentials from .env (gitignored)
  • Never hardcodes API keys
  • Verifies packages before publishing
  • Skips already published versions
  • Provides detailed error messages
  • Waits for crates.io indexing

Security

⚠️ Important: This directory may contain scripts that use sensitive credentials.

Always:

  • Store credentials in .env (gitignored)
  • Use .env.example for templates
  • Never hardcode API keys in scripts
  • Review scripts before execution

See SECURITY.md for security best practices.

Development Scripts

More scripts will be added here as the project grows

Potential additions:

  • test-all.sh - Run all tests across crates
  • bench-all.sh - Run all benchmarks
  • check-format.sh - Verify code formatting
  • update-docs.sh - Update documentation

Contributing

When adding new scripts:

  1. Document thoroughly - Add comments and usage examples
  2. Use .env for secrets - Never hardcode credentials
  3. Make executable - chmod +x scripts/your-script.sh
  4. Add to this README - Document purpose and usage
  5. Test thoroughly - Verify on clean checkout
  6. Error handling - Exit on errors (set -e)
  7. Colored output - Use colors for clarity

Resources