Installation and usageΒΆ

To install Coauthor run the following command

pip install coauthor

Create a file .coauthor.yml in the root of your project, for example in a Obsidian project where all my Obsidian vaults are in directory vaults:

---
agent:
  model: llama2:latest # default openai/gpt-4o
workflows:
  - name: obsidian
    watch:
      filesystem:
        paths:
          - vaults
    tasks:
      - id: ai-file-update
        type: process_file_with_openai_agent
        modify_event_limit: 30  # seconds
        system: >-
            You are a co-author of Obsidian Markdown files tasked with enhancing and
            refining them based on specific embedded instructions.
        path_patterns:
          - .*\.md$
        content_patterns:
          - ".*@ai:.*"

Start Coauthor run the following commands:

export OPENAI_API_KEY=<you api key>
export OPENAI_API_URL=https://openrouter.ai/api/v1
coauthor --watch

To see command line options, run coauthor --help.