DoubleSync.Cli 0.1.0
DoubleSync
Umbraco environment synchronization tool. Sync schema (data types, document types) and content between Umbraco instances using the Management API.
Installation
# Add the private NuGet source
dotnet nuget add source https://nuget.double.pt/ --name DoubleDigital
# Install the CLI tool globally
dotnet tool install --global DoubleSync.Cli --add-source https://nuget.double.pt/
Quick Start
1. Configure API User in Umbraco
In your Umbraco project's appsettings.json, add an API user:
{
"Umbraco": {
"CMS": {
"Security": {
"BackOfficeApiClients": {
"doublesync": {
"ClientId": "umbraco-back-office-doublesync",
"ClientSecret": "your-secret-here",
"AllowedGrantTypes": ["client_credentials"],
"AllowedScopes": ["All"]
}
}
}
}
}
}
2. Test Connection
doublesync test-connection \
--url https://your-umbraco-site.com \
--client-id umbraco-back-office-doublesync \
--client-secret your-secret-here
3. Export Schema
doublesync schema-export \
--url https://dev.example.com \
--client-id umbraco-back-office-doublesync \
--client-secret your-secret-here \
--output .doublesync
4. Import Schema to Another Instance
doublesync schema-import \
--url https://uat.example.com \
--client-id umbraco-back-office-doublesync \
--client-secret your-secret-here \
--input .doublesync
5. Preview Changes (Dry Run)
doublesync schema-import \
--url https://uat.example.com \
--client-id umbraco-back-office-doublesync \
--client-secret your-secret-here \
--input .doublesync \
--dry-run
Available Commands
| Command | Description |
|---|---|
test-connection |
Test connection to an Umbraco instance |
schema-export |
Export schema (data types + document types) to disk |
schema-import |
Import schema from disk (supports --dry-run) |
schema-diff |
Compare schema snapshot against target instance |
content-export |
Export content (documents) to disk |
content-import |
Import content from disk (supports --dry-run) |
content-diff |
Compare content snapshot against target instance |
push |
Push schema + content from source → target |
pull |
Pull schema + content from target → local snapshot |
status |
Show what's changed since last sync |
Content Sync
# Export content
doublesync content-export --url https://dev.example.com --client-id ... --client-secret ...
# Import content
doublesync content-import --url https://uat.example.com --client-id ... --client-secret ...
# Diff content
doublesync content-diff --url https://uat.example.com --client-id ... --client-secret ...
Push / Pull (Bidirectional Sync)
# Push everything from local snapshot to target
doublesync push \
--url https://uat.example.com \
--client-id umbraco-back-office-doublesync \
--client-secret your-secret-here
# Pull from remote into local snapshot
doublesync pull \
--url https://uat.example.com \
--client-id umbraco-back-office-doublesync \
--client-secret your-secret-here
Requirements
- .NET 10.0 SDK
- Umbraco v17+ with Management API enabled
- API User configured with
client_credentialsgrant type
License
MIT
This package has no dependencies.