Files
VERSE ebde9ba68f refactor(commands): separate commands and its core into two folders (#32)
- I think it would be better if one for commands only, one for the spec
handling core logic so people won't be confused by the core logic inside
the commands folder (cleaner I guess)
- Regen docs
2026-07-05 11:27:30 +07:00

95 lines
6.5 KiB
Go

package ops
import (
"github.com/versenilvis/iris/spec"
)
func init() {
spec.Register(&spec.Spec{
Name: "appwrite",
Description: "Appwrite - Open-Source End-to-End Backend Server",
Subcommands: []spec.Subcommand{
{Name: "login", Description: "The login command allows you to authenticate and manage a user account"},
{Name: "project", Description: "Initialise your Appwrite project"},
{Name: "function", Description: "Initialise your Appwrite cloud function"},
{Name: "collection", Description: "Initialise your Appwrite collections"},
{Name: "logout", Description: "The logout command allows you to logout of your Appwrite account"},
{Name: "account", Description: "The account command allows you to authenticate and manage a user account"},
{Name: "get", Description: "Get currently logged in user data as JSON object"},
{Name: "updateName", Description: "Update currently logged in user account name"},
{Name: "getPrefs", Description: "Get currently logged in user preferences as a key-value object"},
{Name: "getSessions", Description: "Get currently logged in user list of active sessions across different devices"},
{Name: "functions", Description: "The functions command allows you view, create and manage your Cloud Functions"},
{Name: "listRuntimes", Description: "Get a list of all runtimes that are currently active on your instance"},
{Name: "update", Description: "Update function by its unique ID"},
{Name: "delete", Description: "Delete a function by its unique ID"},
{Name: "getDeployment", Description: "Get a code deployment by its unique ID"},
{Name: "deleteDeployment", Description: "Delete a code deployment by its unique ID"},
{Name: "getExecution", Description: "Get a function execution log by its unique ID"},
{Name: "getAntivirus", Description: "Check the Appwrite Antivirus server is up and connection is successful"},
{Name: "getCache", Description: "Check the Appwrite in-memory cache server is up and connection is successful"},
{Name: "getDB", Description: "Check the Appwrite database server is up and connection is successful"},
{Name: "getStorageLocal", Description: "Check the Appwrite local storage device is up and connection is successful"},
{Name: "storage", Description: "The storage command allows you to manage your project files"},
{Name: "createBucket", Description: "Create a new storage bucket"},
{Name: "updateBucket", Description: "Update a storage bucket by its unique ID"},
{Name: "deleteBucket", Description: "Delete a storage bucket by its unique ID"},
{Name: "listLogs", Description: "Get the team activity logs list by its unique ID"},
{Name: "users", Description: "The users command allows you to manage your project users"},
{Name: "create", Description: "Create a new user"},
{Name: "updateEmail", Description: "Update the user email by its unique ID"},
{Name: "getLogs", Description: "Get the user activity logs list by its unique ID"},
{Name: "getMemberships", Description: "Get the user membership list by its unique ID"},
{Name: "updatePassword", Description: "Update the user password by its unique ID"},
{Name: "updatePhone", Description: "Update the user phone by its unique ID"},
{Name: "deleteSessions", Description: "Delete all user's sessions by using the user's unique ID"},
{Name: "deleteSession", Description: "Delete a user sessions by its unique ID"},
{Name: "updateEmailVerification", Description: "Update the user email verification status by its unique ID"},
{Name: "updatePhoneVerification", Description: "Update the user phone verification status by its unique ID"},
{Name: "client", Description: "The client command allows you to configure your CLI"},
},
Options: []spec.Option{
{Name: "--databaseId", Description: "Database ID"},
{Name: "--all", Description: "Flag to initialize all databases"},
{Name: "--functionId", Description: "Function ID"},
{Name: "--userId", Description: "User ID"},
{Name: "--password", Description: "User password. Must be at least 8 chars"},
{Name: "--name", Description: "User name. Max length: 128 chars"},
{Name: "--email", Description: "User email"},
{Name: "--limit", Description: "Maximum number of results to return"},
{Name: "--oldPassword", Description: "Current user password. Must be at least 8 chars"},
{Name: "--number", Description: "User password. Must be at least 8 chars"},
{Name: "--prefs", Description: "Prefs key-value JSON object"},
{Name: "--url", Description: "Appwrite server endpoint URL"},
{Name: "--secret", Description: "Valid reset token"},
{Name: "--passwordAgain", Description: "Repeat new user password. Must be at least 8 chars"},
{Name: "--provider", Description: "Provider name"},
{Name: "--sessionId", Description: "Session ID. Use the string 'current' to get the current device session"},
{Name: "--code", Description: "Browser Code"},
{Name: "--width", Description: "Image width. Pass an integer between 0 to 2000. Defaults to 100"},
{Name: "--height", Description: "Image height. Pass an integer between 0 to 2000. Defaults to 100"},
{Name: "--quality", Description: "Image quality. Pass an integer between 0 to 100. Defaults to 100"},
{Name: "--destination", Description: "Output file path"},
{Name: "--color", Description: "Output file path"},
{Name: "--text", Description: "Plain text to be converted to QR code image"},
{Name: "--size", Description: "QR code size. Pass an integer between 1 to 1000. Defaults to 400"},
{Name: "--margin", Description: "Margin from edge. Pass an integer between 0 to 10. Defaults to 1"},
{Name: "--download", Description: "Output file path"},
{Name: "--search", Description: "Search term to filter your list results. Max length: 256 chars"},
{Name: "--orderType", Description: "Order result by ASC or DESC order"},
{Name: "--range", Description: "'Date range"},
{Name: "--collectionId", Description: "Collection name. Max length: 128 chars"},
{Name: "--permission", Description: "Database ID"},
{Name: "--required", Description: "Is attribute required?"},
{Name: "--xdefault", Description: "Is attribute an array?"},
{Name: "--elements", Description: "Is attribute required?"},
{Name: "--min", Description: "Minimum value to enforce on new documents"},
{Name: "--max", Description: "Maximum value to enforce on new documents"},
{Name: "--orderAttributes", Description: "Database ID"},
{Name: "--read", Description: "Database ID"},
{Name: "--documentId", Description: "Document ID"},
{Name: "--data", Description: "Database ID"},
},
})
}