Thank you for your interest in contributing to Confluence CLI! This document provides guidelines and information about contributing to this project.
- Code of Conduct
- Getting Started
- Development Setup
- Making Changes
- Testing
- Submitting Changes
- Coding Standards
This project adheres to a code of conduct. By participating, you are expected to uphold this code. Please be respectful and considerate in all interactions.
- Fork the repository on GitHub
- Clone your fork locally
- Create a branch for your changes
- Make your changes
- Test your changes
- Submit a pull request
# Clone your fork
git clone https://github.com/your-username/confluence-cli.git
cd confluence-cli
# Install dependencies
npm install
# Set up your test environment
export CONFLUENCE_DOMAIN="your-test-domain.atlassian.net"
export CONFLUENCE_API_TOKEN="your-test-token"
# Test the CLI locally
node bin/confluence.js --helpUse descriptive branch names:
feature/add-page-creation- for new featuresfix/search-pagination- for bug fixesdocs/update-readme- for documentation updatesrefactor/client-architecture- for refactoring
Write clear, descriptive commit messages:
feat: add page creation functionality
- Add create command to CLI
- Implement createPage method in client
- Add tests for page creation
- Update README with new command
Use conventional commit format:
feat:- new featuresfix:- bug fixesdocs:- documentation changesstyle:- formatting changesrefactor:- code refactoringtest:- adding testschore:- maintenance tasks
# Run all tests
npm test
# Run tests in watch mode
npm run test:watch
# Check test coverage
npm run test:coverage
# Manual testing
node bin/confluence.js read 123456789- Write tests for new functionality
- Ensure existing tests pass
- Aim for good test coverage
- Use descriptive test names
- Mock external API calls
- Push your changes to your fork
- Create a pull request against the main branch
- Fill out the PR template with:
- Description of changes
- Type of change (bug fix, feature, etc.)
- Testing performed
- Screenshots (if applicable)
- Keep PRs focused and atomic
- Include tests for new functionality
- Update documentation as needed
- Ensure CI passes
- Request review from maintainers
- Use ES6+ features when appropriate
- Follow existing code style
- Use meaningful variable names
- Add comments for complex logic
- Keep functions small and focused
The CLI includes enhanced markdown support with:
- Native Confluence Storage Format: Converts markdown to native Confluence elements instead of HTML macros
- Confluence Extensions: Support for admonitions (
[!info],[!warning],[!note]) - Bidirectional Conversion: Convert from markdown to storage format and back
- Rich Elements: Tables, code blocks, lists, links, and formatting
Example markdown with Confluence extensions:
# My Page
[!info]
This is an info admonition that will render as a Confluence info macro.
```javascript
console.log("Code blocks preserve syntax highlighting");| Feature | Status |
|---|---|
| Tables | ✅ |
| Lists | ✅ |
### File Structure
bin/ # CLI entry points lib/ # Core library code ├── confluence-client.js ├── config.js └── utils.js tests/ # Test files docs/ # Additional documentation
### Error Handling
- Always handle errors gracefully
- Provide helpful error messages
- Use appropriate exit codes
- Log errors appropriately
### Documentation
- Update README for new features
- Add JSDoc comments for functions
- Update CHANGELOG for releases
- Include usage examples
## Feature Requests
Before implementing major features:
1. **Check existing issues** to avoid duplication
2. **Create an issue** to discuss the feature
3. **Get maintainer feedback** before starting work
4. **Follow the agreed approach** in implementation
## Bug Reports
When reporting bugs:
1. **Check existing issues** first
2. **Provide reproduction steps**
3. **Include environment details**:
- Node.js version
- OS and version
- CLI version
4. **Share error messages** and logs
## Development Tips
### Local Testing
```bash
# Test against your Confluence instance
export CONFLUENCE_DOMAIN="your-domain.atlassian.net"
export CONFLUENCE_API_TOKEN="your-token"
# Test commands
node bin/confluence.js spaces
node bin/confluence.js search "test"
node bin/confluence.js read 123456789
# Enable debug mode
DEBUG=confluence-cli node bin/confluence.js read 123456789
# Use Node.js debugger
node --inspect-brk bin/confluence.js read 123456789For maintainers:
- Update version in
package.json - Update
CHANGELOG.md - Create git tag
- Push to npm
- Create GitHub release
If you have questions about contributing:
- Check existing documentation
- Search closed issues
- Ask in a new issue
- Contact maintainers
Thank you for contributing to Confluence CLI! 🚀