Create a Workspace
Create a new workspace in Tosca Cloud.
Always use --json --silent on every toscactl command.
Steps
Parse arguments. Extract from
$ARGUMENTS:- Workspace name (required)
--description TEXT(optional)--access-type public|private(optional, defaults to server default)--import-examplesflag (optional)--asset-libraryflag (optional)
Create the workspace.
toscactl workspaces create "<name>" --json --silent [--description "<text>"] [--access-type public|private] [--import-examples] [--asset-library]Parse the JSON response to extract the workspace ID and name.
Report result. Show the created workspace name, ID, access type, and description.
Offer to activate. Ask the user if they want to set the new workspace as active. If yes, run:
toscactl workspaces set "<name>" --json --silent
Error Handling
- If creation fails with a "name already exists" error, suggest choosing a different name or listing existing workspaces with
/tosca-find. - If creation fails with an authorization error, check auth with
toscactl config --json --silentand suggest re-authenticating with/tosca-setup. - Workspace names must be 1-64 characters and cannot contain:
/ \ : . ~ & % ; @ ' " ? < > | # $ * } { , + = [ ]