productivity
GitHub CLI for Cron Jobs
Use the GitHub CLI for cron jobs with headless JSON commands, schema discovery, credentials, and permission controls.
30 functions 16 read 14 write API key auth
GitHub 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 GitHub CLI uses the same integration registry as the TUI, Lua runtime, and MCP gateway, but returns predictable command output for automation.
Command Shape
# GitHub CLI for Cron Jobs
kosmokrator integrations:configure github --set api_key="$GITHUB_API_KEY" --enable --read allow --write ask --json
kosmo integrations:call github.github_list_repos '{"type":"example_type","sort":"example_sort","direction":"example_direction","per_page":1,"page":1}' --json Discovery Before Execution
Agents and scripts can inspect GitHub docs and schemas before choosing a function.
kosmo integrations:docs github --json
kosmo integrations:docs github.github_list_repos --json
kosmo integrations:schema github.github_list_repos --json
kosmo integrations:search "GitHub" --json
kosmo integrations:list --json Useful GitHub CLI Functions
| Function | Type | Parameters | Description |
|---|---|---|---|
github.github_list_repos | Read | type, sort, direction, per_page, page | List repositories for the authenticated GitHub user. Supports filtering by type (all, owner, public, private, member), sorting (created, updated, pushed, full_name), and direction. |
github.github_get_repo | Read | owner, repo | Get detailed information about a specific GitHub repository, including description, stats, default branch, and more. |
github.github_create_repo | Write | name, description, private, auto_init | Create a new repository for the authenticated GitHub user. Optionally set description, visibility, and auto-initialize with a README. |
github.github_search_repos | Read | query, sort, order, per_page | Search for repositories on GitHub using keywords, language filters, stars, and more. Returns matching repositories with metadata. |
github.github_list_issues | Read | owner, repo, state, labels, sort, direction, per_page | List issues in a GitHub repository. Supports filtering by state (open, closed, all), labels, and sorting. |
github.github_get_issue | Read | owner, repo, issue_number | Get detailed information about a specific GitHub issue, including title, body, labels, assignees, milestone, and comments count. |
github.github_create_issue | Write | owner, repo, title, body, assignees, labels, milestone | Create a new issue in a GitHub repository. Requires a title. Optionally set body, assignees, labels, and milestone. |
github.github_update_issue | Write | owner, repo, issue_number, title, body, state, assignees, labels, milestone | Update an existing issue in a GitHub repository. Can change title, body, state (open/closed), assignees, labels, and milestone. |
github.github_add_labels | Write | owner, repo, issue_number, labels | Add one or more labels to a GitHub issue. Labels are specified by name. If a label does not exist in the repository, it will be created. |
github.github_create_issue_comment | Write | owner, repo, issue_number, body | Add a comment to a GitHub issue or pull request. The comment body supports GitHub Markdown. |
github.github_list_pull_requests | Read | owner, repo, state, sort, direction, per_page | List pull requests in a GitHub repository. Supports filtering by state (open, closed, all) and sorting. |
github.github_get_pull_request | Read | owner, repo, pull_number | Get detailed information about a specific GitHub pull request, including title, body, branch info, merge status, and review status. |
github.github_create_pull_request | Write | owner, repo, title, body, head, base, draft | Create a new pull request in a GitHub repository. Requires a title, head branch (source), and base branch (target). |
github.github_update_pull_request | Write | owner, repo, pull_number, title, body, state, base | Update an existing pull request in a GitHub repository. Can change title, body, state (open/closed), and base branch. |
github.github_merge_pull_request | Write | owner, repo, pull_number, commit_title, commit_message, merge_method | Merge a GitHub pull request. Supports merge commit, squash, or rebase merge methods. |
github.github_list_pull_request_reviews | Read | owner, repo, pull_number | List all reviews on a GitHub pull request, including review state (approved, changes_requested, commented, dismissed). |
github.github_create_review | Write | owner, repo, pull_number, body, event, comments | Create a review on a GitHub pull request. Can approve, request changes, or comment. Optionally include inline review comments on specific lines. |
github.github_list_commits | Read | owner, repo, sha, path, author, per_page | List commits in a GitHub repository. Supports filtering by branch (SHA), file path, and author. |
github.github_get_commit | Read | owner, repo, ref | Get detailed information about a specific commit, including author, committer, message, and file changes. |
github.github_get_file_content | Read | owner, repo, path, ref | Get the content of a file or directory from a GitHub repository. Returns base64-encoded content for files, or a listing for directories. |
github.github_create_or_update_file | Write | owner, repo, path, message, content, sha, branch | Create a new file or update an existing file in a GitHub repository. For updates, the SHA of the existing file is required. Content should be provided as plain text (it will be base64-encoded automatically). |
github.github_create_branch | Write | owner, repo, ref, sha | Create a new branch in a GitHub repository. Requires a reference name (e.g. "refs/heads/my-feature") and the SHA of the commit to branch from. |
github.github_list_branches | Read | owner, repo, per_page | List branches in a GitHub repository. Returns branch names and the SHA of each branch's latest commit. |
github.github_list_releases | Read | owner, repo | List releases in a GitHub repository. Returns release tag, title, body, draft/prerelease status, and assets. |
github.github_create_release | Write | owner, repo, tag_name, target_commitish, name, body, draft, prerelease | Create a new release in a GitHub repository. Requires a tag name. Optionally set target commit, release name, body, draft, and prerelease flags. |
github.github_search_issues | Read | query, sort, order, per_page | Search for issues and pull requests across all of GitHub. Supports GitHub search syntax like "repo:owner/repo is:issue is:open label:bug". |
github.github_get_current_user | Read | none | Get the authenticated GitHub user's profile information, including username, name, email, bio, public repos count, and more. |
github.github_create_gist | Write | description, files, public | Create a new GitHub gist. Provide a description, a map of filenames to their content, and whether the gist should be public or secret. |
github.github_list_workflow_runs | Read | owner, repo, status, per_page | List GitHub Actions workflow runs for a repository. Supports filtering by status (completed, in_progress, queued, etc.). |
github.github_dispatch_workflow | Write | owner, repo, workflow_id, ref, inputs | Trigger a GitHub Actions workflow dispatch event. The workflow must have a "workflow_dispatch" trigger in its YAML configuration. Requires the workflow ID or filename and a ref (branch or tag). |
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.