Update a Project
Update existing projects with the latest template version
Update a Project
# Update project in current directory to latest versionscyanprint update# Update a specific project pathcyanprint update [path]# Interactive version selectioncyanprint update -i
How Updates Work
CyanPrint uses a 3-way merge to preserve your customizations when updating. See 3-Way Merge to understand how updates preserve your changes.
Update Process
When you run cyanprint update, the following happens:
Reads state file
Loads .cyan_state.yaml to determine template history and current versions
Fetches latest templates
Downloads the latest template versions from the registry
Performs 3-way merge
Merges your local changes with the new template version
Writes merged files
Applies the merged result to your project
Cleans up sessions
Removes temporary session data
CLI Options
| Option | Description |
|---|---|
[path] | Project directory to update (defaults to current directory .) |
-i, --interactive | Enable interactive version selection |
-c, --coordinator-endpoint | Coordinator endpoint URL (default: http://coord.cyanprint.dev:9000) |
Environment Variables
| Variable | Description |
|---|---|
CYANPRINT_COORDINATOR | Override the coordinator endpoint URL |
Troubleshooting
Missing .cyan_state.yaml
If the .cyan_state.yaml file is missing, CyanPrint cannot determine the template history. You will need to re-initialize the project or restore the state file from version control.
Merge Conflicts
During 3-way merge, conflicts may occur when both you and the template have modified the same section. CyanPrint will preserve your local changes by default. Review the merged files carefully after an update.
CLI Reference
See CLI Commands for full command options.