KaitenSDK

1.3.0

AllDmeat/kaiten-sdk

What's New

1.3.0

2026-02-20T08:03:23Z

What's Changed

  • Add missing tests for pagination enums page errors and createComment by @AllDmeat in #293
  • Restructure CLI command files by API domain by @AllDmeat in #294
  • Fix numeric avatar_type decoding in addCardMember by @AllDmeat in #295
  • Remove destructive delete operations for spaces boards and lanes by @AllDmeat in #296
  • Avoid force unwrap in CLI JSON output by @AllDmeat in #297
  • Restrict retries for non-idempotent operations by @AllDmeat in #298
  • Retry only transient errors in middleware by @AllDmeat in #299
  • Honor Kaiten rate-limit headers and Retry-After parsing by @AllDmeat in #300
  • Validate pageSize to prevent infinite auto-pagination by @AllDmeat in #301
  • Improve hasMore semantics with explicit override by @AllDmeat in #302
  • Do not hide corrupted 200 list payloads as empty results by @AllDmeat in #303
  • Remove global Optional.orThrow namespace pollution by @AllDmeat in #304
  • Unify CLI output format across all commands by @AllDmeat in #305
  • specs: add SDK/CLI validation and reliability requirements by @AllDmeat in #306
  • sdk: enforce HTTPS-only baseURL by @AllDmeat in #307
  • cli: strict enum validation and lane row-count forwarding by @AllDmeat in #308
  • sdk: validate pagination and bound retry delays by @AllDmeat in #309
  • sdk: avoid masking non-empty list stream failures by @AllDmeat in #310
  • cli: enforce strict config and remaining enum/CSV parsing by @AllDmeat in #311
  • spec: close review gaps in SDK/CLI requirements by @AllDmeat in #312
  • spec(cli): config-only token source by @AllDmeat in #313

Full Changelog: 1.2.0...1.3.0

kaiten-sdk

Build

Swift SDK for the Kaiten project management API. OpenAPI-generated types with typed errors, automatic retry on 429 Too Many Requests, and Bearer token authentication.

Full Kaiten API documentation: developers.kaiten.ru

Installation

As a library

Add KaitenSDK to your Package.swift:

dependencies: [
    .package(url: "https://github.com/AllDmeat/kaiten-sdk.git", from: "0.1.0"),
],
targets: [
    .target(
        name: "YourTarget",
        dependencies: [
            .product(name: "KaitenSDK", package: "KaitenSDK"),
        ]
    ),
]

mise (recommended)

mise — a tool version manager. It will install the required version automatically:

mise use github:alldmeat/kaiten-sdk

GitHub Release

Download the binary for your platform from the releases page.

From Source

swift build -c release
# Binary: .build/release/kaiten

Quick Start

As a library

import KaitenSDK

let client = try KaitenClient(
    baseURL: "https://your-company.kaiten.ru/api/latest",
    token: "your-api-token"
)

let spaces = try await client.listSpaces()
let cards = try await client.listCards(boardId: 42)
let card = try await client.getCard(id: 123)

As a CLI

The CLI resolves credentials in order: flags → config file.

1. Get a Kaiten API Token

Get your API token at https://<your-company>.kaiten.ru/profile/api-key.

2. Configure Credentials

Option 1 — Config file (recommended):

Create ~/.config/kaiten/config.json:

{
  "url": "https://<your-company>.kaiten.ru/api/latest",
  "token": "<your-api-token>"
}

Then run commands:

kaiten list-spaces
kaiten get-card --id 123

API Reference

Cards

Method Description
listCards(boardId:) List all cards on a board
getCard(id:) Fetch a single card by ID
createCard(...) Create a new card
updateCard(...) Update a card
deleteCard(...) Delete a card
listCardChildren(...) List child cards
addCardChild(...) Add a child card
removeCardChild(...) Remove a child card
getCardMembers(cardId:) Get members of a card
addCardMember(...) Add a member to a card
updateCardMemberRole(...) Update a card member's role
removeCardMember(...) Remove a member from a card
getCardComments(cardId:) Get comments on a card
createComment(cardId:text:) Add a comment to a card
updateComment(...) Update a comment
deleteComment(...) Delete a comment
listCardTags(...) List tags on a card
addCardTag(...) Add a tag to a card
removeCardTag(...) Remove a tag from a card
listCardBlockers(...) List card blockers
createCardBlocker(...) Create a card blocker
updateCardBlocker(...) Update a card blocker
deleteCardBlocker(...) Delete a card blocker
getCardLocationHistory(...) Get card location history
getCardBaselines(...) Get card baselines

Checklists

Method Description
createChecklist(...) Create a checklist on a card
getChecklist(...) Get a checklist
updateChecklist(...) Update a checklist
removeChecklist(...) Remove a checklist
createChecklistItem(...) Create a checklist item
updateChecklistItem(...) Update a checklist item
removeChecklistItem(...) Remove a checklist item

External Links

Method Description
listExternalLinks(...) List external links on a card
createExternalLink(...) Create an external link
updateExternalLink(...) Update an external link
removeExternalLink(...) Remove an external link

Spaces

Method Description
listSpaces() List all spaces
createSpace(...) Create a space
getSpace(...) Get a space by ID
updateSpace(...) Update a space

Boards

Method Description
listBoards(spaceId:) List boards in a space
getBoard(id:) Fetch a board by ID
createBoard(...) Create a board
updateBoard(...) Update a board

Columns

Method Description
getBoardColumns(boardId:) Get columns for a board
createColumn(...) Create a column
updateColumn(...) Update a column
deleteColumn(...) Delete a column
listSubcolumns(...) List subcolumns
createSubcolumn(...) Create a subcolumn
updateSubcolumn(...) Update a subcolumn
deleteSubcolumn(...) Delete a subcolumn

Lanes

Method Description
getBoardLanes(boardId:) Get lanes for a board
createLane(...) Create a lane
updateLane(...) Update a lane

Custom Properties

Method Description
listCustomProperties() List all custom property definitions
getCustomProperty(id:) Get a single custom property definition
listCustomPropertySelectValues(propertyId:) List select values for a custom property
getCustomPropertySelectValue(propertyId:id:) Get a single select value

Users

Method Description
listUsers() List all users
getCurrentUser() Get the current user

Card Types & Sprints

Method Description
listCardTypes() List card types
listSprints() List sprints
getSprintSummary(...) Get sprint summary

Configuration

The CLI and MCP server share the same config file at ~/.config/kaiten/config.json (see Configure Credentials above).

Use --config to provide a custom config file path when needed.

Error Handling

All methods throw KaitenError, which provides typed cases for every failure mode:

do {
    let card = try await client.getCard(id: 999)
} catch let error as KaitenError {
    switch error {
    case .missingConfiguration(let key):
        print("Missing config: \(key)")
    case .invalidURL(let url):
        print("Bad URL: \(url)")
    case .unauthorized:
        print("Check your API token")
    case .notFound(let resource, let id):
        print("\(resource) \(id) not found")
    case .rateLimited(let retryAfter):
        print("Rate limited, retry after: \(String(describing: retryAfter))")
    case .serverError(let statusCode, let body):
        print("Server error \(statusCode): \(body ?? "")")
    case .networkError(let underlying):
        print("Network: \(underlying)")
    case .unexpectedResponse(let statusCode):
        print("Unexpected HTTP \(statusCode)")
    }
}

Requirements

  • Swift 6.2+
  • macOS 15+ (ARM) / Linux (x86-64, ARM)

License

See LICENSE for details.

Description

  • Swift Tools 6.2.0
View More Packages from this Author

Dependencies

Last updated: Sun Feb 22 2026 20:57:28 GMT-1000 (Hawaii-Aleutian Standard Time)