Gitagent run-agent
Configures and runs agents with different adapters including Claude, OpenAI, CrewAI, Lyzr, and GitHub Models. Supports local execution, remote git repos, and one-shot prompts. Use when the user wants to run an agent, switch LLM providers, configure adapter settings, or launch agents from git repositories.
install
source · Clone the upstream repo
git clone https://github.com/open-gitagent/gitagent
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/open-gitagent/gitagent "$T" && mkdir -p ~/.claude/skills && cp -r "$T/examples/gitagent-helper/skills/run-agent" ~/.claude/skills/open-gitagent-gitagent-run-agent && rm -rf "$T"
manifest:
examples/gitagent-helper/skills/run-agent/SKILL.mdsource content
Run Agents
When to Use
When a user wants to run an agent locally, from a git repo, or with a specific adapter/framework.
Troubleshooting
If you see authentication errors:
- Claude: Ensure Claude Code is authenticated (
)claude auth status - OpenAI: Verify
is set and validOPENAI_API_KEY - GitHub: Check
has correct permissionsGITHUB_TOKEN - Lyzr: Confirm
is activeLYZR_API_KEY
Basic Usage
# Run local agent with Claude (default) gitagent run -d ./my-agent # Run from git repo gitagent run -r https://github.com/user/agent # Run with a prompt (one-shot mode) gitagent run -d ./my-agent -p "Review my code"
Adapters
| Adapter | Flag | Env Var Required | Interactive |
|---|---|---|---|
| Claude | | (uses Claude Code auth) | Yes |
| OpenAI | | | No |
| CrewAI | | — | No |
| OpenClaw | | | No ( required) |
| Nanobot | | | Yes |
| Lyzr | | | No ( required) |
| GitHub | | | No ( required) |
| Git | | (auto-detects) | Depends |
| Prompt | | — | Print only |
Examples
# Claude (interactive) gitagent run -d ./my-agent # GitHub Models (one-shot, streaming) export GITHUB_TOKEN="ghp_..." gitagent run -d ./my-agent -a github -p "Explain this codebase" # Lyzr (creates agent on Lyzr Studio + chats) export LYZR_API_KEY="..." gitagent run -r https://github.com/user/agent -a lyzr -p "Hello" # Lyzr one-liner (clone + create + chat) gitagent lyzr run -r https://github.com/user/agent -p "Hello" # Auto-detect adapter from repo gitagent run -r https://github.com/user/agent -a git -p "Hello" # Just print the system prompt gitagent run -d ./my-agent -a prompt
Git Caching
Repos cloned via
-r are cached at ~/.gitagent/cache/:
# Use cache (default) gitagent run -r https://github.com/user/agent # Force refresh gitagent run -r https://github.com/user/agent --refresh # No cache (temp dir, deleted after) gitagent run -r https://github.com/user/agent --no-cache
Auto-Detection (-a git
)
-a gitThe git adapter detects the best runner from the repo:
file (explicit hint).gitagent_adapter- Model name (claude-* → claude, gpt-* → openai)
- Framework files (CLAUDE.md, .cursorrules, crew.yaml, .lyzr_agent_id, .github_models)
- Default: claude