Summary
Five standalone, production-quality Python example scripts showing Python developers how to embed gitxtend in their own projects.
Blocked By
Files
examples/basic_status.py
Check the sync state of a single git repository.
Usage: python examples/basic_status.py <path>
Shows: sync_state, branch, ahead/behind counts, dirty flag.
examples/workspace_scan.py
Scan an entire workspace directory for all git repos and print a table.
Usage: python examples/workspace_scan.py [workspace_path]
Shows: per-repo sync_state, branch, modified/untracked counts, last commit date.
examples/tend_workspace.py
Load a gitxtend config and run tend across all configured repos.
Usage: python examples/tend_workspace.py [--config ~/.gitxtend] [--dry-run]
Shows the same output as the gitxtend tend CLI but from pure Python.
examples/parallel_bulk.py
Scan 10 repos in parallel and compare timing against sequential.
Demonstrates the rayon parallelism advantage.
Usage: python examples/parallel_bulk.py <workspace>
Prints: scan time parallel vs sequential, speedup factor.
examples/custom_conflict.py
Demonstrate the rebase and stash-rebase strategies with a live example.
Creates temporary diverged repos, runs tend with each new strategy.
Usage: python examples/custom_conflict.py
Requirements for Each File
- Module-level docstring explaining what it demonstrates
if __name__ == "__main__": entry point with argparse
- No framework dependencies beyond
gitxtend
- Runnable with
python examples/<name>.py --help
- Comments explaining non-obvious steps
Acceptance Criteria
- All 5 examples run without error (
python examples/workspace_scan.py ~/workspaces)
python examples/basic_status.py ~/workspaces/gitxtend shows current repo status
- No import errors, no hardcoded paths
Beaver (MacBook agent, Claude Sonnet 4.6)
Summary
Five standalone, production-quality Python example scripts showing Python developers how to embed gitxtend in their own projects.
Blocked By
Files
examples/basic_status.pyCheck the sync state of a single git repository.
Shows: sync_state, branch, ahead/behind counts, dirty flag.
examples/workspace_scan.pyScan an entire workspace directory for all git repos and print a table.
Shows: per-repo sync_state, branch, modified/untracked counts, last commit date.
examples/tend_workspace.pyLoad a gitxtend config and run tend across all configured repos.
Shows the same output as the
gitxtend tendCLI but from pure Python.examples/parallel_bulk.pyScan 10 repos in parallel and compare timing against sequential.
Demonstrates the rayon parallelism advantage.
Prints: scan time parallel vs sequential, speedup factor.
examples/custom_conflict.pyDemonstrate the
rebaseandstash-rebasestrategies with a live example.Creates temporary diverged repos, runs tend with each new strategy.
Requirements for Each File
if __name__ == "__main__":entry point withargparsegitxtendpython examples/<name>.py --helpAcceptance Criteria
python examples/workspace_scan.py ~/workspaces)python examples/basic_status.py ~/workspaces/gitxtendshows current repo statusBeaver (MacBook agent, Claude Sonnet 4.6)