Team Docs Sync
Team Docs Sync
Section titled “Team Docs Sync”Keep team documentation in sync between local files and Confluence.
Prerequisites
Section titled “Prerequisites”- Authenticated profile (
atlcli auth login) - Confluence permission: View Space (pull), Edit Pages (push)
- Git installed for version control
Use Case
Section titled “Use Case”Your team maintains documentation in a Git repository. You want to:
- Write docs in markdown with your favorite editor
- Version control with Git
- Publish to Confluence for stakeholders
1. Initialize Directory
Section titled “1. Initialize Directory”atlcli wiki docs init ./team-docs --space TEAM2. Pull Existing Content
Section titled “2. Pull Existing Content”atlcli wiki docs pull ./team-docs3. Add to Git
Section titled “3. Add to Git”cd team-docsgit initgit add .git commit -m "Initial docs sync"Workflow
Section titled “Workflow”Daily Workflow
Section titled “Daily Workflow”# Pull latest from Confluenceatlcli wiki docs pull ./team-docs
# Check for changesgit status
# Edit locally...
# Push changes to Confluenceatlcli wiki docs push ./team-docs
# Commit to Gitgit add .git commit -m "Update API documentation"Conflict Resolution
Section titled “Conflict Resolution”When both local and Confluence have changes:
# Pull will warn about conflictsatlcli wiki docs pull ./team-docs
# Review changesgit diff
# Choose resolution:# Option 1: Keep local changesatlcli wiki docs push ./team-docs --force
# Option 2: Accept remote changesatlcli wiki docs pull ./team-docs --forceAutomation
Section titled “Automation”Git Pre-commit Hook
Section titled “Git Pre-commit Hook”Sync before committing:
#!/bin/bashatlcli wiki docs push ./team-docs --dry-runif [ $? -ne 0 ]; then echo "Docs sync would fail. Check changes." exit 1fiWatch Mode
Section titled “Watch Mode”Auto-sync during editing:
atlcli wiki docs sync ./team-docs --watch- Use
.gitignoreto exclude generated files - Keep images in
./team-docs/images/ - Use frontmatter for page metadata
- Review
git diffbefore pushing to Confluence
Related Topics
Section titled “Related Topics”- Confluence Sync - Full sync documentation
- File Format - Frontmatter and markdown
- CI/CD Docs - Automated publishing
Jira and Confluence are trademarks of Atlassian Corporation Plc.
atlcli is not affiliated with, endorsed by, or sponsored by Atlassian.