Skip to main content

ccal

中文文档

A CLI tool that turns natural language text or images into calendar events. Powered by LLMs.

Features

  • Text input — describe an event in plain language, ccal parses it into structured fields
  • Image input — extract text from screenshots/photos via OCR, then parse
  • Multi-LLM support — works with OpenAI, Anthropic, Gemini, OpenRouter, Deepseek, Groq, Mistral, and more (via litellm)
  • ICS export — generate standard .ics files importable by any calendar app
  • Google Calendar sync — create events directly on Google Calendar via API
  • Apple Calendar sync — add events via AppleScript (macOS only, auto-fallback to ICS on other platforms)
  • Secure key storage — API keys stored in your system keyring, never in plain text
  • Geolocation — auto-detect timezone and location for accurate event scheduling
  • Stdin support — pipe text from other commands

Requirements

Installation

Official installer

The easiest way to install ccal is with the official installer for your platform:

curl -fsSL https://raw.githubusercontent.com/Q1ngX1/ccal/main/install.sh | sh

Windows users can install directly with PowerShell:

powershell -ExecutionPolicy Bypass -Command "irm https://raw.githubusercontent.com/Q1ngX1/ccal/main/install.ps1 | iex"

If you are using Git Bash or MinGW, call the same command through powershell.exe.

To pin a version or choose a custom destination, pass arguments after sh -s --, for example:

curl -fsSL https://raw.githubusercontent.com/Q1ngX1/ccal/main/install.sh | sh -s -- --version v0.1.15
curl -fsSL https://raw.githubusercontent.com/Q1ngX1/ccal/main/install.sh | sh -s -- --prefix "$HOME/bin"

If you already have Tesseract installed on Windows and want ccal to use it, download the script first and pass the Tesseract path:

powershell -ExecutionPolicy Bypass -Command "$p = Join-Path $env:TEMP 'install-ccal.ps1'; irm https://raw.githubusercontent.com/Q1ngX1/ccal/main/install.ps1 -OutFile $p; powershell -ExecutionPolicy Bypass -File $p -TesseractHome 'C:\Program Files\Tesseract-OCR'"

Once installed, you can pull the latest standalone release with:

ccal update

To remove a standalone install, run:

ccal uninstall --purge

If you installed an older Linux release before ccal uninstall existed, remove it manually:

sudo rm -f /usr/local/bin/ccal
rm -f ~/.local/bin/ccal
rm -rf ~/.config/ccal

Use the path that matches where you installed ccal. If you used a custom prefix, delete the binary from that directory instead. If you installed through a package manager, remove it with that tool.

From source

If you want to develop locally or run from source:

git clone https://github.com/your-username/ccal.git
cd ccal
uv sync

Prebuilt binaries

If you want a ready-to-run command-line executable, download the asset for your platform from the GitHub Releases page. The release binaries are built for Linux, macOS, and Windows, and they include the core CLI without the optional OCR extra.

Typical filenames look like:

  • ccal-vX.Y.Z-linux-x86_64
  • ccal-vX.Y.Z-windows-x86_64.exe
  • ccal-vX.Y.Z-macos-x86_64
  • ccal-vX.Y.Z-macos-arm64

After downloading:

  • Linux and macOS:
    chmod +x ccal
    ./ccal --help
    
  • Windows:
    .\ccal.exe --help
    

Standalone Builds

See the build guide in docs/building.en.md for PyInstaller packaging, including bundled OCR/Tesseract support.

Quick Start

1. Setup

ccal setup

This will walk you through configuring:

  • LLM provider and model
  • API key (stored securely in system keyring)
  • Default output method (ICS file, Google Calendar, or Apple Calendar)
  • Google Calendar setup, including client type, auth mode, credentials location, and Calendar ID

2. Add an event

From text:

ccal add "Team meeting tomorrow at 3pm in Conference Room A"

From an image:

ccal add flyer.png

From stdin:

echo "Lunch with Alice Friday noon" | ccal add

With options:

ccal add "Dinner Friday 7pm at Luigi's" -o google       # sync to Google Calendar
ccal add "Weekly standup Mon 9am" -o apple               # add to Apple Calendar (macOS)
ccal add "Weekly standup Mon 9am" -o ics                  # export as .ics file
ccal add "会议明天下午两点" -m anthropic/claude-sonnet-4-20250514  # use a specific model
ccal add screenshot.png -l chi_sim                        # OCR with Chinese language
ccal add "Demo at 2pm" -y                                 # skip confirmation
ccal add "Demo at 2pm" --json                             # output as JSON

3. Parse only (no save)

ccal parse "Workshop next Wednesday 10am-12pm, Room 301"
ccal parse "下周一上午10点团队周会" --json

4. View config

ccal config

Commands

Command Description
ccal add [text|image] Parse input and create a calendar event
ccal parse [text|image] Parse and display event fields without saving
ccal update Download and install the latest standalone release
ccal uninstall Remove the current standalone binary
ccal setup Interactive configuration wizard
ccal config Show current configuration and platform info

ccal add options

Option Description
-o, --output Output method: ics, google, or apple
-p, --provider LLM provider name
-m, --model LLM model (e.g. openai/gpt-4o)
-y, --yes Skip confirmation, output directly
-l, --language OCR language (e.g. chi_sim, eng+chi_sim)
--json Output parsed event as JSON

Platform Support

Feature macOS Linux Windows
ICS export ✅ ✅ ✅
Google Calendar ✅ ✅ ✅
Apple Calendar ✅ ❌ fallback to ICS ❌ fallback to ICS

Configuration

Config is stored at ~/.config/ccal/config.toml. API keys are stored in your system's native keyring (macOS Keychain / Linux Secret Service / Windows Credential Locker).

For Google Calendar integration, ccal uses two different local files:

  • google_credentials.json: the OAuth client credentials JSON downloaded from Google Cloud Console. This contains the client id and client secret. Keep this file around after setup.
  • google_token_*.json: the cached login token created after the first successful authorization. The access token inside can expire and refresh automatically, so you usually do not need to touch it. ccal picks the cache file based on the current credentials path and auth mode.

During ccal setup, place the credentials JSON in the configured directory, or point setup directly at the JSON file. The setup tutorial also explains:

  • Desktop app vs TVs and Limited Input devices
  • External vs Internal
  • Testing status and Test users
  • how to find a Google Calendar ID
  • setup-time validation of the selected Calendar ID

You can also configure Google Calendar during ccal setup through the dedicated middle step, even if your default output is not Google.

Project Structure

src/
├── main.py                  # CLI entry point (Typer)
├── config.py                # Configuration & keyring management
├── models/
│   ├── model.py             # CalendarEvent Pydantic model
│   └── llm.py               # LLM parsing via litellm
├── input/
│   ├── ocr.py               # Image text extraction (pytesseract)
│   └── geo.py               # IP-based geolocation for timezone
└── connections/
    ├── google_calendar.py   # Google Calendar API integration
    ├── apple_calendar.py    # Apple Calendar via AppleScript (macOS)
    └── ics.py               # ICS file export

License

MIT

Metadata

Release files for ccal 0.1.20

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ccal 0.1.20
File Size Uploaded Provenance Actions
ccal-0.1.20.tar.gz 203.8 kB With provenance Details for ccal-0.1.20.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ccal 0.1.20
File Interpreter ABI Platform Actions
ccal-0.1.20-py3-none-any.whl Python 3 none any Details for ccal-0.1.20-py3-none-any.whl

Total release size: 237.3 kB

Release files / ccal-0.1.20.tar.gz

Download URL ccal-0.1.20.tar.gz
Size 203.8 kB
Tags Source
SHA-256 checksum
How to use checksums
2c79db4379eb25717b9013e2335b9a19b3a5b43de99e1189c1dda0e98401d54d
BLAKE2b-256 checksum
How to use checksums
b05f865fcd4ff6635b251437871db00937cb37aef47c66c78c4110ea6eb131f1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 1, 2026.

Transparency log

Release files / ccal-0.1.20-py3-none-any.whl

Download URL ccal-0.1.20-py3-none-any.whl
Size 33.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ee802007062845be29cf534a341fe322282aadc78a36732606f918c1985e70ad
BLAKE2b-256 checksum
How to use checksums
36e87f35471701ad7aba3827b6d553a4c21299f9053fb7bc5e330b6314a1e07b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 1, 2026.

Transparency log

Security for ccal 0.1.20

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for ccal-0.1.20.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 1, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page