Creating an app with ShardCloud CLI
Make sure you are authenticated before proceeding. First, in your app directory, create the .shardcloud file.- After creating the .shardcloud file, use the command
shardcloud create - Done
- Use
shardcloud committo commit your current changes to the app whenever you want to update
Commands available
Commands that interact with applications can be used with an
<app_id>
argument. For example: shardcloud restart <app_id>. If you omit the
<app_id> and you’re not in a directory with a .shardcloud file, the CLI
will prompt you with an interactive selection menu showing all your
applications. Use the arrow keys to navigate and press Enter to select.| Command | Arg | Description |
|---|---|---|
| me | - | Print the current logged-in user |
| backup | <app_id> | Manage app backups |
| commit | <app_id> | Create a commit in the current application |
| create | - | Create an application with the current .shardcloud file |
| login | - | Log in to Shard Cloud |
| logout | - | Log out |
| logs | <app_id> | View the logs of your applications |
| status | <app_id> | View the status of your applications |
| delete | <app_id> | Delete your applications |
| start | <app_id> | Start a stopped app |
| stop | <app_id> | Stop a running app |
| restart | <app_id> | Restart a running app |
| restore | <app_id> | Restore a backup |
Using Commands with Arguments
Commands that interact with applications can be used in three ways:Method 1: Using App ID
Specify the application ID directly:Method 2: From Application Directory
If you’re in a directory that contains a.shardcloud file, you can omit the <app_id> and the CLI will automatically use the application configured in that file:
The
commit command always uses the current directory’s .shardcloud file,
so it doesn’t require an <app_id> argument.Method 3: Interactive Selection
If you omit the<app_id> and you’re not in a directory with a .shardcloud file, the CLI will prompt you with an interactive selection menu:
Use the arrow keys (↑/↓) to navigate through the list of applications and
press Enter to select the desired application.
