Skip to main content

Claudebook

Project description

Claudebook

A runbook run by Claude (specifically by Claude Code)!

Example

#! /usr/bin/env uvx claudebook
---
mcp:
  slack:
    command: npx
    args:
      - -y
      - "@modelcontextprotocol/server-slack"
---

# Start my Slack Day

For the following channels, summarize all the activity yesterday, which @joshcannon didn't respond:

- #project-1
- #project-2
- #thing-five-support

Rank them from what seems like highest priority to lowest priority.

How does it work?

Under the hood, claudebook:

  • Takes the runbook given by the positional argument
  • Tries to parse YAML frontmatter for Claudebook settings
  • Calls claude

Ways of running a Claudebook

There are a few ways of running Claudebooks:

Running the code

There are two ways of running the code:

Using uvx and the Python Package

uvx -q claudebook <claudebook> leverages the claudebook Python package to run a Claudebook.

This allows for very fast execution and also allows for controlling the version of claudebook and its dependencies.

More information about uvx can be found here: https://docs.astral.sh/uv/guides/tools/.

Using uv run and the GitHub URL

uv run -q https://raw.githubusercontent.com/thejcannon/claudebook/refs/heads/main/claudebook.py allows you to run the latest version of claudebook, by having uv fetch the latest code from GitHub.

It requires a network request (less than a few KB) and uv will construct a temporary virtual environment to run the Claudebook, but it also means you get the latest and greatest features.

Running the markdown

There are also two ways of running the markdown:

Making the runbook executable

  1. Add a shebang at the top: #! /usr/bin/env <invocation>
  2. Make the file executable: chmod +x <runbook>
  3. Run the file: <runbook> or ./<runbook>

Use the CLI

Alternatively, you can just pass the path to the runbook to the CLI:

<invocation> <runbook>
# Such as:
uvx run <runbook>
uv run <GH URL> <runbook>

Configuration

Claudebooks support a few configuration options, which are specified as YAML frontmatter in the runbook.

Claude Code pass-through

Claudebooks support a few options which get passed through to claude:

  • -p/--print: Print the response and exit
  • --json: Output JSON

MCP

Claudebooks support MCP (Model Context Protocol) by allowing you to specify a mapping of MCP servers to use.

These get forwarded to Claude Code to be loaded before the runbook is executed.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

claudebook-0.1.0.tar.gz (12.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

claudebook-0.1.0-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file claudebook-0.1.0.tar.gz.

File metadata

  • Download URL: claudebook-0.1.0.tar.gz
  • Upload date:
  • Size: 12.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.21

File hashes

Hashes for claudebook-0.1.0.tar.gz
Algorithm Hash digest
SHA256 7ff6247fa85b7b94530593b17e24d9ec99bf22febe5a91089dfb267564a7a0e7
MD5 04a4327dcf902425851eb00392c26400
BLAKE2b-256 0379592510c6bf8033bfec143c58192c59f2c36055b6923acc92c747536e2778

See more details on using hashes here.

File details

Details for the file claudebook-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for claudebook-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 05e77c2c13ee668ce1bcb56867502604221773b0e85ba51fd9942402268e868d
MD5 83dd3793aaf3f6761314706d63c252c0
BLAKE2b-256 a1ff1c45fd78d49952ff35755af5cd46821663e699f64acc5eed677d56480900

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page