概览
什么是 Inbox Zero?
Inbox Zero 是一款创新的开源应用程序,旨在帮助用户高效管理电子邮件,实现“收件箱清空”的状态。这个概念指的是保持收件箱为空或尽可能接近空的做法,让用户能够专注于重要任务,而不被未读邮件的干扰。该应用提供了简化电子邮件管理的工具和功能,使用户更容易优先处理和及时回复消息。
Inbox Zero 的特点
- 用户友好的界面:该应用拥有干净直观的设计,简化了导航,提升了用户体验。
- 邮件分类:根据优先级、发件人或主题自动将电子邮件分类到不同的文件夹,帮助用户快速识别重要消息。
- 任务管理集成:与任务管理工具无缝集成,将电子邮件转换为可执行的任务,确保没有遗漏。
- 可自定义通知:设置个性化的通知偏好,以便在不被不断提醒所困扰的情况下,及时了解重要邮件。
- 搜索功能:高级搜索选项允许用户快速找到特定电子邮件,节省时间和精力。
- 开源:作为一个开源项目,用户可以参与其开发,自定义功能,并确保应用不断发展以满足他们的需求。
如何使用 Inbox Zero
- 下载并安装:访问 getinboxzero.com 下载应用程序,并按照安装说明进行操作。
- 连接您的电子邮件:安装后,将您的电子邮件帐户连接到应用程序,实现无缝集成。
- 设置分类:根据您的偏好自定义电子邮件分类,例如工作、个人或紧急。
- 管理通知:调整通知设置,以便在减少干扰的同时接收重要邮件的提醒。
- 开始整理:开始浏览您的电子邮件,对其进行分类,并将重要消息转换为任务。
- 维持 Inbox Zero:定期检查您的收件箱,及时回复邮件,并保持收件箱的整洁,以实现和维持收件箱清空。
常见问题解答
问:Inbox Zero 是免费使用的吗?
答:是的,Inbox Zero 是一款开源应用程序,这意味着它可以免费下载和使用。
问:我可以自定义 Inbox Zero 的功能吗?
答:当然可以!作为开源项目,用户可以根据自己的具体需求和偏好修改应用程序。
问:Inbox Zero 支持多个电子邮件帐户吗?
答:是的,您可以将多个电子邮件帐户连接到 Inbox Zero,从而在一个地方管理所有电子邮件。
问:Inbox Zero 如何帮助提高生产力?
答:通过整理电子邮件并将其转换为任务,Inbox Zero 帮助用户专注于最重要的事情,减少压力并提高生产力。
问:我在哪里可以找到 Inbox Zero 的支持?
答:您可以在官方 GitHub 仓库 或应用程序的网站上找到支持和社区讨论。
详情
About
There are two parts to Inbox Zero:
- An AI email assistant that helps you spend less time on email.
- Open source AI email client.
If you're looking to contribute to the project, the email client is the best place to do this.
Thanks to Vercel for sponsoring Inbox Zero in support of open-source software.
Features
- AI Personal Assistant: Manages your email for you based on a plain text prompt file. It can take any action a human assistant can take on your behalf (Draft reply, Label, Archive, Reply, Forward, Mark Spam, and even call a webhook).
- Reply Zero: Track emails that need your reply and those awaiting responses.
- Smart Categories: Categorize everyone that's ever emailed you.
- Bulk Unsubscriber: Quickly unsubscribe from emails you never read in one-click.
- Cold Email Blocker: Automatically block cold emails.
- Email Analytics: Track your email activity with daily, weekly, and monthly stats.
Learn more in our docs.
Feature Screenshots
| |
|
| :: | :-: |
| AI Assistant | Reply Zero |
|
|
|
| Gmail client | Bulk Unsubscriber |
Demo Video
Built with
Star History
Feature Requests
To request a feature open a GitHub issue, or join our Discord.
Getting Started for Developers
We offer a hosted version of Inbox Zero at https://getinboxzero.com. To self-host follow the steps below.
Setup
Here's a video on how to set up the project. It covers the same steps mentioned in this document. But goes into greater detail on setting up the external services.
Requirements
- Node.js >= 18.0.0
- pnpm >= 8.6.12
- Docker desktop (recommended but optional)
Make sure you have the above installed before starting.
The external services that are required are (detailed setup instructions below):
Updating .env file: secrets
Create your own .env
file from the example supplied:
cp apps/web/.env.example apps/web/.env
cd apps/web
pnpm install
Set the environment variables in the newly created .env
. You can see a list of required variables in: apps/web/env.ts
.
The required environment variables:
Secrets:
NEXTAUTH_SECRET
-- can be any random string (try usingopenssl rand -hex 32
for a quick secure random string)GOOGLE_ENCRYPT_SECRET
-- Secret key for encrypting OAuth tokens (try usingopenssl rand -hex 32
for a secure key)GOOGLE_ENCRYPT_SALT
-- Salt for encrypting OAuth tokens (try usingopenssl rand -hex 16
for a secure salt)
Redis:
UPSTASH_REDIS_URL
-- Redis URL from Upstash. (can be empty if you are using Docker Compose)UPSTASH_REDIS_TOKEN
-- Redis token from Upstash. (or specify your own random string if you are using Docker Compose)
When using Vercel with Fluid Compute turned off, you should set MAX_DURATION=300
or lower. See Vercel limits for different plans here.
Updating .env file with Google OAuth credentials:
GOOGLE_CLIENT_ID
-- Google OAuth client ID. More info hereGOOGLE_CLIENT_SECRET
-- Google OAuth client secret. More info here
Go to Google Cloud. Create a new project if necessary.
Create new credentials:
-
If the banner shows up, configure consent screen (if not, you can do this later)
- Click the banner, then Click
Get Started
. - Choose a name for your app, and enter your email.
- In Audience, choose
External
- Enter your contact information
- Agree to the User Data policy and then click
Create
. - Return to APIs and Services using the left sidebar.
- Click the banner, then Click
-
Create new credentials:
- Click the
+Create Credentials
button. Choose OAuth Client ID. - In
Application Type
, ChooseWeb application
- Choose a name for your web client
- In Authorized JavaScript origins, add a URI and enter
http://localhost:3000
- In
Authorized redirect URIs
enterhttp://localhost:3000/api/auth/callback/google
- Click
Create
. - A popup will show up with the new credentials, including the Client ID and secret.
- Click the
-
Update .env file:
- Copy the Client ID to
GOOGLE_CLIENT_ID
- Copy the Client secret to
GOOGLE_CLIENT_SECRET
- Copy the Client ID to
-
Update scopes
- Go to
Data Access
in the left sidebar (or click link above) - Click
Add or remove scopes
- Copy paste the below into the
Manually add scopes
box:
https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/gmail.modify https://www.googleapis.com/auth/gmail.settings.basic https://www.googleapis.com/auth/contacts
- Click
Update
- Click
Save
in the Data Access page.
- Go to
-
Add yourself as a test user
- Go to Audience
- In the
Test users
section, click+Add users
- Enter your email and press
Save
Updating .env file with LLM parameters
You need to set an LLM, but you can use a local one too:
For the LLM, you can use Anthropic, OpenAI, or Anthropic on AWS Bedrock. You can also use Ollama by setting the following enviroment variables:
OLLAMA_BASE_URL=http://localhost:11434/api
NEXT_PUBLIC_OLLAMA_MODEL=phi3
Note: If you need to access Ollama hosted locally and the application is running on Docker setup, you can use http://host.docker.internal:11434/api
as the base URL. You might also need to set OLLAMA_HOST
to 0.0.0.0
in the Ollama configuration file.
You can select the model you wish to use in the app on the /settings
page of the app.
If you are using local ollama, you can set it to be default:
DEFAULT_LLM_PROVIDER=ollama
If this is the case you must also set the ECONOMY_LLM_PROVIDER
environment variable.
Redis and Postgres
We use Postgres for the database. For Redis, you can use Upstash Redis or set up your own Redis instance.
You can run Postgres & Redis locally using docker-compose
docker-compose up -d # -d will run the services in the background
Running the app
To run the migrations:
pnpm prisma migrate dev
To run the app locally for development (slower):
pnpm run dev
Or from the project root:
turbo dev
To build and run the app locally in production mode (faster):
pnpm run build
pnpm start
Open http://localhost:3000 to view the app in your browser.
Premium
Many features are available only to premium users. To upgrade yourself, make yourself an admin in the .env
: ADMINS=hello@gmail.com
Then upgrade yourself at: http://localhost:3000/admin.
Set up push notifications via Google PubSub to handle emails in real time
Follow instructions here.
Set env var GOOGLE_PUBSUB_TOPIC_NAME
.
When creating the subscription select Push and the url should look something like: https://www.getinboxzero.com/api/google/webhook?token=TOKEN
or https://abc.ngrok-free.app/api/google/webhook?token=TOKEN
where the domain is your domain. Set GOOGLE_PUBSUB_VERIFICATION_TOKEN
in your .env
file to be the value of TOKEN
.
To run in development ngrok can be helpful:
ngrok http 3000
### or with an ngrok domain to keep your endpoint stable (set `XYZ`):
ngrok http --domain=XYZ.ngrok-free.app 3000
And then update the webhook endpoint in the Google PubSub subscriptions dashboard.
To start watching emails visit: /api/google/watch/all
Watching for email updates
Set a cron job to run these: The Google watch is necessary. Others are optional.
"crons": [
{
"path": "/api/google/watch/all",
"schedule": "0 1 * * *"
},
{
"path": "/api/resend/summary/all",
"schedule": "0 16 * * 1"
},
{
"path": "/api/reply-tracker/disable-unused-auto-draft",
"schedule": "0 3 * * *"
}
]
Here are some easy ways to run cron jobs. Upstash is a free, easy option. I could never get the Vercel vercel.json
. Open to PRs if you find a fix for that.
Contributing to the project
You can view open tasks in our GitHub Issues. Join our Discord to discuss tasks and check what's being worked on.
ARCHITECTURE.md explains the architecture of the project (LLM generated).
Server配置
{
"mcpServers": {
"mcp-server": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/metorial/mcp-container--elie222--inbox-zero--mcp-server",
"npm run start"
],
"env": {
"API_KEY": "api-key"
}
}
}
}