productivity
GitLab CLI for Cron Jobs
Use the GitLab CLI for cron jobs with headless JSON commands, schema discovery, credentials, and permission controls.
20 functions 13 read 7 write API token auth
GitLab CLI for Cron Jobs
Schedule repeatable integration workflows from cron while keeping credentials in KosmoKrator config.
Use the headless CLI from cron when an operation should run without an interactive agent session. The GitLab CLI uses the same integration registry as the TUI, Lua runtime, and MCP gateway, but returns predictable command output for automation.
Command Shape
# GitLab CLI for Cron Jobs
kosmokrator integrations:configure gitlab --set api_token="$GITLAB_API_TOKEN" --enable --read allow --write ask --json
kosmo integrations:call gitlab.gitlab_create_issue '{"project_id":"example_project_id","title":"example_title","description":"example_description","labels":"example_labels","assignee_ids":"example_assignee_ids","milestone_id":1,"weight":1}' --json Discovery Before Execution
Agents and scripts can inspect GitLab docs and schemas before choosing a function.
kosmo integrations:docs gitlab --json
kosmo integrations:docs gitlab.gitlab_create_issue --json
kosmo integrations:schema gitlab.gitlab_create_issue --json
kosmo integrations:search "GitLab" --json
kosmo integrations:list --json Useful GitLab CLI Functions
| Function | Type | Parameters | Description |
|---|---|---|---|
gitlab.gitlab_create_issue | Write | project_id, title, description, labels, assignee_ids, milestone_id, weight | Create a new issue in a GitLab project. Requires a project ID and title. Optionally set description, labels, assignees, milestone, and weight. |
gitlab.gitlab_get_issue | Read | project_id, issue_iid | Get detailed information about a specific GitLab issue, including title, description, labels, assignees, milestone, and state. |
gitlab.gitlab_update_issue | Write | project_id, issue_iid, title, description, labels, state_event, assignee_ids | Update an existing issue in a GitLab project. Can change title, description, labels, state (close/reopen), and assignees. |
gitlab.gitlab_list_issues | Read | project_id, state, labels, search, page, per_page | List issues in a GitLab project. Supports filtering by state (opened, closed, all), labels, and search text. Paginated. |
gitlab.gitlab_search_issues | Read | project_id, search, state | Search for issues in a GitLab project by keyword. Searches issue titles and descriptions. Optionally filter by state. |
gitlab.gitlab_create_issue_comment | Write | project_id, issue_iid, body | Add a comment (note) to a GitLab issue. The comment body supports GitLab Markdown. |
gitlab.gitlab_create_merge_request | Write | project_id, source_branch, target_branch, title, description, labels | Create a new merge request in a GitLab project. Requires source branch, target branch, and title. |
gitlab.gitlab_get_merge_request | Read | project_id, mr_iid | Get detailed information about a specific GitLab merge request, including title, description, source/target branches, and state. |
gitlab.gitlab_list_merge_requests | Read | project_id, state, page, per_page | List merge requests in a GitLab project. Supports filtering by state (opened, closed, merged, all). Paginated. |
gitlab.gitlab_update_merge_request | Write | project_id, mr_iid, title, description, state_event, labels | Update an existing merge request in a GitLab project. Can change title, description, labels, and state (close/reopen). |
gitlab.gitlab_accept_merge_request | Write | project_id, mr_iid, merge_commit_message | Accept (merge) a GitLab merge request. Optionally set a custom merge commit message. |
gitlab.gitlab_list_branches | Read | project_id, search, page | List branches in a GitLab project repository. Supports searching by branch name and pagination. |
gitlab.gitlab_create_branch | Write | project_id, branch, ref | Create a new branch in a GitLab project repository. Requires a branch name and a ref (branch name or commit SHA) to create from. |
gitlab.gitlab_list_commits | Read | project_id, ref_name, page, per_page | List commits in a GitLab project repository. Supports filtering by branch or tag name. Paginated. |
gitlab.gitlab_get_file | Read | project_id, file_path, ref | Get a file from a GitLab project repository. Returns file content (base64-encoded), file name, size, and encoding. |
gitlab.gitlab_list_projects | Read | membership, search, page, per_page | List GitLab projects visible to the authenticated user. Supports filtering by membership, search text, and pagination. |
gitlab.gitlab_get_project | Read | project_id | Get details for a specific GitLab project, including name, description, default branch, visibility, and statistics. |
gitlab.gitlab_list_groups | Read | page, per_page | List GitLab groups visible to the authenticated user. Paginated. |
gitlab.gitlab_list_project_members | Read | project_id, page | List members of a GitLab project and their access levels. Paginated. |
gitlab.gitlab_list_labels | Read | project_id | List all labels for a GitLab project, including name, color, description, and open/closed issue counts. |
Automation Notes
- Use
--jsonfor machine-readable output. - Keep credentials out of argv by using environment variables or stored KosmoKrator configuration.
- Configure read/write policy before unattended runs; use
--forceonly for trusted automation. - Use the MCP gateway instead when the agent needs dynamic tool discovery inside a conversation.