GitHub CLI Setup GitHub can be configured headlessly with `kosmokrator integrations:configure github`.
# Install KosmoKrator first if it is not available on PATH.
curl -fsSL https://raw.githubusercontent.com/OpenCompanyApp/kosmokrator/main/install.sh | bash
# Configure and verify this integration.
kosmokrator integrations:configure github --set api_key=" $GITHUB_API_KEY " --enable --read allow --write ask --json
kosmokrator integrations:doctor github --json
kosmokrator integrations:status --json Credentials
Authentication type: API key api_key. Configure credentials once, then use the same stored profile from
scripts, coding CLIs, Lua code mode, and the MCP gateway.
Call GitHub Headlessly Use the generic call form when another coding CLI or script needs a stable universal interface.
kosmo integrations:call github.github_list_repos '{
"type": "example_type",
"sort": "example_sort",
"direction": "example_direction",
"per_page": 1,
"page": 1
}' --json Use the provider shortcut form for shorter human-facing commands.
kosmo integrations:github github_list_repos '{
"type": "example_type",
"sort": "example_sort",
"direction": "example_direction",
"per_page": 1,
"page": 1
}' --json Agent Discovery Commands
These commands return structured output for coding agents that need to inspect capabilities 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 All CLI Functions
Every function below can be called headlessly. The generic form is stable across all integrations;
the provider shortcut is shorter but specific to GitHub.
github.github_list_repos Read read List repositories for the authenticated GitHub user. Supports filtering by type (all, owner, public, private, member), sorting (created, updated, pushed, full_name), and direction.
type, sort, direction, per_page, page kosmo integrations:call github.github_list_repos '{"type":"example_type","sort":"example_sort","direction":"example_direction","per_page":1,"page":1}' --json copy kosmo integrations:github github_list_repos '{"type":"example_type","sort":"example_sort","direction":"example_direction","per_page":1,"page":1}' --json copy
github.github_get_repo Read read Get detailed information about a specific GitHub repository, including description, stats, default branch, and more.
owner, repo kosmo integrations:call github.github_get_repo '{"owner":"example_owner","repo":"example_repo"}' --json copy kosmo integrations:github github_get_repo '{"owner":"example_owner","repo":"example_repo"}' --json copy
github.github_create_repo Write write Create a new repository for the authenticated GitHub user. Optionally set description, visibility, and auto-initialize with a README.
name, description, private, auto_init kosmo integrations:call github.github_create_repo '{"name":"example_name","description":"example_description","private":true,"auto_init":true}' --json copy kosmo integrations:github github_create_repo '{"name":"example_name","description":"example_description","private":true,"auto_init":true}' --json copy
github.github_search_repos Read read Search for repositories on GitHub using keywords, language filters, stars, and more. Returns matching repositories with metadata.
query, sort, order, per_page kosmo integrations:call github.github_search_repos '{"query":"example_query","sort":"example_sort","order":"example_order","per_page":1}' --json copy kosmo integrations:github github_search_repos '{"query":"example_query","sort":"example_sort","order":"example_order","per_page":1}' --json copy
github.github_list_issues Read read List issues in a GitHub repository. Supports filtering by state (open, closed, all), labels, and sorting.
owner, repo, state, labels, sort, direction, per_page kosmo integrations:call github.github_list_issues '{"owner":"example_owner","repo":"example_repo","state":"example_state","labels":"example_labels","sort":"example_sort","direction":"example_direction","per_page":1}' --json copy kosmo integrations:github github_list_issues '{"owner":"example_owner","repo":"example_repo","state":"example_state","labels":"example_labels","sort":"example_sort","direction":"example_direction","per_page":1}' --json copy
github.github_get_issue Read read Get detailed information about a specific GitHub issue, including title, body, labels, assignees, milestone, and comments count.
owner, repo, issue_number kosmo integrations:call github.github_get_issue '{"owner":"example_owner","repo":"example_repo","issue_number":1}' --json copy kosmo integrations:github github_get_issue '{"owner":"example_owner","repo":"example_repo","issue_number":1}' --json copy
github.github_create_issue Write write Create a new issue in a GitHub repository. Requires a title. Optionally set body, assignees, labels, and milestone.
owner, repo, title, body, assignees, labels, milestone kosmo integrations:call github.github_create_issue '{"owner":"example_owner","repo":"example_repo","title":"example_title","body":"example_body","assignees":"example_assignees","labels":"example_labels","milestone":1}' --json copy kosmo integrations:github github_create_issue '{"owner":"example_owner","repo":"example_repo","title":"example_title","body":"example_body","assignees":"example_assignees","labels":"example_labels","milestone":1}' --json copy
github.github_update_issue Write write Update an existing issue in a GitHub repository. Can change title, body, state (open/closed), assignees, labels, and milestone.
owner, repo, issue_number, title, body, state, assignees, labels, milestone kosmo integrations:call github.github_update_issue '{"owner":"example_owner","repo":"example_repo","issue_number":1,"title":"example_title","body":"example_body","state":"example_state","assignees":"example_assignees","labels":"example_labels"}' --json copy kosmo integrations:github github_update_issue '{"owner":"example_owner","repo":"example_repo","issue_number":1,"title":"example_title","body":"example_body","state":"example_state","assignees":"example_assignees","labels":"example_labels"}' --json copy
github.github_add_labels Write write 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.
owner, repo, issue_number, labels kosmo integrations:call github.github_add_labels '{"owner":"example_owner","repo":"example_repo","issue_number":1,"labels":"example_labels"}' --json copy kosmo integrations:github github_add_labels '{"owner":"example_owner","repo":"example_repo","issue_number":1,"labels":"example_labels"}' --json copy
github.github_list_pull_requests Read read List pull requests in a GitHub repository. Supports filtering by state (open, closed, all) and sorting.
owner, repo, state, sort, direction, per_page kosmo integrations:call github.github_list_pull_requests '{"owner":"example_owner","repo":"example_repo","state":"example_state","sort":"example_sort","direction":"example_direction","per_page":1}' --json copy kosmo integrations:github github_list_pull_requests '{"owner":"example_owner","repo":"example_repo","state":"example_state","sort":"example_sort","direction":"example_direction","per_page":1}' --json copy
github.github_get_pull_request Read read Get detailed information about a specific GitHub pull request, including title, body, branch info, merge status, and review status.
owner, repo, pull_number kosmo integrations:call github.github_get_pull_request '{"owner":"example_owner","repo":"example_repo","pull_number":1}' --json copy kosmo integrations:github github_get_pull_request '{"owner":"example_owner","repo":"example_repo","pull_number":1}' --json copy
github.github_create_pull_request Write write Create a new pull request in a GitHub repository. Requires a title, head branch (source), and base branch (target).
owner, repo, title, body, head, base, draft kosmo integrations:call github.github_create_pull_request '{"owner":"example_owner","repo":"example_repo","title":"example_title","body":"example_body","head":"example_head","base":"example_base","draft":true}' --json copy kosmo integrations:github github_create_pull_request '{"owner":"example_owner","repo":"example_repo","title":"example_title","body":"example_body","head":"example_head","base":"example_base","draft":true}' --json copy
github.github_update_pull_request Write write Update an existing pull request in a GitHub repository. Can change title, body, state (open/closed), and base branch.
owner, repo, pull_number, title, body, state, base kosmo integrations:call github.github_update_pull_request '{"owner":"example_owner","repo":"example_repo","pull_number":1,"title":"example_title","body":"example_body","state":"example_state","base":"example_base"}' --json copy kosmo integrations:github github_update_pull_request '{"owner":"example_owner","repo":"example_repo","pull_number":1,"title":"example_title","body":"example_body","state":"example_state","base":"example_base"}' --json copy
github.github_merge_pull_request Write write Merge a GitHub pull request. Supports merge commit, squash, or rebase merge methods.
owner, repo, pull_number, commit_title, commit_message, merge_method kosmo integrations:call github.github_merge_pull_request '{"owner":"example_owner","repo":"example_repo","pull_number":1,"commit_title":"example_commit_title","commit_message":"example_commit_message","merge_method":"example_merge_method"}' --json copy kosmo integrations:github github_merge_pull_request '{"owner":"example_owner","repo":"example_repo","pull_number":1,"commit_title":"example_commit_title","commit_message":"example_commit_message","merge_method":"example_merge_method"}' --json copy
github.github_list_pull_request_reviews Read read List all reviews on a GitHub pull request, including review state (approved, changes_requested, commented, dismissed).
owner, repo, pull_number kosmo integrations:call github.github_list_pull_request_reviews '{"owner":"example_owner","repo":"example_repo","pull_number":1}' --json copy kosmo integrations:github github_list_pull_request_reviews '{"owner":"example_owner","repo":"example_repo","pull_number":1}' --json copy
github.github_create_review Write write Create a review on a GitHub pull request. Can approve, request changes, or comment. Optionally include inline review comments on specific lines.
owner, repo, pull_number, body, event, comments kosmo integrations:call github.github_create_review '{"owner":"example_owner","repo":"example_repo","pull_number":1,"body":"example_body","event":"example_event","comments":"example_comments"}' --json copy kosmo integrations:github github_create_review '{"owner":"example_owner","repo":"example_repo","pull_number":1,"body":"example_body","event":"example_event","comments":"example_comments"}' --json copy
github.github_list_commits Read read List commits in a GitHub repository. Supports filtering by branch (SHA), file path, and author.
owner, repo, sha, path, author, per_page kosmo integrations:call github.github_list_commits '{"owner":"example_owner","repo":"example_repo","sha":"example_sha","path":"example_path","author":"example_author","per_page":1}' --json copy kosmo integrations:github github_list_commits '{"owner":"example_owner","repo":"example_repo","sha":"example_sha","path":"example_path","author":"example_author","per_page":1}' --json copy
github.github_get_commit Read read Get detailed information about a specific commit, including author, committer, message, and file changes.
owner, repo, ref kosmo integrations:call github.github_get_commit '{"owner":"example_owner","repo":"example_repo","ref":"example_ref"}' --json copy kosmo integrations:github github_get_commit '{"owner":"example_owner","repo":"example_repo","ref":"example_ref"}' --json copy
github.github_get_file_content Read read Get the content of a file or directory from a GitHub repository. Returns base64-encoded content for files, or a listing for directories.
owner, repo, path, ref kosmo integrations:call github.github_get_file_content '{"owner":"example_owner","repo":"example_repo","path":"example_path","ref":"example_ref"}' --json copy kosmo integrations:github github_get_file_content '{"owner":"example_owner","repo":"example_repo","path":"example_path","ref":"example_ref"}' --json copy
github.github_create_or_update_file Write write 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).
owner, repo, path, message, content, sha, branch kosmo integrations:call github.github_create_or_update_file '{"owner":"example_owner","repo":"example_repo","path":"example_path","message":"example_message","content":"example_content","sha":"example_sha","branch":"example_branch"}' --json copy kosmo integrations:github github_create_or_update_file '{"owner":"example_owner","repo":"example_repo","path":"example_path","message":"example_message","content":"example_content","sha":"example_sha","branch":"example_branch"}' --json copy
github.github_create_branch Write write 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.
owner, repo, ref, sha kosmo integrations:call github.github_create_branch '{"owner":"example_owner","repo":"example_repo","ref":"example_ref","sha":"example_sha"}' --json copy kosmo integrations:github github_create_branch '{"owner":"example_owner","repo":"example_repo","ref":"example_ref","sha":"example_sha"}' --json copy
github.github_list_branches Read read List branches in a GitHub repository. Returns branch names and the SHA of each branch's latest commit.
owner, repo, per_page kosmo integrations:call github.github_list_branches '{"owner":"example_owner","repo":"example_repo","per_page":1}' --json copy kosmo integrations:github github_list_branches '{"owner":"example_owner","repo":"example_repo","per_page":1}' --json copy
github.github_list_releases Read read List releases in a GitHub repository. Returns release tag, title, body, draft/prerelease status, and assets.
owner, repo kosmo integrations:call github.github_list_releases '{"owner":"example_owner","repo":"example_repo"}' --json copy kosmo integrations:github github_list_releases '{"owner":"example_owner","repo":"example_repo"}' --json copy
github.github_create_release Write write Create a new release in a GitHub repository. Requires a tag name. Optionally set target commit, release name, body, draft, and prerelease flags.
owner, repo, tag_name, target_commitish, name, body, draft, prerelease kosmo integrations:call github.github_create_release '{"owner":"example_owner","repo":"example_repo","tag_name":"example_tag_name","target_commitish":"example_target_commitish","name":"example_name","body":"example_body","draft":true,"prerelease":true}' --json copy kosmo integrations:github github_create_release '{"owner":"example_owner","repo":"example_repo","tag_name":"example_tag_name","target_commitish":"example_target_commitish","name":"example_name","body":"example_body","draft":true,"prerelease":true}' --json copy
github.github_search_issues Read read Search for issues and pull requests across all of GitHub. Supports GitHub search syntax like "repo:owner/repo is:issue is:open label:bug".
query, sort, order, per_page kosmo integrations:call github.github_search_issues '{"query":"example_query","sort":"example_sort","order":"example_order","per_page":1}' --json copy kosmo integrations:github github_search_issues '{"query":"example_query","sort":"example_sort","order":"example_order","per_page":1}' --json copy
github.github_get_current_user Read read Get the authenticated GitHub user's profile information, including username, name, email, bio, public repos count, and more.
none kosmo integrations:call github.github_get_current_user '{}' --json copy kosmo integrations:github github_get_current_user '{}' --json copy
github.github_create_gist Write write Create a new GitHub gist. Provide a description, a map of filenames to their content, and whether the gist should be public or secret.
description, files, public kosmo integrations:call github.github_create_gist '{"description":"example_description","files":"example_files","public":true}' --json copy kosmo integrations:github github_create_gist '{"description":"example_description","files":"example_files","public":true}' --json copy
github.github_list_workflow_runs Read read List GitHub Actions workflow runs for a repository. Supports filtering by status (completed, in_progress, queued, etc.).
owner, repo, status, per_page kosmo integrations:call github.github_list_workflow_runs '{"owner":"example_owner","repo":"example_repo","status":"example_status","per_page":1}' --json copy kosmo integrations:github github_list_workflow_runs '{"owner":"example_owner","repo":"example_repo","status":"example_status","per_page":1}' --json copy
github.github_dispatch_workflow Write write 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).
owner, repo, workflow_id, ref, inputs kosmo integrations:call github.github_dispatch_workflow '{"owner":"example_owner","repo":"example_repo","workflow_id":"example_workflow_id","ref":"example_ref","inputs":"example_inputs"}' --json copy kosmo integrations:github github_dispatch_workflow '{"owner":"example_owner","repo":"example_repo","workflow_id":"example_workflow_id","ref":"example_ref","inputs":"example_inputs"}' --json copy Function Schemas Use these parameter tables when building CLI payloads without calling integrations:schema first.
Operation Read read
Schema command kosmo integrations:schema github.github_list_repos --json
Operation Read read
Schema command kosmo integrations:schema github.github_get_repo --json
Operation Write write
Schema command kosmo integrations:schema github.github_create_repo --json
Operation Read read
Schema command kosmo integrations:schema github.github_search_repos --json
Operation Read read
Schema command kosmo integrations:schema github.github_list_issues --json
Operation Read read
Schema command kosmo integrations:schema github.github_get_issue --json
Operation Write write
Schema command kosmo integrations:schema github.github_create_issue --json
Operation Write write
Schema command kosmo integrations:schema github.github_update_issue --json
Operation Write write
Schema command kosmo integrations:schema github.github_add_labels --json
Operation Write write
Schema command kosmo integrations:schema github.github_create_issue_comment --json
Operation Read read
Schema command kosmo integrations:schema github.github_list_pull_requests --json
Operation Read read
Schema command kosmo integrations:schema github.github_get_pull_request --json
Operation Write write
Schema command kosmo integrations:schema github.github_create_pull_request --json
Operation Write write
Schema command kosmo integrations:schema github.github_update_pull_request --json
Operation Write write
Schema command kosmo integrations:schema github.github_merge_pull_request --json
Operation Read read
Schema command kosmo integrations:schema github.github_list_pull_request_reviews --json
Operation Write write
Schema command kosmo integrations:schema github.github_create_review --json
Operation Read read
Schema command kosmo integrations:schema github.github_list_commits --json
Operation Read read
Schema command kosmo integrations:schema github.github_get_commit --json
Operation Read read
Schema command kosmo integrations:schema github.github_get_file_content --json
Operation Write write
Schema command kosmo integrations:schema github.github_create_or_update_file --json
Operation Write write
Schema command kosmo integrations:schema github.github_create_branch --json
Operation Read read
Schema command kosmo integrations:schema github.github_list_branches --json
Operation Read read
Schema command kosmo integrations:schema github.github_list_releases --json
Operation Write write
Schema command kosmo integrations:schema github.github_create_release --json
Operation Read read
Schema command kosmo integrations:schema github.github_search_issues --json
Operation Read read
Schema command kosmo integrations:schema github.github_get_current_user --json
Operation Write write
Schema command kosmo integrations:schema github.github_create_gist --json
Operation Read read
Schema command kosmo integrations:schema github.github_list_workflow_runs --json
Operation Write write
Schema command kosmo integrations:schema github.github_dispatch_workflow --json Permissions
Headless calls still follow the integration read/write permission policy. Configure read/write defaults
with integrations:configure. Add --force only for trusted automation that should bypass that policy.