Skip to content

Latest commit

 

History

History
204 lines (141 loc) · 5.54 KB

File metadata and controls

204 lines (141 loc) · 5.54 KB

Bauer

A proof-of-concept Go application that extracts document content, suggestions (proposed edits), and comments from Google Docs using the Google Docs API and Google Drive API.

Installation

sudo snap install bauer

Homebrew

First time installation

brew install britneywwc/bauer/bauer

Upgrade to a newer version or later

brew update
brew upgrade bauer

N.B. You need to install Copilot CLI which is used by Bauer.

Configuration

  1. Install Copilot CLI
  2. Create credentials.json file and copy the structure from the default file
  3. Get credentials from Google Cloud service or Bitwarden (internally)
  4. Fill up credentials.json with Google Cloud credentials (see Generating Google Cloud credentials).
  5. Share copy document with service account

Usage

  1. Install bauer using the instructions above
  2. Check that copilot and bauer are installed
  3. Get document ID from Google Document & share the document with the service account
  4. Run Bauer
bauer --doc-id <your-document-id> --credentials ./credentials.json
  1. Optional parameters
Flag Type Default Description
--chunk-size int 1 Total number of chunks to create (default: 1, or 5 if --page-refresh is set)
--dry-run bool false Run extraction and planning only; skip Copilot execution and PR creation
--output-dir string bauer-output Output directory for generated files
--model string gpt-5-mini-high Copilot model to use for code generation
--page-refresh bool false Whether this is a page refresh, or the default copy update
--target-repo string current directory Path to target repository where tasks should be executed

Examples

Basic run

bauer --doc-id <your-document-id> --credentials ./credentials.json

Dry run (test without executing changes)

bauer --doc-id <your-document-id> \
        --credentials ./credentials.json \
        --dry-run

Custom chunk size and output directory

bauer --doc-id <your-document-id> \
        --credentials ./credentials.json \
        --chunk-size 5 \
        --output-dir ./results

Specify model

bauer --doc-id <your-document-id> \
        --credentials ./credentials.json \
        --model "claude-sonnet-4.5"

Run on a different repository

bauer --doc-id <your-document-id> \
        --credentials ./credentials.json \
        --target-repo ../my-other-repo

Page refresh

bauer --doc-id <your-document-id> \
        --credentials ./credentials.json \
        --page-refresh

API usage

The API server exposes a small HTTP surface for submitting jobs and checking health. Jobs run asynchronously and write outputs to base-output-dir/<request-id>.

Run the API server

From Repository root:

task build-api
./bauer-api --config config.json

Endpoints

POST /api/v1/job

Submit a job for a Google Doc.

Request body:

{
  "doc_id": "<google-doc-id>",
  "chunk_size": 1,
  "page_refresh": false
}

Notes:

  • chunk_size defaults to 1 if omitted.
  • When page_refresh is true, the default chunk size becomes 5.

Responses:

  • 202 Accepted with body {"code":202} when the job is accepted.
  • 400 Bad Request for invalid JSON.

Example:

curl -X POST http://localhost:8090/api/v1/job \
        -H 'Content-Type: application/json' \
        -d '{"doc_id":"<google-doc-id>","chunk_size":2,"page_refresh":false}'

GET /api/v1/health

Simple health check.

Example:

curl http://localhost:8090/api/v1/health

Local development

Prerequisites

  1. Install go
  2. Install task
  3. Install Copilot CLI

Steps

  1. Modify the Taskfile with your document ID and credentials path for convenience
  2. Run the project with task
task run

Documentation

For more information refer to ARCHITECTURE.md

Future improvements

Short term

  • Automatically open PR with changes applied to the document using Google Docs API
  • Improve prompt templates for better results (this requires a lot of trial and error)

for code improvements, you can also refer to our todo list

Long term

On the long term, BAUer should evolve into a full-fledged API service, with the following features:

  • Automatic Jira ticket hooks to trigger workflows
  • Unified service account with domain wide delegation
  • Calling LLMs - with varying implementation complexity - via: - calling LLM APIs directly - spinning up ephemeral Copilot CLI instances - self-hosted LLMs (can use open source models such as Llama, openAI OSS, deepseek, etc)
  • Automatic PR creations and reviewer assignments