Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to Codemagic

Scalekit connector
Open markdown

The Codemagic connector lets your AI agent act in each user's Codemagic account. Each user connects their own Codemagic API key once, and Scalekit sends it with every call, so your agent never handles credentials. It comes with 60 tools.

Tools
60
What they doRead · write · destructive
31 · 19 · 1031 read19 write10 destructive
Users sign in with

Setup

  1. Install the SDK

    Terminal window
    npm install @scalekit-sdk/node dotenv
  2. Set your credentials

    Add your Scalekit credentials to your .env file. Find values in app.scalekit.com > Developers > API Credentials.

    .env
    SCALEKIT_ENVIRONMENT_URL=<your-environment-url>
    SCALEKIT_CLIENT_ID=<your-client-id>
    SCALEKIT_CLIENT_SECRET=<your-client-secret>
  3. Create the Codemagic connection

    In AgentKit > Connections, create a Codemagic connection. The name you give it is the connection_name your code passes. See Configure connections.

  4. Authorize a user and make your first call

    quickstart.mts
    import { ScalekitClient } from '@scalekit-sdk/node'
    import 'dotenv/config'
    import { createInterface } from 'node:readline/promises'
    const scalekit = new ScalekitClient(
    process.env.SCALEKIT_ENVIRONMENT_URL,
    process.env.SCALEKIT_CLIENT_ID,
    process.env.SCALEKIT_CLIENT_SECRET,
    )
    const actions = scalekit.actions
    const connector = 'codemagic'
    const identifier = 'user_123'
    // Generate an authorization link for the user
    const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
    console.log('Authorize Codemagic:', link)
    const rl = createInterface({ input: process.stdin, output: process.stdout })
    await rl.question('Press Enter after authorizing...')
    rl.close()
    // Make your first call
    const result = await actions.executeTool({
    connector,
    identifier,
    toolName: 'codemagic_apps_list',
    toolInput: {},
    })
    console.log(result)
    Terminal window
    npx tsx quickstart.mts

    Each user opens the link once and enters their Codemagic credentials there. See Authorize a user for the full flow and statuses.

Tools

Pass the exact name to execute_tool
Try in PlaygroundRequest a tool
  • codemagic_app_caches_listList the build caches stored for a Codemagic application.Read-only

    List App Caches

    List the build caches stored for a Codemagic application. Returns each cache's _id, workflowId, size in bytes and lastUsed time. Use this before Delete App Cache to find a cache ID.

    Inputs

    app_idstringrequired
    Codemagic application ID. Find it with List Apps or List Team Apps. Example: 5c9c064185dd2310123b8e96.
  • codemagic_app_getGet one Codemagic application by ID.Read-only

    Get App

    Get one Codemagic application by ID. Returns the app's _id, appName, branches and Workflow Editor workflows (codemagic.yaml workflows are not listed). Use this after List Apps when you need an app's branches or workflow IDs.

    Inputs

    app_idstringrequired
    Codemagic application ID. Find it with List Apps or List Team Apps. Example: 5c9c064185dd2310123b8e96.
  • codemagic_app_tester_groups_listList the tester groups of a Codemagic application.Read-only

    List App Tester Groups

    List the tester groups of a Codemagic application. Returns each group's ID and name. Tester groups receive app previews and builds. Use List Tester Group Contacts for members.

    Inputs

    app_idstringrequired
    Codemagic application ID. Find it with List Apps or List Team Apps. Example: 5c9c064185dd2310123b8e96.
    pageinteger
    Page number to return, starting at 1. Example: 1.
    page_sizeinteger
    Number of items per page. Example: 20.
  • codemagic_app_variable_groups_listList the environment variable groups defined for one Codemagic application.Read-only

    List App Variable Groups

    List the environment variable groups defined for one Codemagic application. Returns the app's groups with ID and name. Use List Team Variable Groups for team-level groups.

    Inputs

    app_idstringrequired
    Codemagic application ID. Find it with List Apps or List Team Apps. Example: 5c9c064185dd2310123b8e96.
    pageinteger
    Page number to return, starting at 1. Example: 1.
    page_sizeinteger
    Number of items per page. Example: 20.
  • codemagic_app_workflows_listList the workflows of a Codemagic application.Read-only

    List App Workflows

    List the workflows of a Codemagic application. Returns each workflow's ID and name. Use this to find a workflow ID for Start Build.

    Inputs

    app_idstringrequired
    Codemagic application ID. Find it with List Apps or List Team Apps. Example: 5c9c064185dd2310123b8e96.
  • codemagic_apps_listList every application added to Codemagic that the token's user can access.Read-only

    List Apps

    List every application added to Codemagic that the token's user can access. Returns each app's _id, appName and Workflow Editor workflow IDs and names. Use this to find an app ID. Use Get App for one app's branches, or List Team Apps for one team with paging.

    Inputs

    This tool takes no inputs.

  • codemagic_build_actions_listList the actions (steps) of a Codemagic build.Read-only

    List Build Actions

    List the actions (steps) of a Codemagic build. Returns a page of actions with name, status and timings. Use this to see which step of a build failed.

    Inputs

    build_idstringrequired
    Codemagic build ID, as returned by Start Build or List Team Builds. Example: 5fabc6414c483700143f4f92.
    pageinteger
    Page number to return, starting at 1. Example: 1.
    page_sizeinteger
    Number of items per page. Example: 20.
  • codemagic_build_getGet one Codemagic build by ID.Read-only

    Get Build

    Get one Codemagic build by ID. Returns status, app, workflow, branch or tag, commit, timings, build steps and artifacts with their download URLs. Use this to follow a build started with Start Build.

    Inputs

    build_idstringrequired
    Codemagic build ID, as returned by Start Build or List Team Builds. Example: 5fabc6414c483700143f4f92.