feat: Add CLI flags to confluence init for non-interactive setup#30
Merged
feat: Add CLI flags to confluence init for non-interactive setup#30
Conversation
- Add CLI options: --domain, --api-path, --auth-type, --email, --token - Support three modes: - Interactive (no flags): existing behavior - Non-interactive (all flags): validates and saves immediately - Hybrid (some flags): prompts for missing values - Infer authType from email when not explicitly provided - Infer apiPath from domain when not provided - Clear error messages for validation failures - Update README with new setup options and examples
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds CLI flag support to the confluence init command, enabling non-interactive configuration for CI/CD pipelines, Docker builds, and AI coding agents that cannot handle interactive prompts.
Changes:
- Added 5 new CLI flags (
--domain,--api-path,--auth-type,--email,--token) to support non-interactive setup - Implemented three operational modes: fully interactive (no flags), fully non-interactive (all required flags), and hybrid (partial flags with prompts for missing values)
- Added validation helpers and smart inference logic for authentication type and API path defaults
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| lib/config.js | Core implementation of CLI option parsing, validation, and multi-mode configuration flow |
| README.md | Documentation updates showing the new non-interactive setup options and examples |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Fix default authType to 'bearer' when no email provided (was incorrectly 'basic') - Simplify canBeNonInteractive condition (remove redundant check)
- Fix hybrid mode email prompt to use 'when' for dynamic authType check - Fix saveConfig to safely handle undefined email (prevent trim() error) - Enhance validateCliOptions to use normalizeApiPath for proper validation
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 3 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Remove redundant canBeNonInteractive variable, use hasRequiredValues directly - Remove || 'basic' fallback to let normalizeAuthType handle undefined properly
github-actions Bot
pushed a commit
that referenced
this pull request
Feb 6, 2026
# [1.15.0](v1.14.0...v1.15.0) (2026-02-06) ### Features * Add CLI flags to confluence init for non-interactive setup ([#30](#30)) ([09b6b85](09b6b85))
|
🎉 This PR is included in version 1.15.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
bestend
pushed a commit
to bestend/confluence-cli
that referenced
this pull request
Feb 9, 2026
…uri#30) * feat: add CLI flags to confluence init for non-interactive setup - Add CLI options: --domain, --api-path, --auth-type, --email, --token - Support three modes: - Interactive (no flags): existing behavior - Non-interactive (all flags): validates and saves immediately - Hybrid (some flags): prompts for missing values - Infer authType from email when not explicitly provided - Infer apiPath from domain when not provided - Clear error messages for validation failures - Update README with new setup options and examples * fix: address Copilot AI review feedback - Fix default authType to 'bearer' when no email provided (was incorrectly 'basic') - Simplify canBeNonInteractive condition (remove redundant check) * fix: improve robustness and validation logic - Fix hybrid mode email prompt to use 'when' for dynamic authType check - Fix saveConfig to safely handle undefined email (prevent trim() error) - Enhance validateCliOptions to use normalizeApiPath for proper validation * refactor: simplify non-interactive mode logic - Remove redundant canBeNonInteractive variable, use hasRequiredValues directly - Remove || 'basic' fallback to let normalizeAuthType handle undefined properly
bestend
pushed a commit
to bestend/confluence-cli
that referenced
this pull request
Feb 9, 2026
# [1.15.0](pchuri/confluence-cli@v1.14.0...v1.15.0) (2026-02-06) ### Features * Add CLI flags to confluence init for non-interactive setup ([pchuri#30](pchuri#30)) ([4074014](pchuri@4074014))
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes
Fixes #29
Description
Adds support for non-interactive configuration via CLI flags to
confluence initcommand. This enables usage in CI/CD pipelines, Docker builds, and AI coding agents that cannot respond to interactive prompts.Changes
✨ Add 5 new CLI options to
initcommand:--domain/-d: Confluence domain--api-path/-p: REST API path--auth-type/-a: Authentication type (basic or bearer)--email/-e: Email for basic auth--token/-t: API token🔄 Support three operational modes:
🧠 Smart inference:
--emailprovided without--auth-type: infersbasicbearer--api-pathmissing: infers from domain (e.g.,/wiki/rest/apifor.atlassian.net)✅ Full backward compatibility:
confluence init(no flags) works exactly as beforeTesting
Documentation