Skip to content

feat(jtk): add project management commands #101

@rianjs

Description

@rianjs

Summary

jtk has no project management commands. Users needing to create, list, get, update, or delete projects must use the Jira REST API directly. This came up during integration testing — we needed a disposable test project but couldn't create one via the CLI.

REST API Research

The Jira Cloud REST API v3 fully supports project CRUD at https://{instance}.atlassian.net/rest/api/3/project:

Endpoints Available

Operation Method Endpoint Status Code
Create POST /rest/api/3/project 201
Get GET /rest/api/3/project/{keyOrId} 200
List/Search GET /rest/api/3/project/search 200
Update PUT /rest/api/3/project/{keyOrId} 200
Delete (soft, to trash) DELETE /rest/api/3/project/{keyOrId} 204
Restore from trash POST /rest/api/3/project/{keyOrId}/restore 200
List project types GET /rest/api/3/project/type 200

Create Request Body

{
  "key": "TST",
  "name": "Integration Tests",
  "projectTypeKey": "software",
  "leadAccountId": "<account-id>",
  "description": "Optional description"
}

projectTypeKey options: software, service_desk, business, product_discovery, customer_service

Notes

  • Delete is a soft delete — projects go to trash and can be restored via POST /rest/api/3/project/{key}/restore
  • The search endpoint at /rest/api/3/project/search supports pagination (startAt, maxResults) and filtering
  • Update returns the full project object
  • leadAccountId is required for create (the account ID of the project lead)

Suggested Commands

jtk projects list              # List/search projects
jtk projects get <key>         # Get project details
jtk projects create            # Create a project
jtk projects update <key>      # Update project metadata
jtk projects delete <key>      # Soft-delete (move to trash)
jtk projects restore <key>     # Restore from trash
jtk projects types             # List available project types

Aliases: project, proj, p

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions