Skip to content

Team Docs Sync

Keep team documentation in sync between local files and Confluence.

  • Authenticated profile (atlcli auth login)
  • Confluence permission: View Space (pull), Edit Pages (push)
  • Git installed for version control

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
Terminal window
atlcli wiki docs init ./team-docs --space TEAM
Terminal window
atlcli wiki docs pull ./team-docs
Terminal window
cd team-docs
git init
git add .
git commit -m "Initial docs sync"
Terminal window
# Pull latest from Confluence
atlcli wiki docs pull ./team-docs
# Check for changes
git status
# Edit locally...
# Push changes to Confluence
atlcli wiki docs push ./team-docs
# Commit to Git
git add .
git commit -m "Update API documentation"

When both local and Confluence have changes:

Terminal window
# Pull will warn about conflicts
atlcli wiki docs pull ./team-docs
# Review changes
git diff
# Choose resolution:
# Option 1: Keep local changes
atlcli wiki docs push ./team-docs --force
# Option 2: Accept remote changes
atlcli wiki docs pull ./team-docs --force

Sync before committing:

.git/hooks/pre-commit
#!/bin/bash
atlcli wiki docs push ./team-docs --dry-run
if [ $? -ne 0 ]; then
echo "Docs sync would fail. Check changes."
exit 1
fi

Auto-sync during editing:

Terminal window
atlcli wiki docs sync ./team-docs --watch
  • Use .gitignore to exclude generated files
  • Keep images in ./team-docs/images/
  • Use frontmatter for page metadata
  • Review git diff before pushing to Confluence
Jira and Confluence are trademarks of Atlassian Corporation Plc. atlcli is not affiliated with, endorsed by, or sponsored by Atlassian.