### Start Application Source: https://context7.com/shard-cloud/cli/llms.txt Starts a stopped application instance. ```bash # Start app configured in .shardcloud file shardcloud start # Start a specific app by ID shardcloud start 550e8400-e29b-41d4-a716-446655440000 ``` -------------------------------- ### Install Shard Cloud CLI Source: https://context7.com/shard-cloud/cli/llms.txt Installation methods for macOS, Linux, WSL, and Windows environments. ```bash # macOS, Linux, and WSL - Install via shell script curl -fsSL https://cli.shardcloud.app | bash # Windows - Install via npm (requires Node.js) npm install -g shard-cloud-cli # Verify installation shardcloud --help ``` -------------------------------- ### Install Shard Cloud CLI (Windows) Source: https://github.com/shard-cloud/cli/blob/main/README.md Install the Shard Cloud CLI globally on Windows using npm. Requires Node.js and npm to be installed. ```bash npm install -g shard-cloud-cli ``` -------------------------------- ### Install Shard Cloud CLI (macOS/Linux) Source: https://github.com/shard-cloud/cli/blob/main/README.md Use this command to install the Shard Cloud CLI on macOS, Linux, and WSL. Ensure you have curl installed. ```bash curl -fsSL https://cli.shardcloud.app | bash ``` -------------------------------- ### Install Specific Version (NPM Only) Source: https://github.com/shard-cloud/cli/blob/main/README.md Install a specific version of the Shard Cloud CLI using npm. Replace '1.0.0' with the desired version number. ```bash shardcloud install 1.0.0 ``` -------------------------------- ### Update Shard Cloud CLI (Windows) Source: https://github.com/shard-cloud/cli/blob/main/README.md Update the Shard Cloud CLI on Windows using the update command. This requires the CLI to be installed via npm. ```bash shardcloud update ``` -------------------------------- ### Update Shard Cloud CLI Source: https://context7.com/shard-cloud/cli/llms.txt Updates the CLI tool to the latest version based on the operating system or installation method. ```bash # macOS, Linux, and WSL - Re-run install script curl -fsSL https://cli.shardcloud.app | bash # Windows (npm) - Use built-in update command shardcloud update # Install a specific version (npm only) shardcloud install 1.0.0 ``` -------------------------------- ### Create New Application Source: https://context7.com/shard-cloud/cli/llms.txt Deploys the current directory as a new application instance. ```bash # Create a new app from current directory cd /path/to/your/project shardcloud create ``` -------------------------------- ### Create Application Backup Source: https://context7.com/shard-cloud/cli/llms.txt Captures the current state of an application for future restoration. ```bash # Create backup for app configured in .shardcloud file shardcloud backup # Create backup for a specific app by ID shardcloud backup 550e8400-e29b-41d4-a716-446655440000 # Example output: # Backup created with ID: 660e8400-e29b-41d4-a716-446655440001 ``` -------------------------------- ### Project Configuration File Format Source: https://context7.com/shard-cloud/cli/llms.txt Defines the structure of the .shardcloud file used for project-level settings. ```bash # Example .shardcloud file format APPID=550e8400-e29b-41d4-a716-446655440000 DISPLAY_NAME=my-api MEMORY=512 VERSION=1.0.0 # The CLI reads this file automatically from the current working directory # All commands that accept an app ID will use APPID if no argument is provided ``` -------------------------------- ### Restore Application from Backup Source: https://context7.com/shard-cloud/cli/llms.txt Restores an application state using an interactive backup selector. ```bash # Restore backup for app configured in .shardcloud file shardcloud restore # Restore backup for a specific app by ID shardcloud restore 550e8400-e29b-41d4-a716-446655440000 # Example interaction: # Select Backup: # > 2024-01-15 14:30:45 660e8400-e29b-41d4-a716-446655440001 # 2024-01-14 10:15:30 660e8400-e29b-41d4-a716-446655440002 # 2024-01-13 08:00:00 660e8400-e29b-41d4-a716-446655440003 # # Backup restored with ID: 660e8400-e29b-41d4-a716-446655440001 ``` -------------------------------- ### CLI Commands Reference Source: https://context7.com/shard-cloud/cli/llms.txt Reference for Shard Cloud CLI commands and their usage. ```APIDOC ## Delete Application The delete command permanently removes an application from Shard Cloud. It prompts for confirmation before proceeding. ```bash # Delete app configured in .shardcloud file shardcloud delete # Delete a specific app by ID shardcloud delete 550e8400-e29b-41d4-a716-446655440000 # Example interaction: # Are you sure you want to delete app 'my-api' (550e8400-e29b-41d4-a716-446655440000) [y/N]: y # App deleted ``` ## Create Backup The backup command creates a backup of your application's current state. ```bash # Create backup for app configured in .shardcloud file shardcloud backup # Create backup for a specific app by ID shardcloud backup 550e8400-e29b-41d4-a716-446655440000 # Example output: # Backup created with ID: 660e8400-e29b-41d4-a716-446655440001 ``` ## Restore Backup The restore command restores an application from a previously created backup. It presents an interactive selector to choose from available backups. ```bash # Restore backup for app configured in .shardcloud file shardcloud restore # Restore backup for a specific app by ID shardcloud restore 550e8400-e29b-41d4-a716-446655440000 # Example interaction: # Select Backup: # > 2024-01-15 14:30:45 660e8400-e29b-41d4-a716-446655440001 # 2024-01-14 10:15:30 660e8400-e29b-41d4-a716-446655440002 # 2024-01-13 08:00:00 660e8400-e29b-41d4-a716-446655440003 # # Backup restored with ID: 660e8400-e29b-41d4-a716-446655440001 ``` ## Update CLI The update command updates the Shard Cloud CLI to the latest version. ```bash # macOS, Linux, and WSL - Re-run install script curl -fsSL https://cli.shardcloud.app | bash # Windows (npm) - Use built-in update command shardcloud update # Install a specific version (npm only) shardcloud install 1.0.0 ``` ## Project Configuration File The `.shardcloud` configuration file stores project-level settings and is automatically created when you run `shardcloud create`. This enables the CLI to identify your application without requiring explicit app IDs. ```bash # Example .shardcloud file format APPID=550e8400-e29b-41d4-a716-446655440000 DISPLAY_NAME=my-api MEMORY=512 VERSION=1.0.0 # The CLI reads this file automatically from the current working directory # All commands that accept an app ID will use APPID if no argument is provided ``` ``` -------------------------------- ### Commit Application Changes Source: https://context7.com/shard-cloud/cli/llms.txt Deploys updates to an existing application by packaging the current directory. ```bash # Commit changes to app configured in .shardcloud file shardcloud commit # Commit changes to a specific app by ID shardcloud commit 550e8400-e29b-41d4-a716-446655440000 ``` -------------------------------- ### View Application Status Source: https://context7.com/shard-cloud/cli/llms.txt Displays a real-time dashboard of application health and resource usage. ```bash # View status of all applications shardcloud status ``` -------------------------------- ### Authenticate with Shard Cloud Source: https://context7.com/shard-cloud/cli/llms.txt Commands for logging into the Shard Cloud platform using an API token. ```bash # Interactive login - prompts for token input shardcloud login # Non-interactive login with token flag shardcloud login --token "your-shardcloud-api-token-here" ``` -------------------------------- ### Retrieve User Information Source: https://context7.com/shard-cloud/cli/llms.txt Displays details for the currently authenticated account. ```bash # Get current user information shardcloud me ``` -------------------------------- ### Stop Application Source: https://context7.com/shard-cloud/cli/llms.txt Stops a running application instance. ```bash # Stop app configured in .shardcloud file shardcloud stop # Stop a specific app by ID shardcloud stop 550e8400-e29b-41d4-a716-446655440000 ``` -------------------------------- ### Stream Application Logs Source: https://context7.com/shard-cloud/cli/llms.txt Streams real-time logs from an application using Server-Sent Events. ```bash # Stream logs for app configured in .shardcloud file shardcloud logs # Stream logs for a specific app by ID shardcloud logs 550e8400-e29b-41d4-a716-446655440000 ``` -------------------------------- ### Restart Application Source: https://context7.com/shard-cloud/cli/llms.txt Restarts an application to apply changes or clear state. ```bash # Restart app configured in .shardcloud file shardcloud restart # Restart a specific app by ID shardcloud restart 550e8400-e29b-41d4-a716-446655440000 ``` -------------------------------- ### REST API Endpoints Reference Source: https://context7.com/shard-cloud/cli/llms.txt Lists the underlying REST API endpoints utilized by the CLI commands. ```bash # Authentication GET /user/me # Get current user info # Application Management GET /apps # List all applications with real-time stats GET /apps?q=true # List all applications (quiet mode) GET /apps/{appId}?q=true # Get single application info POST /apps # Create new application (multipart/form-data with zip) PUT /apps/{appId}/file # Update application files (multipart/form-data with zip) POST /apps/{appId}/status # Update app status (body: {"status": "run|stop|restart"}) DELETE /apps/{appId} # Delete application # Logs (Server-Sent Events) GET /apps/{appId}/logs # Stream application logs (Accept: text/event-stream) # Backups GET /project/{appId}/backups # List backups for application POST /project/{appId}/backups # Create new backup POST /project/{appId}/backups/{backupId}/restore # Restore from backup ``` -------------------------------- ### Delete Application via CLI Source: https://context7.com/shard-cloud/cli/llms.txt Permanently removes an application. Requires confirmation before execution. ```bash # Delete app configured in .shardcloud file shardcloud delete # Delete a specific app by ID shardcloud delete 550e8400-e29b-41d4-a716-446655440000 # Example interaction: # Are you sure you want to delete app 'my-api' (550e8400-e29b-41d4-a716-446655440000) [y/N]: y # App deleted ``` -------------------------------- ### API Endpoints Reference Source: https://context7.com/shard-cloud/cli/llms.txt Reference for the underlying REST API endpoints used by the Shard Cloud CLI. ```APIDOC ## API Endpoints Reference The CLI communicates with the ShardCloud API at `https://shardcloud.app/api`. Here are the underlying REST API endpoints used by each command: ### Authentication - **GET /user/me** - Description: Get current user info ### Application Management - **GET /apps** - Description: List all applications with real-time stats - **GET /apps?q=true** - Description: List all applications (quiet mode) - **GET /apps/{appId}?q=true** - Description: Get single application info - **POST /apps** - Description: Create new application (multipart/form-data with zip) - **PUT /apps/{appId}/file** - Description: Update application files (multipart/form-data with zip) - **POST /apps/{appId}/status** - Description: Update app status (body: `{"status": "run|stop|restart"}`) - **DELETE /apps/{appId}** - Description: Delete application ### Logs (Server-Sent Events) - **GET /apps/{appId}/logs** - Description: Stream application logs (Accept: `text/event-stream`) ### Backups - **GET /project/{appId}/backups** - Description: List backups for application - **POST /project/{appId}/backups** - Description: Create new backup - **POST /project/{appId}/backups/{backupId}/restore** - Description: Restore from backup ``` -------------------------------- ### Logout from Shard Cloud Source: https://context7.com/shard-cloud/cli/llms.txt Removes local authentication credentials. ```bash # Log out from Shard Cloud shardcloud logout ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.