@bestend/confluence-cli 1.16.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/skills/confluence/SKILL.md +722 -0
- package/README.md +251 -21
- package/bin/confluence.js +836 -116
- package/bin/index.js +6 -1
- package/lib/config.js +242 -40
- package/lib/confluence-client.js +309 -52
- package/package.json +10 -4
- package/.eslintrc.js +0 -23
- package/.github/ISSUE_TEMPLATE/bug_report.md +0 -34
- package/.github/ISSUE_TEMPLATE/feature_request.md +0 -26
- package/.github/ISSUE_TEMPLATE/feedback.md +0 -37
- package/.github/pull_request_template.md +0 -31
- package/.github/workflows/ci.yml +0 -28
- package/.github/workflows/publish.yml +0 -38
- package/.releaserc +0 -17
- package/AGENTS.md +0 -105
- package/CHANGELOG.md +0 -232
- package/CONTRIBUTING.md +0 -246
- package/docs/PROMOTION.md +0 -63
- package/eslint.config.js +0 -33
- package/examples/copy-tree-example.sh +0 -117
- package/examples/create-child-page-example.sh +0 -67
- package/examples/demo-page-management.sh +0 -68
- package/examples/demo.sh +0 -43
- package/examples/sample-page.md +0 -30
- package/jest.config.js +0 -13
- package/llms.txt +0 -46
- package/tests/confluence-client.test.js +0 -458
package/docs/PROMOTION.md
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
# GitHub Repository Topics
|
|
2
|
-
|
|
3
|
-
When setting up your GitHub repository, add these topics for better discoverability:
|
|
4
|
-
|
|
5
|
-
## Suggested Topics:
|
|
6
|
-
- `confluence`
|
|
7
|
-
- `atlassian`
|
|
8
|
-
- `cli`
|
|
9
|
-
- `command-line`
|
|
10
|
-
- `wiki`
|
|
11
|
-
- `documentation`
|
|
12
|
-
- `nodejs`
|
|
13
|
-
- `javascript`
|
|
14
|
-
- `api-client`
|
|
15
|
-
- `automation`
|
|
16
|
-
- `developer-tools`
|
|
17
|
-
- `productivity`
|
|
18
|
-
|
|
19
|
-
## How to add topics:
|
|
20
|
-
1. Go to https://github.com/pchuri/confluence-cli
|
|
21
|
-
2. Click the ⚙️ gear icon next to "About"
|
|
22
|
-
3. Add the topics above in the "Topics" field
|
|
23
|
-
4. Add a description: "A powerful command-line interface for Atlassian Confluence"
|
|
24
|
-
5. Add website: https://www.npmjs.com/package/confluence-cli
|
|
25
|
-
|
|
26
|
-
## Social Media Promotion Ideas:
|
|
27
|
-
|
|
28
|
-
### Twitter/X Posts:
|
|
29
|
-
```
|
|
30
|
-
🚀 Just released confluence-cli v1.0!
|
|
31
|
-
|
|
32
|
-
A powerful CLI tool for @Atlassian Confluence:
|
|
33
|
-
✅ Read pages from terminal
|
|
34
|
-
✅ Search documentation
|
|
35
|
-
✅ List spaces
|
|
36
|
-
✅ Works with environment variables
|
|
37
|
-
|
|
38
|
-
Perfect for automation & DevOps workflows!
|
|
39
|
-
|
|
40
|
-
#CLI #Confluence #DevTools #OpenSource
|
|
41
|
-
https://github.com/pchuri/confluence-cli
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
### LinkedIn Post:
|
|
45
|
-
```
|
|
46
|
-
Excited to share my latest open-source project: confluence-cli! 🎉
|
|
47
|
-
|
|
48
|
-
As someone who works with Confluence daily, I built this CLI tool to streamline documentation workflows. Now you can:
|
|
49
|
-
|
|
50
|
-
• Read Confluence pages from your terminal
|
|
51
|
-
• Search across your wiki content
|
|
52
|
-
• Integrate with CI/CD pipelines
|
|
53
|
-
• Automate documentation tasks
|
|
54
|
-
|
|
55
|
-
Available on NPM and fully open-source. Would love your feedback!
|
|
56
|
-
|
|
57
|
-
#OpenSource #CLI #Confluence #DevTools #Automation
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
### Dev.to Article Ideas:
|
|
61
|
-
1. "Building a CLI Tool for Confluence: From Bash Functions to NPM Package"
|
|
62
|
-
2. "How to Automate Your Documentation Workflow with Confluence CLI"
|
|
63
|
-
3. "Open Source Journey: Lessons Learned Building confluence-cli"
|
package/eslint.config.js
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
const util = require('util');
|
|
2
|
-
const js = require('@eslint/js');
|
|
3
|
-
const globals = require('globals');
|
|
4
|
-
|
|
5
|
-
if (typeof global.structuredClone !== 'function') {
|
|
6
|
-
global.structuredClone = typeof util.structuredClone === 'function'
|
|
7
|
-
? util.structuredClone
|
|
8
|
-
: (value) => JSON.parse(JSON.stringify(value));
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
module.exports = [
|
|
12
|
-
js.configs.recommended,
|
|
13
|
-
{
|
|
14
|
-
files: ['**/*.js'],
|
|
15
|
-
languageOptions: {
|
|
16
|
-
ecmaVersion: 2021,
|
|
17
|
-
sourceType: 'module',
|
|
18
|
-
globals: {
|
|
19
|
-
...globals.node,
|
|
20
|
-
...globals.jest
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
rules: {
|
|
24
|
-
indent: ['error', 2],
|
|
25
|
-
'linebreak-style': ['error', 'unix'],
|
|
26
|
-
quotes: ['error', 'single'],
|
|
27
|
-
semi: ['error', 'always'],
|
|
28
|
-
'no-unused-vars': ['error', { argsIgnorePattern: '^_', caughtErrors: 'none' }],
|
|
29
|
-
'no-console': 'off',
|
|
30
|
-
'no-process-exit': 'off'
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
];
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
|
|
3
|
-
# Confluence CLI - Copy Page Tree Example
|
|
4
|
-
# This script shows how to copy a page and all its descendants to a new location.
|
|
5
|
-
|
|
6
|
-
echo "📋 Confluence CLI - Copy Page Tree Example"
|
|
7
|
-
echo "=================================================="
|
|
8
|
-
|
|
9
|
-
# Prerequisites
|
|
10
|
-
echo ""
|
|
11
|
-
echo "📝 Prerequisites:"
|
|
12
|
-
echo "- confluence CLI is set up (confluence init)"
|
|
13
|
-
echo "- You have access to source and target locations"
|
|
14
|
-
echo "- You have permissions to create pages"
|
|
15
|
-
echo ""
|
|
16
|
-
|
|
17
|
-
# Step 1: Find the source page
|
|
18
|
-
echo "1️⃣ Find the source page"
|
|
19
|
-
echo "=============================="
|
|
20
|
-
echo ""
|
|
21
|
-
echo "Method 1: Find by title"
|
|
22
|
-
echo "confluence find \"Project Docs\" --space MYTEAM"
|
|
23
|
-
echo ""
|
|
24
|
-
echo "Method 2: Search"
|
|
25
|
-
echo "confluence search \"Project\""
|
|
26
|
-
echo ""
|
|
27
|
-
echo "📝 Note the source page ID from the output (e.g., 123456789)"
|
|
28
|
-
echo ""
|
|
29
|
-
|
|
30
|
-
# Step 2: Find the target parent page
|
|
31
|
-
echo "2️⃣ Find the target parent page"
|
|
32
|
-
echo "========================="
|
|
33
|
-
echo ""
|
|
34
|
-
echo "confluence find \"Backup\" --space BACKUP"
|
|
35
|
-
echo "or"
|
|
36
|
-
echo "confluence find \"Archive\" --space ARCHIVE"
|
|
37
|
-
echo ""
|
|
38
|
-
echo "📝 Note the target parent page ID (e.g., 987654321)"
|
|
39
|
-
echo ""
|
|
40
|
-
|
|
41
|
-
# Step 3: Run the copy
|
|
42
|
-
echo "3️⃣ Run copy"
|
|
43
|
-
echo "========================"
|
|
44
|
-
echo ""
|
|
45
|
-
|
|
46
|
-
echo "📄 Basic: copy with all children"
|
|
47
|
-
echo 'confluence copy-tree 123456789 987654321 "Project Docs (Backup)"'
|
|
48
|
-
echo ""
|
|
49
|
-
|
|
50
|
-
echo "📄 Depth-limited (3 levels)"
|
|
51
|
-
echo 'confluence copy-tree 123456789 987654321 "Project Docs (Summary)" --max-depth 3'
|
|
52
|
-
echo ""
|
|
53
|
-
|
|
54
|
-
echo "📄 Exclude patterns"
|
|
55
|
-
echo 'confluence copy-tree 123456789 987654321 "Project Docs (Clean)" --exclude "temp*,test*,*draft*"'
|
|
56
|
-
echo ""
|
|
57
|
-
|
|
58
|
-
echo "📄 Quiet mode"
|
|
59
|
-
echo 'confluence copy-tree 123456789 987654321 --quiet'
|
|
60
|
-
echo ""
|
|
61
|
-
|
|
62
|
-
echo "📄 Control pacing and naming"
|
|
63
|
-
echo 'confluence copy-tree 123456789 987654321 --delay-ms 150 --copy-suffix " (Backup)"'
|
|
64
|
-
echo ""
|
|
65
|
-
|
|
66
|
-
# Practical example
|
|
67
|
-
echo "💡 Practical example"
|
|
68
|
-
echo "================="
|
|
69
|
-
echo ""
|
|
70
|
-
echo "# 1. Capture source page ID"
|
|
71
|
-
echo 'SOURCE_ID=$(confluence find "Project Docs" --space MYTEAM | grep "ID:" | awk "{print \$2}")'
|
|
72
|
-
echo ""
|
|
73
|
-
echo "# 2. Capture target parent ID"
|
|
74
|
-
echo 'TARGET_ID=$(confluence find "Backup Folder" --space BACKUP | grep "ID:" | awk "{print \$2}")'
|
|
75
|
-
echo ""
|
|
76
|
-
echo "# 3. Run backup with date suffix"
|
|
77
|
-
echo 'confluence copy-tree $SOURCE_ID $TARGET_ID "Project Docs Backup - $(date +%Y%m%d)"'
|
|
78
|
-
echo ""
|
|
79
|
-
|
|
80
|
-
# Advanced usage
|
|
81
|
-
echo "🚀 Advanced"
|
|
82
|
-
echo "============="
|
|
83
|
-
echo ""
|
|
84
|
-
echo "1. Large trees with progress"
|
|
85
|
-
echo " confluence copy-tree 123456789 987654321 | tee copy-log.txt"
|
|
86
|
-
echo ""
|
|
87
|
-
echo "2. Multiple exclude patterns"
|
|
88
|
-
echo " confluence copy-tree 123456789 987654321 --exclude \"temp*,test*,*draft*,*temp*\""
|
|
89
|
-
echo ""
|
|
90
|
-
echo "3. Shallow copy (only direct children)"
|
|
91
|
-
echo " confluence copy-tree 123456789 987654321 --max-depth 1"
|
|
92
|
-
echo ""
|
|
93
|
-
|
|
94
|
-
# Notes and tips
|
|
95
|
-
echo "⚠️ Notes and tips"
|
|
96
|
-
echo "=================="
|
|
97
|
-
echo "- Large trees may take time to copy"
|
|
98
|
-
echo "- A short delay between siblings helps avoid rate limits (tune with --delay-ms)"
|
|
99
|
-
echo "- Partial copies can remain if errors occur"
|
|
100
|
-
echo "- Pages without permission are skipped; run with --fail-on-error to fail the run"
|
|
101
|
-
echo "- Validate links and references after copying"
|
|
102
|
-
echo "- Try with a small tree first"
|
|
103
|
-
echo ""
|
|
104
|
-
|
|
105
|
-
echo "📊 Verify results"
|
|
106
|
-
echo "================"
|
|
107
|
-
echo "After completion, you can check the results:"
|
|
108
|
-
echo ""
|
|
109
|
-
echo "# Root page info"
|
|
110
|
-
echo "confluence info [NEW_PAGE_ID]"
|
|
111
|
-
echo ""
|
|
112
|
-
echo "# Find copied pages"
|
|
113
|
-
echo "confluence search \"Copy\" --limit 20"
|
|
114
|
-
echo ""
|
|
115
|
-
|
|
116
|
-
echo "✅ Example complete!"
|
|
117
|
-
echo "Replace example IDs with real ones when running."
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
|
|
3
|
-
#!/bin/bash
|
|
4
|
-
|
|
5
|
-
# Create a test page under the Project Documentation page
|
|
6
|
-
# This script demonstrates typical Confluence CLI usage.
|
|
7
|
-
|
|
8
|
-
echo "🔍 Create a test page under Project Documentation"
|
|
9
|
-
echo "================================================"
|
|
10
|
-
|
|
11
|
-
# Step 1: Find the parent page
|
|
12
|
-
echo ""
|
|
13
|
-
echo "1️⃣ Find the parent page..."
|
|
14
|
-
echo "Run: confluence find \"Project Documentation\" --space MYTEAM"
|
|
15
|
-
echo ""
|
|
16
|
-
|
|
17
|
-
# For real execution, uncomment below
|
|
18
|
-
# confluence find "Project Documentation" --space MYTEAM
|
|
19
|
-
|
|
20
|
-
echo "📝 Note the page ID from the output (e.g., 123456789)"
|
|
21
|
-
echo ""
|
|
22
|
-
|
|
23
|
-
# Step 2: Inspect page info
|
|
24
|
-
echo "2️⃣ Inspect page info..."
|
|
25
|
-
echo "Run: confluence info [PAGE_ID]"
|
|
26
|
-
echo "Example: confluence info 123456789"
|
|
27
|
-
echo ""
|
|
28
|
-
|
|
29
|
-
# Step 3: Read page content (optional)
|
|
30
|
-
echo "3️⃣ Read content (optional)..."
|
|
31
|
-
echo "Run: confluence read [PAGE_ID] | head -20"
|
|
32
|
-
echo "Example: confluence read 123456789 | head -20"
|
|
33
|
-
echo ""
|
|
34
|
-
|
|
35
|
-
# Step 4: Create a child test page
|
|
36
|
-
echo "4️⃣ Create child test page..."
|
|
37
|
-
echo ""
|
|
38
|
-
|
|
39
|
-
# Simple text content
|
|
40
|
-
echo "📄 Option 1: Simple text content"
|
|
41
|
-
echo 'confluence create-child "Test Page - $(date +%Y%m%d)" [PARENT_PAGE_ID] --content "This is a test page created via CLI. Created at: $(date)"'
|
|
42
|
-
echo ""
|
|
43
|
-
|
|
44
|
-
# From Markdown file
|
|
45
|
-
echo "📄 Option 2: From Markdown file"
|
|
46
|
-
echo "confluence create-child \"Test Documentation - $(date +%Y%m%d)\" [PARENT_PAGE_ID] --file ./sample-page.md --format markdown"
|
|
47
|
-
echo ""
|
|
48
|
-
|
|
49
|
-
# From HTML content
|
|
50
|
-
echo "📄 Option 3: From HTML content"
|
|
51
|
-
echo 'confluence create-child "Test HTML Page" [PARENT_PAGE_ID] --content "<h1>Test Page</h1><p>This is a <strong>HTML</strong> example page.</p>" --format html'
|
|
52
|
-
echo ""
|
|
53
|
-
|
|
54
|
-
echo "💡 Practical example:"
|
|
55
|
-
echo "=============================="
|
|
56
|
-
echo "# 1. Get parent page ID"
|
|
57
|
-
echo 'PARENT_ID=$(confluence find "Project Documentation" --space MYTEAM | grep "ID:" | cut -d" " -f2)'
|
|
58
|
-
echo ""
|
|
59
|
-
echo "# 2. Create test page"
|
|
60
|
-
echo 'confluence create-child "Test Page - $(date +%Y%m%d_%H%M)" $PARENT_ID --content "Page for CLI testing."'
|
|
61
|
-
echo ""
|
|
62
|
-
|
|
63
|
-
echo "⚠️ Notes:"
|
|
64
|
-
echo "- confluence CLI must be set up (confluence init)"
|
|
65
|
-
echo "- You need appropriate permissions on the Confluence instance"
|
|
66
|
-
echo "- Ensure you have page creation permission"
|
|
67
|
-
echo "- Clean up test pages afterward"
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
|
|
3
|
-
# Confluence CLI Demo Script
|
|
4
|
-
# This script demonstrates the new page creation and update features
|
|
5
|
-
|
|
6
|
-
echo "🚀 Confluence CLI - Page Creation Demo"
|
|
7
|
-
echo "======================================"
|
|
8
|
-
|
|
9
|
-
# Note: Replace with your actual space key and ensure you have confluence-cli configured
|
|
10
|
-
SPACE_KEY="MYTEAM" # Change this to your space key
|
|
11
|
-
|
|
12
|
-
echo ""
|
|
13
|
-
echo "1. Creating a page from Markdown file..."
|
|
14
|
-
echo "confluence create \"Sample Page from CLI\" $SPACE_KEY --file ./sample-page.md --format markdown"
|
|
15
|
-
|
|
16
|
-
echo ""
|
|
17
|
-
echo "2. Creating a page with inline content..."
|
|
18
|
-
echo "confluence create \"Quick Note\" $SPACE_KEY --content \"This is a quick note created from the CLI\" --format storage"
|
|
19
|
-
|
|
20
|
-
echo ""
|
|
21
|
-
echo "3. Updating a page (replace 123456789 with actual page ID)..."
|
|
22
|
-
echo "confluence update 123456789 --content \"This page has been updated via CLI\""
|
|
23
|
-
|
|
24
|
-
echo ""
|
|
25
|
-
echo "4. Getting page content for editing..."
|
|
26
|
-
echo "confluence edit 123456789 --output ./page-backup.xml"
|
|
27
|
-
|
|
28
|
-
echo ""
|
|
29
|
-
echo "5. Searching for pages..."
|
|
30
|
-
echo "confluence search \"CLI\""
|
|
31
|
-
|
|
32
|
-
echo ""
|
|
33
|
-
echo "6. Listing all spaces..."
|
|
34
|
-
echo "confluence spaces"
|
|
35
|
-
|
|
36
|
-
echo ""
|
|
37
|
-
echo "7. Finding a page by title..."
|
|
38
|
-
echo "confluence find \"Project Documentation\" --space MYTEAM"
|
|
39
|
-
|
|
40
|
-
echo ""
|
|
41
|
-
echo "8. Creating a child page under a parent page..."
|
|
42
|
-
echo "confluence create-child \"Test Page\" 123456789 --content \"This is a test page created as a child\""
|
|
43
|
-
|
|
44
|
-
echo ""
|
|
45
|
-
echo "9. Creating a child page from Markdown file..."
|
|
46
|
-
echo "confluence create-child \"Test Documentation\" 123456789 --file ./sample-page.md --format markdown"
|
|
47
|
-
|
|
48
|
-
echo ""
|
|
49
|
-
echo "💡 Tips:"
|
|
50
|
-
echo "- Use --format markdown to create pages from Markdown files"
|
|
51
|
-
echo "- Use --format html for HTML content"
|
|
52
|
-
echo "- Use --format storage for Confluence native format"
|
|
53
|
-
echo "- Always backup important pages before updating"
|
|
54
|
-
echo "- Use 'confluence find' to get page IDs by title"
|
|
55
|
-
echo "- Child pages inherit permissions from their parent"
|
|
56
|
-
|
|
57
|
-
echo ""
|
|
58
|
-
echo "📝 Edit workflow:"
|
|
59
|
-
echo "1. confluence edit [pageId] --output page.xml"
|
|
60
|
-
echo "2. Edit the file with your preferred editor"
|
|
61
|
-
echo "3. confluence update [pageId] --file page.xml --format storage"
|
|
62
|
-
|
|
63
|
-
echo ""
|
|
64
|
-
echo "🔍 Finding and creating child pages workflow:"
|
|
65
|
-
echo "1. confluence find \"Project Documentation\" --space MYTEAM"
|
|
66
|
-
echo "2. Note the page ID from the result"
|
|
67
|
-
echo "3. confluence create-child \"Meeting Notes\" [parentId] --content \"Child content\""
|
|
68
|
-
echo "4. Or use: confluence create-child \"Technical Docs\" [parentId] --file ./content.md --format markdown"
|
package/examples/demo.sh
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
|
|
3
|
-
# Example script showing how to use confluence-cli
|
|
4
|
-
|
|
5
|
-
echo "🚀 Confluence CLI Examples"
|
|
6
|
-
echo "========================="
|
|
7
|
-
|
|
8
|
-
# Check if confluence command is available
|
|
9
|
-
if ! command -v confluence &> /dev/null; then
|
|
10
|
-
echo "❌ confluence command not found. Please install confluence-cli first:"
|
|
11
|
-
echo " npm install -g confluence-cli"
|
|
12
|
-
exit 1
|
|
13
|
-
fi
|
|
14
|
-
|
|
15
|
-
echo ""
|
|
16
|
-
echo "📋 Listing all spaces..."
|
|
17
|
-
confluence spaces
|
|
18
|
-
|
|
19
|
-
echo ""
|
|
20
|
-
echo "🔍 Searching for 'API' documentation..."
|
|
21
|
-
confluence search "API" --limit 5
|
|
22
|
-
|
|
23
|
-
echo ""
|
|
24
|
-
echo "ℹ️ Getting information about a specific page..."
|
|
25
|
-
# Replace this with an actual page ID from your Confluence
|
|
26
|
-
read -p "Enter a page ID to get info: " PAGE_ID
|
|
27
|
-
if [ ! -z "$PAGE_ID" ]; then
|
|
28
|
-
confluence info "$PAGE_ID"
|
|
29
|
-
|
|
30
|
-
echo ""
|
|
31
|
-
read -p "Do you want to read this page? (y/N): " READ_PAGE
|
|
32
|
-
if [ "$READ_PAGE" = "y" ] || [ "$READ_PAGE" = "Y" ]; then
|
|
33
|
-
echo ""
|
|
34
|
-
echo "📖 Reading page content..."
|
|
35
|
-
confluence read "$PAGE_ID" | head -20
|
|
36
|
-
echo ""
|
|
37
|
-
echo "(Showing first 20 lines only)"
|
|
38
|
-
fi
|
|
39
|
-
fi
|
|
40
|
-
|
|
41
|
-
echo ""
|
|
42
|
-
echo "✅ Examples completed!"
|
|
43
|
-
echo "💡 Run 'confluence --help' for more commands"
|
package/examples/sample-page.md
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
# Welcome to Confluence CLI
|
|
2
|
-
|
|
3
|
-
This is a sample page created using the **Confluence CLI** tool.
|
|
4
|
-
|
|
5
|
-
## Features
|
|
6
|
-
|
|
7
|
-
- Easy page creation from Markdown files
|
|
8
|
-
- Support for multiple content formats
|
|
9
|
-
- Command-line interface for automation
|
|
10
|
-
|
|
11
|
-
## Code Example
|
|
12
|
-
|
|
13
|
-
```javascript
|
|
14
|
-
const client = new ConfluenceClient(config);
|
|
15
|
-
await client.createPage('My Page', 'SPACE', content, 'markdown');
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
## Lists
|
|
19
|
-
|
|
20
|
-
1. First item
|
|
21
|
-
2. Second item
|
|
22
|
-
3. Third item
|
|
23
|
-
|
|
24
|
-
- Bullet point one
|
|
25
|
-
- Bullet point two
|
|
26
|
-
- Bullet point three
|
|
27
|
-
|
|
28
|
-
---
|
|
29
|
-
|
|
30
|
-
*Created with ❤️ using confluence-cli*
|
package/jest.config.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
testEnvironment: 'node',
|
|
3
|
-
collectCoverageFrom: [
|
|
4
|
-
'lib/**/*.js',
|
|
5
|
-
'bin/**/*.js',
|
|
6
|
-
'!node_modules/**'
|
|
7
|
-
],
|
|
8
|
-
coverageDirectory: 'coverage',
|
|
9
|
-
coverageReporters: ['text', 'lcov', 'html'],
|
|
10
|
-
testMatch: [
|
|
11
|
-
'**/tests/**/*.test.js'
|
|
12
|
-
]
|
|
13
|
-
};
|
package/llms.txt
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
# Confluence CLI
|
|
2
|
-
|
|
3
|
-
> A powerful command-line interface for Atlassian Confluence that allows you to read, search, and manage your Confluence content from the terminal.
|
|
4
|
-
|
|
5
|
-
This CLI tool provides a comprehensive set of commands for interacting with Confluence. Key features include creating, reading, updating, and searching for pages. It supports various content formats like markdown and HTML.
|
|
6
|
-
|
|
7
|
-
To get started, install the tool via npm and initialize the configuration:
|
|
8
|
-
```sh
|
|
9
|
-
npm install -g confluence-cli
|
|
10
|
-
confluence init
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
## Documentation
|
|
14
|
-
|
|
15
|
-
- [README.md](./README.md): Main documentation with installation, usage, and command reference.
|
|
16
|
-
|
|
17
|
-
## Core Source Code
|
|
18
|
-
|
|
19
|
-
- [bin/confluence.js](./bin/confluence.js): The main entry point for the CLI, defines commands and argument parsing.
|
|
20
|
-
- [lib/confluence-client.js](./lib/confluence-client.js): The client library for interacting with the Confluence REST API.
|
|
21
|
-
- [package.json](./package.json): Project metadata, dependencies, and scripts.
|
|
22
|
-
|
|
23
|
-
## Recent Changes & Fixes
|
|
24
|
-
|
|
25
|
-
This section summarizes recent improvements to align the codebase with its documentation and fix bugs.
|
|
26
|
-
|
|
27
|
-
### `update` Command Logic and Documentation:
|
|
28
|
-
- **Inconsistency:** The `README.md` suggested that updating a page's title without changing its content was possible. However, the implementation in `bin/confluence.js` incorrectly threw an error if the `--content` or `--file` flags were not provided, making title-only updates impossible.
|
|
29
|
-
- **Fix:**
|
|
30
|
-
- Modified `updatePage` in `lib/confluence-client.js` to fetch and re-use existing page content if no new content is provided.
|
|
31
|
-
- Adjusted validation in `bin/confluence.js` for the `update` command to only require one of `--title`, `--content`, or `--file`.
|
|
32
|
-
- Updated `README.md` with an example of a title-only update.
|
|
33
|
-
|
|
34
|
-
### Incomplete `README.md` Command Reference:
|
|
35
|
-
- **Inconsistency:** The main command table in `README.md` was missing several commands (`create`, `create-child`, `update`, `edit`, `find`).
|
|
36
|
-
- **Fix:** Expanded the command table in `README.md` to include all available commands.
|
|
37
|
-
|
|
38
|
-
### Misleading `read` Command URL Examples:
|
|
39
|
-
- **Inconsistency:** The documentation for the `read` command used "display" or "pretty" URLs, which are not supported by the `extractPageId` function.
|
|
40
|
-
- **Fix:** Removed incorrect URL examples and clarified that only URLs with a `pageId` query parameter are supported.
|
|
41
|
-
|
|
42
|
-
## Next Steps
|
|
43
|
-
|
|
44
|
-
- Refer to [README.md](./README.md) for detailed usage instructions and advanced configuration.
|
|
45
|
-
- For troubleshooting or to contribute, visit the project's GitHub repository at https://github.com/pchuri/confluence-cli.
|
|
46
|
-
- If you encounter issues, open an issue or check the FAQ section in the documentation.
|