backlog-cli
Original:🇺🇸 English
Translated
CLI for Backlog project management (by Nulab). Use this skill when: (1) Listing, creating, editing, closing, or commenting on issues (2) Creating, listing, merging, or commenting on pull requests (3) Viewing, creating, or editing Wiki pages (4) Querying project settings (issue types, statuses, categories, milestones, members) (5) Checking notifications, stars, or watches (6) Making raw API requests via `backlog api`
2installs
Sourcesimochee/backlog-cli
Added on
NPX Install
npx skill4agent add simochee/backlog-cli backlog-cliTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →backlog-cli
CLI tool for managing Backlog projects via the command.
backlogAuthentication
Run before use. Verify with .
Switch between spaces with or env var.
backlog auth loginbacklog auth status--space <hostname>BACKLOG_SPACEKey Concepts
Avoid Interactive Prompts
Some commands prompt interactively for missing required fields. Always specify all required flags explicitly to prevent hanging.
Name Resolution
The CLI automatically resolves human-readable names to IDs:
- Status names → status ID
- Issue type names → issue type ID
- Priority names (/
高/中) → priority ID低 - Usernames → user ID (refers to the authenticated user)
@me
Status and issue type names are project-specific. Query them first if unknown:
bash
backlog issue-type list -p PROJECT_KEY
backlog status list -p PROJECT_KEYIssue Keys
Format: (e.g., ). Since the key embeds the project, is not needed for / .
PROJECT_KEY-numberPROJ-123--projectissue viewissue editProject Key
Specify with () flag or env var.
--project-pBACKLOG_PROJECTEnvironment Variables
Environment variables provide defaults that can be overridden by CLI flags:
- — Default space hostname (e.g.,
BACKLOG_SPACE)example.backlog.com - — Default project key (e.g.,
BACKLOG_PROJECT)MYAPP - — API key for CI/CD environments (requires
BACKLOG_API_KEY)BACKLOG_SPACE
Priority order: CLI flag > Environment variable > Config file ()
~/.backlogrcbash
# Set project for session
export BACKLOG_PROJECT=MYAPP
# Now -p flag can be omitted
backlog issue list
backlog milestone list
# CLI flag overrides environment variable
backlog issue list -p OTHER_PROJECTJSON Output
Most commands support flag for machine-readable output:
--json- — output all fields in JSON format
--json - — output only specified fields (e.g.,
--json field1,field2)--json issueKey,summary,status - Combine with for advanced filtering:
jq
bash
# Extract issue keys only
backlog issue list -p PROJ --json | jq '.[].issueKey'
# Filter by specific status
backlog issue list -p PROJ --json | jq '[.[] | select(.status.name == "処理中")]'
# Combine field filtering with jq
backlog issue list -p PROJ --json issueKey,summary | jq '.[].summary'Always use in agent workflows to parse output reliably.
--jsonCommon Workflows
Issues
bash
# List my open issues
backlog issue list -p PROJ -a @me -S "未対応,処理中"
# View details with comments
backlog issue view PROJ-123 --comments
# Create (required: -p, -t, -T, -P)
backlog issue create -p PROJ -t "Title" -T "タスク" -P "中" -a @me -d "Description"
# Update status with comment
backlog issue edit PROJ-123 -S "処理中" -c "Starting work"
# Close
backlog issue close PROJ-123 -c "Done"
# Add comment
backlog issue comment PROJ-123 -b "Progress update"Pull Requests
bash
# Create (required: -p, -R, -t, -B, --branch)
backlog pr create -p PROJ -R repo -t "PR title" -B main --branch feat/xxx --issue PROJ-123
# List open PRs
backlog pr list -p PROJ -R repo
# View with comments
backlog pr view -p PROJ -R repo 42 --comments
# Merge
backlog pr merge -p PROJ -R repo 42Project Info
bash
backlog project list # List projects
backlog project users PROJECT_KEY # List members
backlog category list -p PROJ # List categories
backlog milestone list -p PROJ # List milestonesWiki
bash
backlog wiki list -p PROJ
backlog wiki view <wiki-id>
backlog wiki create -p PROJ -n "Page title" -b "Content"
backlog wiki edit <wiki-id> -b "Updated content"Raw API
For operations not covered by CLI commands. The prefix can be omitted.
/api/v2bash
backlog api /issues -X POST -f "projectId=123" -f "summary=New issue"
backlog api /issues --paginate -f "projectId[]=123"Common Issues
Authentication Failed
If you encounter authentication errors:
bash
# Check current authentication status
backlog auth status
# Re-authenticate
backlog auth login"Status name not found" or "Issue type not found"
Status names and issue type names are project-specific. Always query them first:
bash
# Get available statuses for a project
backlog status list -p PROJECT_KEY
# Get available issue types for a project
backlog issue-type list -p PROJECT_KEY
# Get available priorities (these are global)
# Built-in values: 高 (High), 中 (Normal), 低 (Low)Before creating or editing issues:
- Query status names:
backlog status list -p PROJECT - Query issue types:
backlog issue-type list -p PROJECT - Use exact names from the query results
Missing Required Fields
If a command hangs or prompts for input:
- You're missing a required field
- Specify all required flags explicitly (see command help with )
--help - Never rely on interactive prompts in agent workflows
Project Not Found
Ensure the project key is correct and you have access:
bash
# List available projects
backlog project list
# Use exact project key from the listReferences
- Full command options: references/commands.md
- Data model schemas: references/schema.md