---
name: gitbot-local-repo-bots
description: Use when setting up GitBot to create reusable local coding-agent bots for Claude Code, Codex or OpenCode with limited permissions and resumable threads.
---
# GitBot local repo bots
## What this does
GitBot is a local server that runs Claude Code, Codex, or OpenCode on your machine. Each "bot" is a reusable job (instructions, agent choice, permissions, optional setup steps). Each "thread" is a conversation with a bot in a chosen repo folder that you can return to later.
## When to use
- You want the same coding-agent job (e.g. a docs-drift reviewer) to run across several repos.
- You want per-bot permission limits and conversations you can resume.
## How to run it
1. Check prerequisites with the user: Node.js 18+ and at least one signed-in agent CLI:
- Claude Code: install and sign in to `claude`.
- Codex: install `codex` and run `codex login`.
- OpenCode: install `opencode` and run `opencode auth login`.
GitBot uses the existing agent login; no GitBot account is needed.
2. Ask the user before installing anything, then walk them through:
```bash
npm install -g @gitbot-hq/gitbot
cd /path/to/your/projects
gitbot start
```
Use `gitbot start -p 4000` if port 3000 is taken, and `gitbot start --caffeinate` to keep a Mac awake during long jobs. Then open http://localhost:3000.
3. Create the bot: in the **Bots** panel select **+** then **Create manually**.
4. Give it a name and short description, choose an installed agent, and write the standing job in **Instructions**.
5. Permissions: leave **Ask before each tool** for Claude Code or OpenCode. For Codex, **Edit in the working directory** allows edits in the selected folder; use **Plan only** for read-only. Add **Setup instructions** only if the bot must prepare something once on this machine.
6. Select **Create bot**, open a new thread, choose the repo folder, and send today's task as the first message.
7. Alternatives: **Create with an agent** (guided authoring prompt) or **Import bot** from a share code. Always review imported instructions, setup steps and permissions before letting the bot work.
## Starter bot instructions (verbatim)
```text
You review the current repository for documentation that no longer matches the code.
Start by identifying one concrete mismatch. Explain it, propose a small fix,
and ask before editing files.
```
## Notes and safety
- GitBot has no authentication and listens on all network interfaces. Keep it on a trusted network, never expose the port to the public internet, and stop it when not in use.
- Bots act with the user's file and shell access. Auto-approval removes the chance to inspect tool calls; start with ask-before-tools.
- Codex cannot enforce an Allowed tools list or per-action approvals; choose Claude Code or OpenCode when a strict tool fence matters. OpenCode needs the model as `provider/model`.
- Sharing a bot by code copies its settings and instructions only (no chat history or files); check for private details first.
- Bots and threads are stored under `~/.gitbot`. The chosen agent may send prompts and code to its provider.
## Output
Hand back: confirmation of the prerequisites checked, the commands to run, the bot's name, agent, instructions and permission mode filled in for the user's use case, and the first thread message to send.
Credit: Based on public content by ikramrana.ai, packaged by Orbit.