Skip to main content

profile

Manage store profiles. A profile is a per-store context (store, store token, and scopes) under your logged-in account, so you can work with several stores without re-authenticating. auth login --store-domain and auth store use create and switch profiles automatically.

To run one command against another profile without switching, pass the global --profile <name> flag or set SHOPLAZZA_CLI_PROFILE. --profile wins over the environment variable, which wins over the current profile.

At an interactive terminal, add asks for a missing name and store, use, rename, and remove let you pick the profile, and remove asks you to confirm.

add​

Add a named profile bound to a store, minting and caching its store token. Requires an account login first (shoplazza auth login).

shell
shoplazza profile add [flags]

Flags​

FlagTypeDescription
--name <name>stringProfile name (required)
--store-domain, -s <domain>stringStore domain to bind this profile to (e.g. my-store.myshoplaza.com) (required)
--scope <scopes>StringSliceScopes for this profile (must be a subset of the account's granted scopes); empty grants the account's full scope set
--useboolSet this profile as current after adding it

Examples​

shell
# Add a profile for a store
shoplazza profile add --name prod --store-domain my-store.myshoplaza.com

# Add a scoped profile and switch to it
shoplazza profile add --name staging --store-domain staging.myshoplaza.com --scope read_product --use

list​

List all configured profiles with their store, scopes, token status, and which one is current.

shell
shoplazza profile list

info​

Show a profile's details (defaults to the current profile).

shell
shoplazza profile info [flags]

Flags​

FlagTypeDescription
--name <name>stringProfile to show (defaults to the current profile)

use​

Switch the current profile to a named one, or back to the previously-current profile.

shell
shoplazza profile use [flags]

Flags​

FlagTypeDescription
--name <name>stringProfile to switch to
--previousboolSwitch back to the previously-current profile

Examples​

shell
# Switch to a named profile
shoplazza profile use --name prod

# Switch back to the previous profile
shoplazza profile use --previous

# Run one command against another profile without switching
shoplazza products list --profile prod

update​

Update a profile's scopes. The cached store token is dropped and minted again with the new scopes on the next command.

shell
shoplazza profile update [flags]

Flags​

FlagTypeDescription
--name <name>stringProfile to update (defaults to the current profile)
--scope <scopes>StringSliceNew scopes for this profile (must be a subset of the account's granted scopes)

rename​

Rename a profile.

shell
shoplazza profile rename [flags]

Flags​

FlagTypeDescription
--from <name>stringExisting profile name (defaults to the current profile)
--to <name>stringNew profile name (required)

remove​

Remove a profile: its cached store token and config record. Your account login is kept.

shell
shoplazza profile remove [flags]

Flags​

FlagTypeDescription
--name <name>stringProfile to remove (required)