-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·49 lines (40 loc) · 1.28 KB
/
setup.sh
File metadata and controls
executable file
·49 lines (40 loc) · 1.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/bin/bash
# Development setup script for Orshot CLI
echo "🚀 Setting up Orshot CLI for development..."
# Check if Node.js is installed
if ! command -v node &> /dev/null; then
echo "❌ Node.js is not installed. Please install Node.js 18+ first."
exit 1
fi
# Check Node version
NODE_VERSION=$(node -v | cut -d'v' -f2 | cut -d'.' -f1)
if [ "$NODE_VERSION" -lt 18 ]; then
echo "❌ Node.js version 18+ is required. Current version: $(node -v)"
exit 1
fi
echo "✅ Node.js version: $(node -v)"
# Install dependencies
echo "📦 Installing dependencies..."
npm install
# Make CLI executable
echo "🔧 Making CLI executable..."
chmod +x bin/orshot.js
chmod +x examples/usage.js
# Test CLI
echo "🧪 Testing CLI..."
node bin/orshot.js --version
echo ""
echo "✅ Setup complete!"
echo ""
echo "📋 Next steps:"
echo " 1. Test the CLI: ./bin/orshot.js --help"
echo " 2. Login with API key: ./bin/orshot.js auth login <your-api-key>"
echo " 3. List templates: ./bin/orshot.js templates library"
echo " 4. Generate image: ./bin/orshot.js generate library <template-id>"
echo ""
echo "📚 Documentation:"
echo " - README.md - Usage guide"
echo " - CONTRIBUTING.md - Development guide"
echo " - examples/usage.js - Example usage script"
echo ""
echo "🎉 Happy coding!"