cal2prompt
by shuntaka9576
cal2prompt is a command-line tool that fetches your schedule (e.g., from Google Calendar) and converts it into a custom prompt or text snippet via a template engine. It can output directly to your stdout, or run as an experimental MCP (Model Context Protocol) server.
Last updated: N/A
What is cal2prompt?
cal2prompt is a command-line tool designed to fetch your schedule from services like Google Calendar and transform it into custom prompts or text snippets using a template engine. It can function as a standalone CLI tool or as an experimental Model Context Protocol (MCP) server.
How to use cal2prompt?
First, install cal2prompt using Brew or Cargo. Next, set up Google OAuth2.0 Client by following the instructions in the documentation. Then, configure the tool by creating secrets.lua
and config.lua
in ~/.config/cal2prompt/
. Finally, authenticate via the CLI and begin using cal2prompt with various command-line options or integrating it with Claude Desktop via MCP.
Key features of cal2prompt
Google Calendar Integration using Google Calendar API v3
Flexible LLM Prompt Customization with Jinja2 template engine
High-speed Processing Powered by the Rust Ecosystem
Experimental MCP Mode for running as a Model Context Protocol server
Use cases of cal2prompt
Automating the creation of daily or weekly schedule summaries for use in LLM prompts.
Integrating calendar data into applications that follow the Model Context Protocol.
Creating custom calendar-based prompts for personal or professional use.
Using schedule information to drive automated tasks or workflows.
FAQ from cal2prompt
How do I authenticate with Google Calendar?
How do I authenticate with Google Calendar?
You need to set up your own Google OAuth2.0 Client and follow the instructions in docs/setup-oauth
to create your own Google 'project' and obtain an OAuth token.
Where do I store my Google Calendar credentials?
Where do I store my Google Calendar credentials?
Store your clientID, clientSecret, and Calendar ID in the ~/.config/cal2prompt/secrets.lua
file.
How do I customize the output format?
How do I customize the output format?
Customize the output.template
field in the ~/.config/cal2prompt/config.lua
file. It uses the Jinja2 template engine syntax.
How do I use cal2prompt with Claude Desktop?
How do I use cal2prompt with Claude Desktop?
Add the cal2prompt MCP configuration to your ~/Library/Application Support/Claude/claude_desktop_config.json
file.
What time zone does cal2prompt use?
What time zone does cal2prompt use?
Specify the time zone in the settings.TZ
variable in ~/.config/cal2prompt/config.lua
. Use an IANA time zone format (e.g., America/Los_Angeles
or Asia/Tokyo
).