Configure and run an upload
The command loads the base JSON configuration, merges the selected releaseEnvConf entry, and then applies explicit command-line flags. Required values are region, accessKeyId, accessKeySecret, bucket, source, and target.
Configuration file
{
"region": "oss-region-id",
"accessKeyId": "your-access-key-id",
"accessKeySecret": "your-access-key-secret",
"bucket": "your-bucket",
"releaseEnvConf": {
"production": {
"source": "dist/",
"target": "static/"
}
}
}
Command
npx aliyunoss-cli --releaseEnv production
Use explicit flags such as --source and --target when a run must override the selected environment.
Keep credentials out of source control. Store real access keys only in protected local or CI configuration.