-
-
Notifications
You must be signed in to change notification settings - Fork 3
Git and GitHub
CortexPrism edited this page Jun 17, 2026
·
1 revision
CortexPrism provides full git workspace management and GitHub integration for both the CLI and agent tools.
Agent workspace: ~/.cortex/data/workspaces/<agent-id>/
Global workspace: Current working directory
Every agent workspace is automatically git init'd on first access with path traversal protection.
Every file write/edit triggers an automatic git commit:
agent/<agent-id>: <tool> <file-path>
Committed on a dedicated workspace/<agent-id> branch.
cortex git status [--agent <id>]
cortex git log [--agent <id>] [--limit 20]
cortex git diff [--agent <id>] [--stat] [--file <path>]
cortex git add <files> [--agent <id>]
cortex git add --all [--agent <id>]
cortex git commit <message> [--agent <id>]
cortex git push [--agent <id>] [--remote origin] [--branch <name>]
cortex git pull [--agent <id>]
cortex git clone <url> <dest> [--branch <name>]
cortex git branch [--agent <id>]
cortex git branch --create <name> [--agent <id>]
cortex git branch --checkout <name> [--agent <id>]
cortex git remote --add <name> --url <url> [--agent <id>]GitHub token is resolved in order:
-
githubTokenin~/.cortex/config.json -
GITHUB_TOKENorGH_TOKENenvironment variable -
github_tokenentry in the encrypted credential vault
cortex github pr list <repo> [--state open] [--limit 10]
cortex github pr create <repo> <title> <head> <base> [--body "..."] [--draft]
cortex github pr merge <repo> <number> [--method merge|squash|rebase]
cortex github issue list <repo> [--state open]
cortex github issue create <repo> <title> [--body "..."] [--labels a,b]
cortex github repo list [--type all|owner|public|private]| Tool | Description |
|---|---|
git_push |
Stage, commit, and push to remote |
github_pr_create |
Create a pull request |
github_pr_list |
List pull requests |
github_issue_create |
Create an issue |
github_issue_list |
List issues |
| Endpoint | Method | Description |
|---|---|---|
/api/workspace/git/status |
GET | Git status |
/api/workspace/git/log |
GET | Commit log |
/api/workspace/git/branches |
GET | List branches |
/api/workspace/git/commit |
POST | Stage all and commit |
/api/workspace/git/push |
POST | Push to remote |
/api/workspace/git/pull |
POST | Pull from remote |
/api/github/token |
GET | Token status |
/api/github/repos |
GET | List repos |
/api/github/repos/:owner/:name |
GET | Repo details |
/api/github/repos/:owner/:name/pulls |
GET | List PRs |
/api/github/repos/:owner/:name/issues |
GET | List issues |
The Web UI includes:
- Git tab — Visual status, stage, commit, push, pull
- GitHub tab — PR management, issue tracking, repository browser
- CLI Reference — Full git and github command reference
- REST API — Git and GitHub endpoints
- Built-in Tools — Agent-accessible GitHub tools
CortexPrism — Open-source agentic AI harness · MIT License · Built with Deno 2.x + TypeScript