feat(npx): added scaffolding for 'npx sim' command that relies on localStorage only, can be ran from anywhere with Nodejs

This commit is contained in:
Waleed Latif
2025-03-04 11:45:55 -08:00
parent d309176c5e
commit b3347afa4e
34 changed files with 3835 additions and 90 deletions

33
scripts/setup_cli.sh Normal file
View File

@@ -0,0 +1,33 @@
#!/bin/bash
set -e
echo "Setting up Sim Studio CLI Package..."
# Create directory structure if it doesn't exist
mkdir -p packages/@sim/cli/bin
mkdir -p packages/@sim/cli/src/commands
mkdir -p packages/@sim/cli/src/utils
# Navigate to CLI directory
cd packages/@sim/cli
# Install dependencies
echo "Installing CLI dependencies..."
npm install
# Build the CLI package
echo "Building CLI package..."
npm run build
# Make the CLI executable
chmod +x bin/sim.js
echo "✅ CLI setup complete!"
echo ""
echo "You can now run:"
echo " npm run cli:start - to test the CLI"
echo " npm run cli:dev - to develop the CLI with live reload"
echo " npm run cli:publish - to publish to npm"
echo ""
echo "Try it out with: ./packages/@sim/cli/bin/sim.js"