A .NET tool that provides a command-line interface to interact with self-hosted Confluence, Jira, Bamboo, and BitBucket (on-prem) instances via their REST APIs.
Install the tool globally using the .NET CLI:
dotnet tool install --global AtlassianCliAfter installation, you can use the atlassiancli command from anywhere:
atlassiancli --helpTo update to the latest version:
dotnet tool update --global AtlassianCliTo uninstall the tool:
dotnet tool uninstall --global AtlassianCli- Create pages in any Confluence space
- Read pages by ID or by title + space key
- Update pages with replace or append mode
- Support for Confluence storage format (XHTML)
- Read issues by key
- Create issues in any project
- Add comments to issues
- Change status of issues (transitions)
- Assign users to issues
- Update issue descriptions
- List projects and view project details
- List plans and view plan configuration
- List branches for a plan
- View build results for plans
- Get build details including stages, changes, and test results
- Get build logs with optional text filtering (e.g., filter for 'error' or 'exception')
- Trigger builds (queue builds for plans and branches)
- Get pull request information including title, description, state, and reviewers
- View pull request diffs with file changes
- List pull request commits with author and message details
- Read pull request comments and review discussions
- Add review comments to pull requests
- Environment variable-based configuration
- Comprehensive help system
- Hierarchical sub-commands (confluence/jira/bamboo/bitbucket)
- .NET 10.0 SDK or later
- Access to a Confluence, Jira, Bamboo, and/or BitBucket instance with REST API enabled
The CLI supports three authentication methods (in order of preference):
-
Bearer Token (Personal Access Token) - Recommended for on-premises instances
- Set only
*_API_TOKENenvironment variable - Uses HTTP Bearer authentication
- See Atlassian PAT documentation
- Set only
-
API Token with Username - For Atlassian Cloud
- Set both
*_USERNAMEand*_API_TOKEN - Uses HTTP Basic authentication with token as password
- Set both
-
Username and Password - Legacy method
- Set both
*_USERNAMEand*_PASSWORD - Uses HTTP Basic authentication
- Set both
| Variable | Required | Description |
|---|---|---|
CONFLUENCE_BASE_URL |
Yes | Base URL of your Confluence instance (e.g., https://confluence.example.com) |
CONFLUENCE_API_TOKEN |
Conditional | Personal Access Token for Bearer auth (use alone), or API token (use with username) |
CONFLUENCE_USERNAME |
Conditional | Username for Basic auth (required with API token for Cloud, or with password) |
CONFLUENCE_PASSWORD |
Conditional | Password for Basic auth (use with username) |
| Variable | Required | Description |
|---|---|---|
JIRA_BASE_URL |
Yes | Base URL of your Jira instance (e.g., https://jira.example.com) |
JIRA_API_TOKEN |
Conditional | Personal Access Token for Bearer auth (use alone), or API token (use with username) |
JIRA_USERNAME |
Conditional | Username for Basic auth (required with API token for Cloud, or with password) |
JIRA_PASSWORD |
Conditional | Password for Basic auth (use with username) |
| Variable | Required | Description |
|---|---|---|
BAMBOO_BASE_URL |
Yes | Base URL of your Bamboo instance (e.g., https://bamboo.example.com) |
BAMBOO_API_TOKEN |
Conditional | Personal Access Token for Bearer auth (use alone), or API token (use with username) |
BAMBOO_USERNAME |
Conditional | Username for Basic auth (required with API token for Cloud, or with password) |
BAMBOO_PASSWORD |
Conditional | Password for Basic auth (use with username) |
| Variable | Required | Description |
|---|---|---|
BITBUCKET_BASE_URL |
Yes | Base URL of your BitBucket instance (e.g., https://bitbucket.example.com) |
BITBUCKET_API_TOKEN |
Conditional | Personal Access Token for Bearer auth (use alone), or API token (use with username) |
BITBUCKET_USERNAME |
Conditional | Username for Basic auth (required with API token for Cloud, or with password) |
BITBUCKET_PASSWORD |
Conditional | Password for Basic auth (use with username) |
# Confluence with PAT
export CONFLUENCE_BASE_URL=https://confluence.example.com
export CONFLUENCE_API_TOKEN=your-personal-access-token
# Jira with PAT
export JIRA_BASE_URL=https://jira.example.com
export JIRA_API_TOKEN=your-personal-access-token# Confluence Cloud
export CONFLUENCE_BASE_URL=https://your-domain.atlassian.net/wiki
export CONFLUENCE_USERNAME=your.email@example.com
export CONFLUENCE_API_TOKEN=your-api-token
# Jira Cloud
export JIRA_BASE_URL=https://your-domain.atlassian.net
export JIRA_USERNAME=your.email@example.com
export JIRA_API_TOKEN=your-api-token
# Bamboo with PAT
export BAMBOO_BASE_URL=https://bamboo.example.com
export BAMBOO_API_TOKEN=your-personal-access-token
# BitBucket with PAT
export BITBUCKET_BASE_URL=https://bitbucket.example.com
export BITBUCKET_API_TOKEN=your-personal-access-tokendotnet buildThe CLI uses a hierarchical command structure where you first specify the service (confluence, jira, bamboo, or bitbucket) followed by the specific command.
dotnet run -- --help
dotnet run -- confluence --help
dotnet run -- jira --help
dotnet run -- bamboo --help
dotnet run -- bitbucket --helpAll commands that accept body or description content support reading from a UTF-8 encoded file using the --file option (or --description-file for create-issue). This allows you to provide content from a file instead of the command line.
Example with file:
dotnet run -- confluence create-page --space MYSPACE --title "My Page" --file content.htmldotnet run -- confluence create-page --space MYSPACE --title "My New Page" --body "<p>Hello Confluence!</p>"With file:
dotnet run -- confluence create-page --space MYSPACE --title "My New Page" --file content.htmlOptions:
-s, --space(required): Space key-t, --title(required): Page title-b, --body: Page content in storage format (either --body or --file is required)--file: Path to a UTF-8 encoded file containing the body content
By ID:
dotnet run -- confluence get-page --id 12345By title and space:
dotnet run -- confluence get-page --space MYSPACE --title "My Page"Options:
-i, --id: Page ID-s, --space: Space key (required with --title)-t, --title: Page title (required with --space)-f, --format: Output format -storage(default) orview
Replace content:
dotnet run -- confluence update-page --id 12345 --body "<p>New content</p>"Append content:
dotnet run -- confluence update-page --id 12345 --body "<p>Additional content</p>" --appendUpdate by title:
dotnet run -- confluence update-page --space MYSPACE --title "My Page" --body "<p>Updated</p>"With file:
dotnet run -- confluence update-page --id 12345 --file content.html
dotnet run -- confluence update-page --id 12345 --file content.html --appendOptions:
-i, --id: Page ID-s, --space: Space key (required with --title)-t, --title: Page title (required with --space)-b, --body: New page content (either --body or --file is required)--file: Path to a UTF-8 encoded file containing the body content-a, --append: Append to existing content instead of replacing
dotnet run -- jira get-issue --key PROJ-123Options:
-k, --key(required): Issue key (e.g., PROJ-123)
dotnet run -- jira create-issue --project PROJ --summary "My new task" --type TaskWith description:
dotnet run -- jira create-issue --project PROJ --summary "Bug fix needed" --type Bug --description "Detailed description here"With description from file:
dotnet run -- jira create-issue --project PROJ --summary "Task" --type Task --description-file desc.txtOptions:
-p, --project(required): Project key-s, --summary(required): Issue summary/title-t, --type(required): Issue type (e.g., Task, Bug, Story)-d, --description: Issue description--description-file: Path to a UTF-8 encoded file containing the description
dotnet run -- jira add-comment --key PROJ-123 --body "This is my comment"With file:
dotnet run -- jira add-comment --key PROJ-123 --file comment.txtOptions:
-k, --key(required): Issue key-b, --body: Comment body text (either --body or --file is required)--file: Path to a UTF-8 encoded file containing the comment body
dotnet run -- jira change-status --key PROJ-123 --status "In Progress"Options:
-k, --key(required): Issue key-s, --status(required): Target status name (e.g., "In Progress", "Done")
Note: The status must be a valid transition from the current issue status.
dotnet run -- jira assign-user --key PROJ-123 --user john.doeOptions:
-k, --key(required): Issue key-u, --user(required): Username or display name to assign
dotnet run -- jira update-issue --key PROJ-123 --description "Updated description for the issue"With file:
dotnet run -- jira update-issue --key PROJ-123 --file description.txtOptions:
-k, --key(required): Issue key-d, --description: New description (either --description or --file is required)--file: Path to a UTF-8 encoded file containing the description
dotnet run -- bamboo get-projectsdotnet run -- bamboo get-project --key PROJOptions:
-k, --key(required): Project key (e.g., PROJ)
dotnet run -- bamboo get-plansFilter by project:
dotnet run -- bamboo get-plans --project PROJOptions:
-p, --project: Filter plans by project key (optional)
dotnet run -- bamboo get-plan --key PROJ-PLANOptions:
-k, --key(required): Plan key (e.g., PROJ-PLAN)
This shows plan details including stages, variables, and branches.
dotnet run -- bamboo get-branches --key PROJ-PLANOptions:
-k, --key(required): Plan key
dotnet run -- bamboo get-builds --key PROJ-PLANWith limited results:
dotnet run -- bamboo get-builds --key PROJ-PLAN --max-results 10Options:
-k, --key(required): Plan key-n, --max-results: Maximum number of results (default: 25)
dotnet run -- bamboo get-build --key PROJ-PLAN-123Options:
-k, --key(required): Build result key (e.g., PROJ-PLAN-123)
This shows detailed build information including stages, changes, and test results.
dotnet run -- bamboo get-latest-build --key PROJ-PLANOptions:
-k, --key(required): Plan key
Queue a build for the default branch:
dotnet run -- bamboo queue-build --key PROJ-PLANQueue a build for a specific branch:
dotnet run -- bamboo queue-build --key PROJ-PLAN --branch feature/my-branchOptions:
-k, --key(required): Plan key-b, --branch: Branch name (optional, builds default branch if not specified)
Get the logs from a build:
dotnet run -- bamboo get-build-logs --key PROJ-PLAN-123Filter logs using regex pattern:
dotnet run -- bamboo get-build-logs --key PROJ-PLAN-123 -f errorUse multiple filters (lines matching ANY pattern are shown):
dotnet run -- bamboo get-build-logs --key PROJ-PLAN-123 -f error -f exceptionUse regex OR pattern:
dotnet run -- bamboo get-build-logs --key PROJ-PLAN-123 -f 'error|exception'Use regex to find complex patterns:
dotnet run -- bamboo get-build-logs --key PROJ-PLAN-123 -f 'failed.*test'Get logs for a specific job within the build:
dotnet run -- bamboo get-build-logs --key PROJ-PLAN-123 --job PROJ-PLAN-JOB1Options:
-k, --key(required): Build result key (e.g., PROJ-PLAN-123)-f, --filter: Filter log lines using regex patterns (case-insensitive). Can be specified multiple times.-j, --job: Get logs for a specific job within the build
Get detailed information about a pull request:
dotnet run -- bitbucket get-pr --project PROJ --repo my-repo --id 123Short form:
dotnet run -- bitbucket get-pr -p PROJ -r my-repo -i 123Options:
-p, --project(required): Project key (e.g., PROJ)-r, --repo(required): Repository slug (e.g., my-repo)-i, --id(required): Pull request ID
Get the diff for a pull request showing all file changes:
dotnet run -- bitbucket get-pr-diff --project PROJ --repo my-repo --id 123Options:
-p, --project(required): Project key-r, --repo(required): Repository slug-i, --id(required): Pull request ID
List all commits in a pull request:
dotnet run -- bitbucket get-pr-commits --project PROJ --repo my-repo --id 123Options:
-p, --project(required): Project key-r, --repo(required): Repository slug-i, --id(required): Pull request ID
List all comments and review discussions on a pull request:
dotnet run -- bitbucket get-pr-comments --project PROJ --repo my-repo --id 123Options:
-p, --project(required): Project key-r, --repo(required): Repository slug-i, --id(required): Pull request ID
Add a review comment to a pull request:
dotnet run -- bitbucket add-pr-comment --project PROJ --repo my-repo --id 123 --text "This looks good!"With file:
dotnet run -- bitbucket add-pr-comment --project PROJ --repo my-repo --id 123 --file review-comment.txtShort form:
dotnet run -- bitbucket add-pr-comment -p PROJ -r my-repo -i 123 -t "LGTM"Options:
-p, --project(required): Project key-r, --repo(required): Repository slug-i, --id(required): Pull request ID-t, --text: Comment text (either --text or --file is required)--file: Path to a UTF-8 encoded file containing the comment text
AtlassianCli/
├── Program.cs # Entry point, CLI parsing
├── Client/
│ ├── ConfluenceClient.cs # Confluence REST API client
│ ├── JiraClient.cs # Jira REST API client
│ ├── BambooClient.cs # Bamboo REST API client
│ └── BitBucketClient.cs # BitBucket REST API client
├── Models/
│ ├── ConfluenceModels.cs # Confluence data transfer objects
│ ├── JiraModels.cs # Jira data transfer objects
│ ├── BambooModels.cs # Bamboo data transfer objects
│ └── BitBucket*.cs # BitBucket data transfer objects
├── Commands/
│ ├── CommandOptions.cs # CLI option definitions
│ └── CommandHandlers.cs # Command execution logic
└── Progress.md # Development progress tracking
MIT License