Skip to content

Shell & Git

The Bash tool runs commands in your shell with full access to your environment.

Bash(command="pytest tests/", timeout=120000)
Bash(command="npm run build")
Bash(command="docker compose up -d", run_in_background=true)
  • Timeout control — default 2 minutes, configurable up to 10 minutes
  • Background execution — long-running commands can run in background
  • Working directory — persists between commands within a session
  • Full environment — inherits your shell profile (bash or zsh)

Start a command in the background and check on it later:

Bash(command="npm run dev", run_in_background=true) # Returns job ID
JobOutput(job_id="abc123", tail=20) # Check output
JobList() # See all jobs

Useful for dev servers, long builds, and other processes you don’t need to watch.

CheckPort(port=3000) # Is something running on port 3000?
WaitForPort(port=3000) # Wait for a server to start
KillPort(port=3000) # Stop whatever's on port 3000

These tools help the AI manage development servers — check if one is already running before starting another.

The Git tool provides safe git operations with built-in guardrails.

Git(command="status")
Git(command="diff")
Git(command="add", args="src/auth.py src/middleware.py")
Git(command="commit", message="feat(auth): add JWT validation")
Git(command="push")

By default, the Git tool blocks dangerous operations:

  • push --force — blocked (can overwrite upstream)
  • reset --hard — blocked (can lose uncommitted work)
  • checkout . / restore . — blocked (can discard changes)
  • clean -f — blocked (can delete untracked files)
  • branch -D — blocked (can delete branches)
  • Interactive flags (-i) — blocked (requires user input)

These can be unblocked with allow_unsafe=true, but only when explicitly requested.

Every commit made through Gee-Code automatically includes a co-author attribution:

Co-Authored-By: Gee-Code <noreply@gee.pub>

This makes it clear which commits involved AI assistance.

The AI follows a structured commit workflow:

  1. Run git status and git diff to understand changes
  2. Check recent commit messages to match the project’s style
  3. Stage specific files (not git add -A — avoids including secrets)
  4. Create a commit with a descriptive message
  5. Verify success with git status

The AI follows your project’s commit conventions. If you use conventional commits:

feat(scope): add new feature
fix(scope): resolve bug
refactor(scope): restructure code

Set this in your project rules (.gee/gee.md) or user preferences (~/.gee-code/gee.md).