Skip to content

Folders

Confluence Cloud introduced folders in September 2024 as a way to organize content without creating additional pages. atlcli supports syncing folders bidirectionally with your local filesystem.

  • Authenticated profile (atlcli auth login)
  • Confluence Cloud - Folders are not available on Data Center/Server
  • Space permission: View for pull, Edit for push operations

Folders in Confluence are organizational containers that can hold pages, other folders, whiteboards, and databases. Unlike pages, folders have no content body - they exist purely for organization.

atlcli represents folders using the index pattern:

docs/
├── my-folder/ # Confluence folder
│ ├── index.md # Folder metadata (type: folder)
│ ├── page-in-folder.md # Page inside folder
│ └── nested-folder/ # Nested folder
│ ├── index.md # Nested folder metadata
│ └── another-page.md

Folder index.md files contain frontmatter with type: folder:

---
atlcli:
id: "123456789"
title: "My Folder"
type: "folder"
---

The file has no content body - only frontmatter.

When you pull a space containing folders, atlcli:

  1. Detects folders by analyzing the page hierarchy
  2. Creates directory structure matching the Confluence hierarchy
  3. Creates index.md files with folder frontmatter
  4. Places child pages inside the folder directories
Terminal window
# Pull a space with folders
atlcli wiki docs pull ~/docs

If a folder is renamed in Confluence, atlcli detects this on pull and moves the entire local directory:

Renamed folder: old-name → new-name

All child pages are moved automatically with the directory.

When you attempt to rename a folder locally and push, atlcli will show:

Warning: Folder rename not supported by Confluence API.
Rename "Old Name" in Confluence UI, then pull.
  • Creating pages in folders: Push new pages inside folder directories
  • Updating pages in folders: Content changes sync normally
  • Folder structure: atlcli preserves the hierarchy
  • Renaming folders via push: Must be done in Confluence UI
  • Creating new folders via push: Not yet implemented
  • Moving folders via push: Not yet implemented

For the best experience with folders:

  1. Create and rename folders in Confluence UI - The web interface fully supports folder operations
  2. Pull to sync folder structure locally - Folder renames are detected and directories move automatically
  3. Create and edit pages locally - Push page changes as normal
  4. Use pull regularly - Keep your local structure in sync with Confluence
OperationAPIEndpoint
Get folderv2GET /wiki/api/v2/folders/{id}
List folder childrenv2GET /wiki/api/v2/folders/{id}/direct-children
Move page to folderv1PUT /wiki/rest/api/content/{id}/move/append/{folderId}

Since the v2 API’s getSpaceFolders endpoint is unreliable, atlcli detects folders by:

  1. Fetching all pages in the space
  2. Identifying parent IDs that aren’t in the page set
  3. Fetching those IDs as potential folders via the folder API

This ensures folders are discovered even when nested or when API endpoints behave unexpectedly.

Folders are fully supported in watch mode (docs sync):

Terminal window
atlcli wiki docs sync ./docs --space TEAM
EventDetectionAction
Folder created remotelyPolling detects new folder IDCreates directory + index.md
Folder renamed remotelyPolling detects title changeMoves entire directory
Page moved into folderPolling detects parent changeMoves local file to folder directory
Page moved out of folderPolling detects parent changeMoves local file to new location
[poll] Detected folder rename: "Old Name" → "New Name"
[sync] Moving directory: old-name/ → new-name/
[sync] Moved 5 files with directory

Compare a folder’s local metadata with Confluence:

Terminal window
atlcli wiki docs diff ./docs/my-folder/index.md

Since folders have no content body, diff only compares the title:

Folder: "My Folder"
No changes (folder has no content to diff)

If the title differs:

Folder: "My Folder"
Title mismatch:
Local: "My Folder"
Remote: "My Renamed Folder"
Terminal window
atlcli wiki docs diff ./docs/my-folder/index.md --json
{
"schemaVersion": "1",
"file": "./docs/my-folder/index.md",
"pageId": "123456789",
"title": "My Folder",
"type": "folder",
"hasChanges": false,
"localTitle": "My Folder",
"remoteTitle": "My Folder"
}

The docs check command validates folder structure:

Terminal window
atlcli wiki docs check ./docs
CodeSeverityDescription
FOLDER_EMPTYWarningFolder index.md exists but has no child pages or subfolders
FOLDER_MISSING_INDEXWarningDirectory contains .md files but has no index.md (not a synced folder)
Validating 24 files...
WARNINGS (2):
empty-folder/index.md:1 - Folder "Empty Folder" has no children [FOLDER_EMPTY]
orphan-dir - Directory "orphan-dir" contains pages but has no folder index.md [FOLDER_MISSING_INDEX]
Validation complete: 0 errors, 2 warnings

Folder validation is also available in the audit command:

Terminal window
atlcli audit wiki --folders

This adds folder structure issues to the audit report alongside stale pages, orphans, and broken links.

Jira and Confluence are trademarks of Atlassian Corporation Plc. atlcli is not affiliated with, endorsed by, or sponsored by Atlassian.