confluence-cli 1.0.0 → 1.1.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.
@@ -0,0 +1,37 @@
1
+ ---
2
+ name: General Feedback
3
+ about: Share your thoughts, suggestions, or general feedback about confluence-cli
4
+ title: '[FEEDBACK] '
5
+ labels: feedback, enhancement
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ ## 📝 Your Feedback
11
+
12
+ Thank you for taking the time to share your thoughts about confluence-cli!
13
+
14
+ ### What did you try to accomplish?
15
+ A clear description of what you were trying to do with confluence-cli.
16
+
17
+ ### How was your experience?
18
+ Tell us about your experience using the tool:
19
+ - What worked well?
20
+ - What was confusing or difficult?
21
+ - What features are you missing?
22
+
23
+ ### Your environment
24
+ - OS: [e.g. macOS, Windows, Linux]
25
+ - Node.js version: [e.g. 18.17.0]
26
+ - confluence-cli version: [e.g. 1.0.1]
27
+ - Confluence instance: [e.g. Cloud, Server, Data Center]
28
+
29
+ ### Feature requests or improvements
30
+ What would make confluence-cli more useful for you?
31
+
32
+ ### Additional context
33
+ Anything else you'd like to share about your experience with confluence-cli?
34
+
35
+ ---
36
+
37
+ 💡 **Tip**: You can also join our [Discussions](https://github.com/pchuri/confluence-cli/discussions) for general questions and community chat!
@@ -38,15 +38,24 @@ jobs:
38
38
  needs: [test, security]
39
39
  runs-on: ubuntu-latest
40
40
  if: github.ref == 'refs/heads/main'
41
+ permissions:
42
+ contents: write
43
+ issues: write
44
+ pull-requests: write
41
45
 
42
46
  steps:
43
47
  - uses: actions/checkout@v3
48
+ with:
49
+ fetch-depth: 0
50
+ token: ${{ secrets.GITHUB_TOKEN }}
44
51
 
45
52
  - name: Setup Node.js
46
53
  uses: actions/setup-node@v3
47
54
  with:
48
55
  node-version: '18'
49
56
  registry-url: 'https://registry.npmjs.org'
57
+ env:
58
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
50
59
 
51
60
  - run: npm ci
52
61
  - run: npm test
@@ -56,3 +65,4 @@ jobs:
56
65
  env:
57
66
  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
58
67
  NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
68
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
package/CHANGELOG.md CHANGED
@@ -1,3 +1,25 @@
1
+ # [1.1.0](https://github.com/pchuri/confluence-cli/compare/v1.0.0...v1.1.0) (2025-06-26)
2
+
3
+
4
+ ### Features
5
+
6
+ * add analytics tracking to spaces command ([265e8f4](https://github.com/pchuri/confluence-cli/commit/265e8f42b5ba86fb50398e8b1fcfd1d85fcc54d9))
7
+ * add community feedback and analytics infrastructure ([a7ff6e8](https://github.com/pchuri/confluence-cli/commit/a7ff6e87cdc92d98f3d927ee98fac9e33aedbaae))
8
+
9
+ # 1.0.0 (2025-06-26)
10
+
11
+
12
+ ### Bug Fixes
13
+
14
+ * add explicit permissions for GitHub Actions ([fa36b29](https://github.com/pchuri/confluence-cli/commit/fa36b2974b1261c144a415ced324383b35a938fb))
15
+ * add NODE_AUTH_TOKEN for npm authentication ([2031314](https://github.com/pchuri/confluence-cli/commit/2031314ad01fc1d9b4f9557a3d1321a046cad8f3))
16
+ * resolve eslint errors and npm publish warnings ([b93285e](https://github.com/pchuri/confluence-cli/commit/b93285ee098d96c8b750dbf2be5a93f28f44706c))
17
+
18
+
19
+ ### Features
20
+
21
+ * initial release of confluence-cli ([ec04e06](https://github.com/pchuri/confluence-cli/commit/ec04e06bb0c785dcff84dabcafeeb60bf9e1658f))
22
+
1
23
  # Confluence CLI Changelog
2
24
 
3
25
  All notable changes to this project will be documented in this file.
package/README.md CHANGED
@@ -91,6 +91,11 @@ confluence search "search term" --limit 5
91
91
  confluence spaces
92
92
  ```
93
93
 
94
+ ### View Usage Statistics
95
+ ```bash
96
+ confluence stats
97
+ ```
98
+
94
99
  ## Commands
95
100
 
96
101
  | Command | Description | Options |
@@ -100,6 +105,7 @@ confluence spaces
100
105
  | `info <pageId>` | Get page information | - |
101
106
  | `search <query>` | Search for pages | `--limit <number>` |
102
107
  | `spaces` | List all spaces | - |
108
+ | `stats` | View your usage statistics | - |
103
109
 
104
110
  ## Examples
105
111
 
@@ -121,6 +127,9 @@ confluence search "API documentation" --limit 3
121
127
 
122
128
  # List all spaces
123
129
  confluence spaces
130
+
131
+ # View usage statistics
132
+ confluence stats
124
133
  ```
125
134
 
126
135
  ## Development
@@ -165,13 +174,36 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file
165
174
  - [ ] Page attachments management
166
175
  - [ ] Comments and reviews
167
176
 
168
- ## Support
177
+ ## Support & Feedback
178
+
179
+ ### 💬 We'd love to hear from you!
169
180
 
170
- If you encounter any issues or have questions:
181
+ Your feedback helps make confluence-cli better for everyone. Here's how you can share your thoughts:
171
182
 
183
+ #### 🐛 Found a bug?
172
184
  1. Check the [Issues](https://github.com/pchuri/confluence-cli/issues) page
173
- 2. Create a new issue if your problem isn't already reported
174
- 3. Provide detailed information about your environment and the issue
185
+ 2. Create a new [bug report](https://github.com/pchuri/confluence-cli/issues/new?template=bug_report.md)
186
+
187
+ #### 💡 Have a feature idea?
188
+ 1. Create a [feature request](https://github.com/pchuri/confluence-cli/issues/new?template=feature_request.md)
189
+ 2. Join our [Discussions](https://github.com/pchuri/confluence-cli/discussions) to chat with the community
190
+
191
+ #### 📝 General feedback?
192
+ - Share your experience with a [feedback issue](https://github.com/pchuri/confluence-cli/issues/new?template=feedback.md)
193
+ - Rate us on [NPM](https://www.npmjs.com/package/confluence-cli)
194
+ - Star the repo if you find it useful! ⭐
195
+
196
+ #### 🤝 Want to contribute?
197
+ Check out our [Contributing Guide](CONTRIBUTING.md) - all contributions are welcome!
198
+
199
+ ### 📈 Usage Analytics
200
+
201
+ To help us understand how confluence-cli is being used and improve it, we collect anonymous usage statistics. This includes:
202
+ - Command usage frequency (no personal data)
203
+ - Error patterns (to fix bugs faster)
204
+ - Feature adoption metrics
205
+
206
+ You can opt-out anytime by setting: `export CONFLUENCE_CLI_ANALYTICS=false`
175
207
 
176
208
  ---
177
209
 
package/bin/confluence.js CHANGED
@@ -4,6 +4,7 @@ const { program } = require('commander');
4
4
  const chalk = require('chalk');
5
5
  const ConfluenceClient = require('../lib/confluence-client');
6
6
  const { getConfig, initConfig } = require('../lib/config');
7
+ const Analytics = require('../lib/analytics');
7
8
 
8
9
  program
9
10
  .name('confluence')
@@ -24,12 +25,15 @@ program
24
25
  .description('Read a Confluence page by ID or URL')
25
26
  .option('-f, --format <format>', 'Output format (html, text)', 'text')
26
27
  .action(async (pageId, options) => {
28
+ const analytics = new Analytics();
27
29
  try {
28
30
  const config = getConfig();
29
31
  const client = new ConfluenceClient(config);
30
32
  const content = await client.readPage(pageId, options.format);
31
33
  console.log(content);
34
+ analytics.track('read', true);
32
35
  } catch (error) {
36
+ analytics.track('read', false);
33
37
  console.error(chalk.red('Error:'), error.message);
34
38
  process.exit(1);
35
39
  }
@@ -40,6 +44,7 @@ program
40
44
  .command('info <pageId>')
41
45
  .description('Get information about a Confluence page')
42
46
  .action(async (pageId) => {
47
+ const analytics = new Analytics();
43
48
  try {
44
49
  const config = getConfig();
45
50
  const client = new ConfluenceClient(config);
@@ -52,7 +57,9 @@ program
52
57
  if (info.space) {
53
58
  console.log(`Space: ${chalk.green(info.space.name)} (${info.space.key})`);
54
59
  }
60
+ analytics.track('info', true);
55
61
  } catch (error) {
62
+ analytics.track('info', false);
56
63
  console.error(chalk.red('Error:'), error.message);
57
64
  process.exit(1);
58
65
  }
@@ -64,6 +71,7 @@ program
64
71
  .description('Search for Confluence pages')
65
72
  .option('-l, --limit <limit>', 'Limit number of results', '10')
66
73
  .action(async (query, options) => {
74
+ const analytics = new Analytics();
67
75
  try {
68
76
  const config = getConfig();
69
77
  const client = new ConfluenceClient(config);
@@ -71,6 +79,7 @@ program
71
79
 
72
80
  if (results.length === 0) {
73
81
  console.log(chalk.yellow('No results found.'));
82
+ analytics.track('search', true);
74
83
  return;
75
84
  }
76
85
 
@@ -81,7 +90,9 @@ program
81
90
  console.log(` ${chalk.gray(result.excerpt)}`);
82
91
  }
83
92
  });
93
+ analytics.track('search', true);
84
94
  } catch (error) {
95
+ analytics.track('search', false);
85
96
  console.error(chalk.red('Error:'), error.message);
86
97
  process.exit(1);
87
98
  }
@@ -92,6 +103,7 @@ program
92
103
  .command('spaces')
93
104
  .description('List all Confluence spaces')
94
105
  .action(async () => {
106
+ const analytics = new Analytics();
95
107
  try {
96
108
  const config = getConfig();
97
109
  const client = new ConfluenceClient(config);
@@ -101,6 +113,22 @@ program
101
113
  spaces.forEach(space => {
102
114
  console.log(`${chalk.green(space.key)} - ${space.name}`);
103
115
  });
116
+ analytics.track('spaces', true);
117
+ } catch (error) {
118
+ analytics.track('spaces', false);
119
+ console.error(chalk.red('Error:'), error.message);
120
+ process.exit(1);
121
+ }
122
+ });
123
+
124
+ // Stats command
125
+ program
126
+ .command('stats')
127
+ .description('Show usage statistics')
128
+ .action(async () => {
129
+ try {
130
+ const analytics = new Analytics();
131
+ analytics.showStats();
104
132
  } catch (error) {
105
133
  console.error(chalk.red('Error:'), error.message);
106
134
  process.exit(1);
@@ -0,0 +1,63 @@
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"
@@ -0,0 +1,87 @@
1
+ const os = require('os');
2
+ const path = require('path');
3
+ const fs = require('fs');
4
+
5
+ /**
6
+ * Simple anonymous usage analytics
7
+ * Helps understand which features are most used
8
+ */
9
+ class Analytics {
10
+ constructor() {
11
+ this.enabled = process.env.CONFLUENCE_CLI_ANALYTICS !== 'false';
12
+ this.configDir = path.join(os.homedir(), '.confluence-cli');
13
+ this.statsFile = path.join(this.configDir, 'stats.json');
14
+ }
15
+
16
+ /**
17
+ * Track command usage (anonymous)
18
+ */
19
+ track(command, success = true) {
20
+ if (!this.enabled) return;
21
+
22
+ try {
23
+ let stats = {};
24
+
25
+ // Read existing stats
26
+ if (fs.existsSync(this.statsFile)) {
27
+ stats = JSON.parse(fs.readFileSync(this.statsFile, 'utf8'));
28
+ }
29
+
30
+ // Initialize stats structure
31
+ if (!stats.commands) stats.commands = {};
32
+ if (!stats.firstUsed) stats.firstUsed = new Date().toISOString();
33
+ stats.lastUsed = new Date().toISOString();
34
+
35
+ // Track command usage
36
+ const commandKey = `${command}_${success ? 'success' : 'error'}`;
37
+ stats.commands[commandKey] = (stats.commands[commandKey] || 0) + 1;
38
+
39
+ // Create directory if it doesn't exist
40
+ if (!fs.existsSync(this.configDir)) {
41
+ fs.mkdirSync(this.configDir, { recursive: true });
42
+ }
43
+
44
+ // Save stats
45
+ fs.writeFileSync(this.statsFile, JSON.stringify(stats, null, 2));
46
+ } catch (error) {
47
+ // Silently fail - analytics should never break the main functionality
48
+ }
49
+ }
50
+
51
+ /**
52
+ * Get usage statistics
53
+ */
54
+ getStats() {
55
+ if (!fs.existsSync(this.statsFile)) {
56
+ return null;
57
+ }
58
+
59
+ try {
60
+ return JSON.parse(fs.readFileSync(this.statsFile, 'utf8'));
61
+ } catch (error) {
62
+ return null;
63
+ }
64
+ }
65
+
66
+ /**
67
+ * Show usage stats to user
68
+ */
69
+ showStats() {
70
+ const stats = this.getStats();
71
+ if (!stats) {
72
+ console.log('No usage statistics available.');
73
+ return;
74
+ }
75
+
76
+ console.log('📊 Usage Statistics:');
77
+ console.log(`First used: ${new Date(stats.firstUsed).toLocaleDateString()}`);
78
+ console.log(`Last used: ${new Date(stats.lastUsed).toLocaleDateString()}`);
79
+ console.log('\nCommand usage:');
80
+
81
+ Object.entries(stats.commands).forEach(([command, count]) => {
82
+ console.log(` ${command}: ${count} times`);
83
+ });
84
+ }
85
+ }
86
+
87
+ module.exports = Analytics;
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "confluence-cli",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "description": "A command-line interface for Atlassian Confluence",
5
5
  "main": "index.js",
6
6
  "bin": {
7
- "confluence": "./bin/index.js"
7
+ "confluence": "bin/index.js"
8
8
  },
9
9
  "scripts": {
10
10
  "start": "node bin/confluence.js",
@@ -39,7 +39,7 @@
39
39
  },
40
40
  "repository": {
41
41
  "type": "git",
42
- "url": "https://github.com/pchuri/confluence-cli.git"
42
+ "url": "git+https://github.com/pchuri/confluence-cli.git"
43
43
  },
44
44
  "bugs": {
45
45
  "url": "https://github.com/pchuri/confluence-cli/issues"