
khal
CLI遵循开放标准的命令行日历,配合 vdirsyncer 同步 iCloud 等 CalDAV 日历,agent 可查询日程、快速新建事件,也有交互式界面。需自行配置 vdirsyncer 同步,有一定技术门槛,不支持 Windows。
khal
.. image:: https://github.com/pimutils/khal/actions/workflows/ci.yml/badge.svg?branch=master&event=push :target: https://github.com/pimutils/khal/actions/workflows/ci.yml
.. image:: https://codecov.io/github/pimutils/khal/coverage.svg?branch=master :target: https://codecov.io/github/pimutils/khal?branch=master
.. image:: https://readthedocs.org/projects/khal/badge/?version=latest&style=flat :target: https://khal.readthedocs.io/en/latest/
Khal is a standards based CLI and terminal calendar program, able to synchronize with CalDAV_ servers through vdirsyncer_.
.. image:: https://lostpackets.de/images/khal.png
Features
(or rather: limitations)
- khal can read and write events/icalendars to vdir_, so vdirsyncer_ can be
used to
synchronize calendars with a variety of other programs__, for example CalDAV_ servers. - fast and easy way to add new events
- ikhal (interactive khal) lets you browse and edit calendars and events
- no support for editing the timezones of events yet
- works with python 3.10+
- khal should run on all major operating systems [1]_
.. [1] except for Microsoft Windows
Feedback
Please do provide feedback if khal works for you or even more importantly if it doesn't. The preferred way to get in contact (especially if something isn't working) is via github or via IRC (#pimutils on Libera.Chat).
.. _vdir: https://vdirsyncer.readthedocs.org/en/stable/vdir.html .. _vdirsyncer: https://github.com/pimutils/vdirsyncer .. _CalDAV: https://en.wikipedia.org/wiki/CalDAV .. _github: https://github.com/pimutils/khal/ .. __: https://en.wikipedia.org/wiki/Comparison_of_CalDAV_and_CardDAV_implementations
Documentation
For khal's documentation have a look at readthedocs_.
.. _readthedocs: https://khal.readthedocs.org/
Installation
khal is packaged for most operating systems__ and should be installable with
your standard package manager.
.. __: https://repology.org/project/python:khal/versions
For some exemplary OS you can find installation instructions below. Otherwise see the documentation_ for more information.
.. _documentation: https://khal.readthedocs.io/en/latest/install.html
Debian/Ubuntu
apt install khal
Nix
~~~
nix-env -i khal
Arch
~~~~
pacman -S khal
Brew
~~~~
brew install khal
Fedora
~~~~~~
dnf install khal
FreeBSD
~~~~~~~
pkg install py-khal
Install latest version
pip install git+https://github.com/pimutils/khal
Alternatives
Projects with similar aims you might want to check out are calendar-cli_ (no offline storage and a bit different scope) and gcalcli_ (only works with google's calendar).
.. _calendar-cli: https://github.com/tobixen/calendar-cli .. _gcalcli: https://github.com/insanum/gcalcli
Contributing
You want to contribute to khal? Awesome!
The most appreciated way of contributing is by supplying code or documentation, reporting bugs, creating packages for your favorite operating system, making khal better known by telling your friends about it, etc.
License
khal is released under the Expat/MIT License::
Copyright (c) 2013-2022 khal contributors
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
相關資源

Time MCP Server
MCP为 agent 提供当前时间查询与 IANA 时区换算,自动识别系统时区,无需 API Key。MCP 官方参考服务器,Python 实现。
modelcontextprotocol/servers91.3k
gws(Google Workspace CLI)
CLI用一个命令行调用 Gmail、Drive、日历、Docs、Sheets 等 Google Workspace API,命令按 Discovery 动态生成、输出 JSON,附 100 多个 Agent Skill。googleworkspace 组织开源但声明非官方支持产品;需 Google Cloud 项目 OAuth 授权。
googleworkspace/cli31.6k
lark-cli(飞书 CLI)
CLI飞书官方命令行,200 多条命令覆盖消息、文档、多维表格、电子表格、日历、邮件、审批、OKR、会议与妙记,自带 20 多个 lark-* Agent Skill,输出结构化;需先创建飞书应用并登录授权。
larksuite/cli17.7k
gog (gogcli)
CLI面向脚本与 agent 的 Google Workspace 命令行,覆盖 Gmail、日历、Drive、Docs、Sheets、联系人与任务,支持 JSON 输出、只读模式与命令白名单,可作只读默认的 MCP 服务;需自备 Google OAuth 客户端。
openclaw/gogcli8.5k
Himalaya
CLI命令行邮件客户端,支持 IMAP、SMTP、JMAP、Gmail 与 Microsoft Graph,多账户、可用 --json 输出,适合让 agent 查收、搜索、撰写与发送邮件;首次运行时向导会自动探测邮箱配置。
pimalaya/himalaya7.5k
gcalcli
CLI在终端查看日程、搜索、新建、编辑和删除 Google 日历事件,支持导入 ICS 邀请与定时提醒。需自行在 Google Cloud 创建 Calendar API 的 OAuth 凭据。
insanum/gcalcli3.8k