the universal sandbox runtime for agents and humans. pocketenv.io
sandbox openclaw agent claude-code vercel-sandbox deno-sandbox cloudflare-sandbox atproto sprites daytona
7
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add install script for pocketenv releases

Download latest GitHub release, select OS/arch, and install
Supports macOS and Linux; Linux can install per-user with --local
Make binary executable and remove temporary files

+110
+110
install.sh
··· 1 + #!/bin/bash 2 + 3 + readonly MAGENTA="$(tput setaf 5 2>/dev/null || echo '')" 4 + readonly GREEN="$(tput setaf 2 2>/dev/null || echo '')" 5 + readonly CYAN="$(tput setaf 6 2>/dev/null || echo '')" 6 + readonly NO_COLOR="$(tput sgr0 2>/dev/null || echo '')" 7 + 8 + set -e 9 + 10 + # Define the release information 11 + RELEASE_URL="https://api.github.com/repos/pocketenv-io/pocketenv/releases/latest" 12 + 13 + # Determine the operating system 14 + OS=$(uname -s) 15 + if [ "$OS" = "Darwin" ]; then 16 + # Determine the CPU architecture 17 + ARCH=$(uname -m) 18 + if [ "$ARCH" = "arm64" ]; then 19 + ASSET_NAME="_aarch64-apple-darwin.tar.gz" 20 + else 21 + ASSET_NAME="_x86_64-apple-darwin.tar.gz" 22 + fi 23 + elif [ "$OS" = "Linux" ]; then 24 + # Determine the CPU architecture 25 + ARCH=$(uname -m) 26 + if [ "$ARCH" = "aarch64" ]; then 27 + ASSET_NAME="_aarch64-unknown-linux-gnu.tar.gz" 28 + elif [ "$ARCH" = "x86_64" ]; then 29 + ASSET_NAME="_x86_64-unknown-linux-gnu.tar.gz" 30 + else 31 + echo "Unsupported architecture: $ARCH" 32 + exit 1 33 + fi 34 + else 35 + echo "Unsupported operating system: $OS" 36 + exit 1 37 + fi 38 + 39 + # Retrieve the download URL for the desired asset 40 + DOWNLOAD_URL=$(curl -sSL $RELEASE_URL | grep -o "browser_download_url.*$ASSET_NAME\"" | cut -d ' ' -f 2) 41 + 42 + ASSET_NAME=$(basename $DOWNLOAD_URL) 43 + 44 + # Define the installation directory 45 + INSTALL_DIR="/usr/local/bin" 46 + 47 + DOWNLOAD_URL=`echo $DOWNLOAD_URL | tr -d '\"'` 48 + 49 + # Download the asset 50 + curl -SL $DOWNLOAD_URL -o /tmp/$ASSET_NAME 51 + 52 + # Extract the asset 53 + tar -xzf /tmp/$ASSET_NAME -C /tmp 54 + 55 + # Set the correct permissions for the binary 56 + chmod +x /tmp/pocketenv 57 + 58 + # Check if the 'local' argument was passed 59 + LOCAL=0 60 + if [ $# -eq 1 ]; then 61 + if [ $1 = "--local" ]; then 62 + LOCAL=1 63 + fi 64 + fi 65 + 66 + # Move the extracted binary to the installation directory 67 + # use sudo if OS is Linux 68 + if [ "$OS" = "Linux" ]; then 69 + # Install locally if LOCAL is set to 1 70 + LOCAL_DIR="/home/$USER/.local/bin" 71 + if [ "$LOCAL" -eq 1 ]; then 72 + mv /tmp/pocketenv $LOCAL_DIR 73 + else 74 + if command -v sudo >/dev/null 2>&1; then 75 + sudo mv /tmp/pocketenv $INSTALL_DIR 76 + else 77 + mv /tmp/pocketenv $INSTALL_DIR 78 + fi 79 + fi 80 + else 81 + mv /tmp/pocketenv $INSTALL_DIR 82 + fi 83 + 84 + # Clean up temporary files 85 + rm /tmp/$ASSET_NAME 86 + 87 + cat << EOF 88 + ${CYAN} 89 + ____ __ __ 90 + / __ \\____ _____/ /_____ / /____ ____ _ __ 91 + / /_/ / __ \\/ ___/ //_/ _ \\/ __/ _ \\/ __ \\ | / / 92 + / ____/ /_/ / /__/ ,< / __/ /_/ __/ / / / |/ / 93 + /_/ \\____/\\___/_/|_|\\___/\\__/\\___/_/ /_/|___/ 94 + 95 + ${NO_COLOR} 96 + Open, interoperable sandbox platform for agents and humans 📦 ✨ 97 + 98 + ${GREEN}https://github.com/pocketenv-io/pocketenv${NO_COLOR} 99 + 100 + Please file an issue if you encounter any problems! 101 + 102 + =============================================================================== 103 + 104 + Installation completed! 🎉 105 + 106 + To get started, run: 107 + 108 + ${MAGENTA}pocketenv init${NO_COLOR} 109 + 110 + EOF