Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to Gitea

Scalekit connector
Open markdown

The Gitea connector lets your AI agent act in each user's Gitea account. Each user connects their own Gitea 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
35 · 20 · 535 read20 write5 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 Gitea connection

    In AgentKit > Connections, create a Gitea 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 = 'gitea'
    const identifier = 'user_123'
    // Generate an authorization link for the user
    const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
    console.log('Authorize Gitea:', 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: 'gitea_issues_search',
    toolInput: {},
    })
    console.log(result)
    Terminal window
    npx tsx quickstart.mts

    Each user opens the link once and enters their Gitea 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
  • gitea_branch_getGet one branch with its latest commit and protection settings.Read-only

    Get Branch

    Get one branch with its latest commit and protection settings. Returns the branch object. Get names from gitea_branches_list.

    Inputs

    branchstringrequired
    Name of the branch. Example: main.
    ownerstringrequired
    Owner of the repository: a user name or organization name. Example: octo-org.
    repostringrequired
    Name of the repository. Example: hello-world.
  • gitea_branches_listList a repository's branches with their latest commit and protection status.Read-only

    List Branches

    List a repository's branches with their latest commit and protection status. Returns branch objects. Use gitea_branch_get for one branch.

    Inputs

    ownerstringrequired
    Owner of the repository: a user name or organization name. Example: octo-org.
    repostringrequired
    Name of the repository. Example: hello-world.
    limitinteger
    Number of results per page. Example: 25.
    pageinteger
    Page number of results, starting at 1. Example: 1.
    qstring
    Search keyword. Example: hello.
  • gitea_collaborators_listList the users with direct access to a repository.Read-only

    List Collaborators

    List the users with direct access to a repository. Returns user objects. Use gitea_collaborator_add to give someone access.

    Inputs

    ownerstringrequired
    Owner of the repository: a user name or organization name. Example: octo-org.
    repostringrequired
    Name of the repository. Example: hello-world.
    limitinteger
    Number of results per page. Example: 25.
    pageinteger
    Page number of results, starting at 1. Example: 1.
  • gitea_commit_getGet one commit by SHA with its message, author, parents, files and stats.Read-only

    Get Commit

    Get one commit by SHA with its message, author, parents, files and stats. Returns the commit object. Get SHAs from gitea_commits_list.

    Inputs

    ownerstringrequired
    Owner of the repository: a user name or organization name. Example: octo-org.
    repostringrequired
    Name of the repository. Example: hello-world.
    shastringrequired
    SHA of the commit. Example: 3a0f86fb8db8eea7ccbb9a95f325ddbedfb25e15.
    filesboolean
    include a list of affected files for every commit (disable for speedup, default 'true'). Example: true.
    statboolean
    include diff stats for every commit (disable for speedup, default 'true'). Example: true.
    verificationboolean
    include verification for every commit (disable for speedup, default 'true'). Example: true.
  • gitea_commits_listList commits on a branch or ref, optionally only those touching a path or in a time range.Read-only

    List Commits

    List commits on a branch or ref, optionally only those touching a path or in a time range. Returns commit objects with SHA, message, author and stats. Use gitea_commit_get for one commit.

    Inputs

    ownerstringrequired
    Owner of the repository: a user name or organization name. Example: octo-org.
    repostringrequired
    Name of the repository. Example: hello-world.
    filesboolean
    include a list of affected files for every commit (disable for speedup, default 'true'). Example: true.
    limitinteger
    Number of results per page. Example: 25.
    notstring
    commits that match the given specifier will not be listed. Example: release-1.0.
    pageinteger
    Page number of results, starting at 1. Example: 1.
    pathstring
    Only return commits that touch this file or directory path. Example: docs/README.md.
    shastring
    Blob SHA of the file being replaced or deleted. Get it from gitea_contents_get. Example: 3a0f86fb8db8eea7ccbb9a95f325ddbedfb25e15.
    sincestring
    Only return items updated after this time (ISO 8601). Example: 2026-01-01T00:00:00Z.
    statboolean
    include diff stats for every commit (disable for speedup, default 'true'). Example: true.
    untilstring
    Only commits before this date will be returned (ISO 8601 format). Example: 2026-01-15T09:30:00Z.
    verificationboolean
    include verification for every commit (disable for speedup, default 'true'). Example: true.
  • gitea_contents_getGet a file's metadata and base64 content, or a directory's entries, at a path and ref.Read-only

    Get File or Directory

    Get a file's metadata and base64 content, or a directory's entries, at a path and ref. Returns the content object including the blob sha needed by gitea_file_update and gitea_file_delete.

    Inputs

    filepathstringrequired
    Path of the file inside the repository, for example README.md or docs/guide.md for a nested file. Example: README.md.
    ownerstringrequired
    Owner of the repository: a user name or organization name. Example: octo-org.
    repostringrequired
    Name of the repository. Example: hello-world.
    refstring
    Branch, tag or commit to read from. Defaults to the repository's default branch. Example: main.
  • gitea_issue_comments_listList the comments on an issue or pull request.Read-only

    List Issue Comments

    List the comments on an issue or pull request. Returns comment objects with author, body and time. Get issue numbers from gitea_issues_list.

    Inputs

    indexintegerrequired
    Number of the issue or pull request in the repository (the #number shown in Gitea). Example: 12.
    ownerstringrequired
    Owner of the repository: a user name or organization name. Example: octo-org.
    repostringrequired
    Name of the repository. Example: hello-world.
    beforestring
    Only return items updated before this time (ISO 8601). Example: 2026-02-01T00:00:00Z.
    sincestring
    Only return items updated after this time (ISO 8601). Example: 2026-01-01T00:00:00Z.
  • gitea_issue_getGet one issue (or pull request) by number with its body, state, labels, assignees and milestone.Read-only

    Get Issue

    Get one issue (or pull request) by number with its body, state, labels, assignees and milestone. Returns the issue object. Get issue numbers from gitea_issues_list.

    Inputs

    indexintegerrequired
    Number of the issue or pull request in the repository (the #number shown in Gitea). Example: 12.
    ownerstringrequired
    Owner of the repository: a user name or organization name. Example: octo-org.
    repostringrequired
    Name of the repository. Example: hello-world.