### Local Setup: Start Dev Server Source: https://github.com/elie222/inbox-zero/blob/main/apps/web/__tests__/e2e/flows/README.md Start the development server with the E2E configuration enabled. ```bash pnpm dev:e2e ``` -------------------------------- ### Install Dependencies and Setup Environment Source: https://github.com/elie222/inbox-zero/blob/main/README.md Install project dependencies using pnpm and run the interactive environment setup script. This is part of the local development setup. ```bash pnpm install npm run setup ``` -------------------------------- ### View Pub/Sub Setup Guide Source: https://github.com/elie222/inbox-zero/blob/main/docs/hosting/troubleshooting.mdx Refer to the Pub/Sub setup guide for detailed instructions on configuring Google Pub/Sub. ```markdown [Pub/Sub setup guide](/hosting/google-pubsub) ``` -------------------------------- ### Example Azure CLI Prompt for Setup Source: https://github.com/elie222/inbox-zero/blob/main/docs/teams/setup.mdx This example prompt demonstrates how to use Azure CLI commands to automate the setup of the Microsoft Teams integration, including creating an Entra app registration, Azure Bot resource, and configuring the Teams channel. ```text Use Azure CLI to set up the Microsoft Teams integration for Inbox Zero. Create a single-tenant Entra app registration with a client secret, create an Azure Bot resource on the F0 tier, point it at https:///api/teams/events, enable the Teams channel, and then tell me exactly which environment variables and manual Azure/Teams UI steps are left for me to complete. ``` -------------------------------- ### Install and Run Inbox Zero CLI (npm) Source: https://github.com/elie222/inbox-zero/blob/main/docs/hosting/quick-start.mdx Install the CLI globally using npm and then run the setup and start commands. This is an alternative to using npx. ```bash npm install -g @inbox-zero/cli inbox-zero setup inbox-zero start ``` -------------------------------- ### Install and Run Inbox Zero CLI (Homebrew) Source: https://github.com/elie222/inbox-zero/blob/main/docs/hosting/quick-start.mdx Install the CLI using Homebrew and then run the setup and start commands. This is an alternative to npm installation. ```bash brew install inbox-zero/inbox-zero/inbox-zero inbox-zero setup inbox-zero start ``` -------------------------------- ### Setup Environment Variables (Manual) Source: https://github.com/elie222/inbox-zero/blob/main/docs/contributing.mdx Manually copy the example environment file and edit it. Use openssl to generate secrets. ```bash cp apps/web/.env.example apps/web/.env # Generate secrets with: openssl rand -hex 32 ``` -------------------------------- ### Setup Inbox Zero from Cloned Repo Source: https://github.com/elie222/inbox-zero/blob/main/docs/hosting/self-hosting.mdx Clone the repository, install dependencies, and run the setup script. This method allows for configuration within the project structure. ```bash git clone https://github.com/elie222/inbox-zero.git cd inbox-zero npm install npm run setup ``` -------------------------------- ### Install and Authenticate Tinybird CLI Source: https://github.com/elie222/inbox-zero/blob/main/packages/tinybird/README.md Initial setup for the Tinybird CLI. This involves creating a virtual environment, installing the CLI, and authenticating your account. ```bash python3 -m venv .venv source .venv/bin/activate pip install tinybird-cli tb auth ``` -------------------------------- ### Install Node.js and Inbox Zero CLI Source: https://github.com/elie222/inbox-zero/blob/main/docs/hosting/gcp-cloudflare-tunnel.mdx Installs the Node.js LTS version and then runs the Inbox Zero setup wizard via npx. Ensure your Cloudflare Tunnel URL is ready when prompted. ```bash # Install Node.js (required for the setup CLI) curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash - sudo apt-get install -y nodejs # Run the setup wizard npx @inbox-zero/cli setup ``` -------------------------------- ### Local Setup: Run Setup Script Source: https://github.com/elie222/inbox-zero/blob/main/apps/web/__tests__/e2e/flows/README.md Run the setup script for local E2E testing with a named configuration to avoid overwriting existing .env files. ```bash npm run setup -- --name e2e ``` -------------------------------- ### Setup Inbox Zero CLI Source: https://github.com/elie222/inbox-zero/blob/main/README.md Use this command for a one-time setup wizard for self-hosting Inbox Zero via the CLI. Ensure Docker and Node.js v24+ are installed. ```bash npx @inbox-zero/cli setup ``` -------------------------------- ### Start Local Development Server Source: https://github.com/elie222/inbox-zero/blob/main/docs/contributing.mdx Starts the application for the current branch using previously saved local settings. Ensure you have initialized the environment first. ```bash pnpm dev-setup dev ``` -------------------------------- ### Build and Run Locally Source: https://github.com/elie222/inbox-zero/blob/main/docs/contributing.mdx Commands to build the project and start it locally, both with and without Docker. The Docker command includes setup for Postgres and Redis. ```bash # Without Docker pnpm build pnpm --filter inbox-zero-ai start ``` ```bash # With Docker (includes Postgres and Redis) NEXT_PUBLIC_BASE_URL=http://localhost:3000 docker compose --profile all up --build ``` -------------------------------- ### Installation Source: https://github.com/elie222/inbox-zero/blob/main/clawhub/inbox-zero-api/references/cli-reference.md Instructions on how to install the Inbox Zero API CLI tool. ```APIDOC ## Install Use one of: - `npm install -g @inbox-zero/api` - `npx @inbox-zero/api --help` The executable name is `inbox-zero-api`. ``` -------------------------------- ### Install Docker Compose Plugin Source: https://github.com/elie222/inbox-zero/blob/main/docs/hosting/ec2-deployment.mdx Download and install the Docker Compose plugin. Ensure the plugin is executable and verify the installation by checking the version. ```bash mkdir -p ~/.docker/cli-plugins curl -SL "https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)" -o ~/.docker/cli-plugins/docker-compose chmod +x ~/.docker/cli-plugins/docker-compose # Verify it works docker compose version ``` -------------------------------- ### Setup AWS with Copilot CLI Source: https://github.com/elie222/inbox-zero/blob/main/docs/hosting/aws-copilot.mdx Automates Copilot setup, addons, secrets, and deployment. Run from the cloned repo root. ```bash pnpm setup-aws ``` ```bash pnpm setup-aws -- --yes ``` -------------------------------- ### Setup Environment Variables (Interactive) Source: https://github.com/elie222/inbox-zero/blob/main/docs/contributing.mdx Run this command for an interactive CLI that guides you through setting up environment variables and auto-generates secrets. ```bash npm run setup ``` -------------------------------- ### Start Inbox Zero Containers CLI Source: https://github.com/elie222/inbox-zero/blob/main/README.md Start the Docker containers for Inbox Zero after completing the setup. Access the application at http://localhost:3000. ```bash npx @inbox-zero/cli start ``` -------------------------------- ### Install Packages Source: https://github.com/elie222/inbox-zero/blob/main/AGENTS.md Run this command before tests or builds if packages are not already installed. ```bash pnpm install ``` -------------------------------- ### Run Inbox Zero Vercel Setup CLI Source: https://github.com/elie222/inbox-zero/blob/main/docs/hosting/vercel.mdx Use this command if you have the Inbox Zero CLI installed for a streamlined Vercel setup. It automates project linking, integration provisioning, secret generation, and environment variable seeding. ```bash inbox-zero setup-vercel ``` -------------------------------- ### Start Google Emulator Source: https://github.com/elie222/inbox-zero/blob/main/README.md Start the local Google emulator using Docker Compose with the 'google-emulator' profile. This is for testing Google-related integrations locally. ```bash docker compose -f docker-compose.dev.yml --profile google-emulator up -d ``` -------------------------------- ### Quick Start Inbox Zero CLI Source: https://github.com/elie222/inbox-zero/blob/main/packages/cli/README.md Configure and start the Inbox Zero application using the CLI. Access the application at http://localhost:3000 after starting. ```bash inbox-zero setup inbox-zero start # Open http://localhost:3000 ``` -------------------------------- ### Install Docker and Docker Compose Source: https://github.com/elie222/inbox-zero/blob/main/docs/hosting/gcp-cloudflare-tunnel.mdx Installs Docker Engine and adds the current user to the docker group for non-sudo execution. Verifies installations. ```bash # Update packages sudo apt-get update && sudo apt-get upgrade -y # Install Docker Engine curl -fsSL https://get.docker.com | sudo sh # Allow your user to run docker without sudo sudo usermod -aG docker $USER newgrp docker # Verify docker --version docker compose version ``` -------------------------------- ### Local Setup: Run Database Migrations Source: https://github.com/elie222/inbox-zero/blob/main/apps/web/__tests__/e2e/flows/README.md Execute database migrations specifically for the E2E environment after setting up the project. ```bash cd apps/web pnpm prisma:migrate:e2e ``` -------------------------------- ### Deploy Service (Initial Setup) Source: https://github.com/elie222/inbox-zero/blob/main/docs/hosting/aws-copilot.mdx Deploy the main service after the environment is set up. This action provisions the Application Load Balancer (ALB) and its HTTPS listener, which are prerequisites for the webhook gateway addon. ```bash copilot svc deploy --name inbox-zero-ecs --env production ``` -------------------------------- ### Start Microsoft Emulator Source: https://github.com/elie222/inbox-zero/blob/main/README.md Start the local Microsoft emulator using Docker Compose with the 'microsoft-emulator' profile. This is for testing Microsoft-related integrations locally. ```bash docker compose -f docker-compose.dev.yml --profile microsoft-emulator up -d ``` -------------------------------- ### Start Local Development Server Source: https://github.com/elie222/inbox-zero/blob/main/README.md Start the local development server for Inbox Zero. Access the application at http://localhost:3000. ```bash pnpm dev ``` -------------------------------- ### Quick Start Commands Source: https://github.com/elie222/inbox-zero/blob/main/packages/api/README.md Basic commands to list rules and retrieve statistics by period. Ensure INBOX_ZERO_API_KEY is set in your shell. ```bash inbox-zero-api rules list ``` ```bash inbox-zero-api stats by-period --period week ``` -------------------------------- ### Update System and Install Docker on Amazon Linux 2023 Source: https://github.com/elie222/inbox-zero/blob/main/docs/hosting/ec2-deployment.mdx Run these commands to update your system's packages, install Docker and Git, start the Docker service, and add the ec2-user to the docker group. Remember to log out and back in for group changes to take effect. ```bash sudo dnf update -y sudo dnf install docker git -y sudo service docker start sudo usermod -a -G docker ec2-user # You must log out and log back in for group changes to take effect exit ``` -------------------------------- ### Automated Google Cloud Setup with CLI Source: https://github.com/elie222/inbox-zero/blob/main/docs/hosting/self-hosting.mdx Automate API enabling and Pub/Sub setup for Google Cloud using the CLI. Replace YOUR_PROJECT_ID and yourdomain.com with your actual values. This command prints environment variables for your .env file. ```bash npx @inbox-zero/cli setup-google --project-id YOUR_PROJECT_ID --domain yourdomain.com ``` -------------------------------- ### Run Telegram Bot Setup Script Source: https://github.com/elie222/inbox-zero/blob/main/docs/telegram/setup.mdx Execute the setup script to register Telegram slash commands and optionally set a bot profile photo. This should be run once after configuring environment variables. ```bash pnpm --filter inbox-zero-ai exec tsx scripts/setup-telegram-bot.ts ``` ```bash pnpm --filter inbox-zero-ai telegram:setup ``` -------------------------------- ### Start Development Docker Compose Source: https://github.com/elie222/inbox-zero/blob/main/README.md Start the Postgres and Redis containers for local development using Docker Compose. This command uses a specific development configuration file. ```bash docker compose -f docker-compose.dev.yml up -d ``` -------------------------------- ### Quick Reset (CLI) Source: https://github.com/elie222/inbox-zero/blob/main/docs/hosting/troubleshooting.mdx Re-run setup without removing Google Cloud resources when using the CLI in standalone mode. This stops services, removes volumes, deletes the environment file, and then re-runs setup. ```bash inbox-zero stop docker compose -f ~/.inbox-zero/docker-compose.yml --profile all down -v rm ~/.inbox-zero/.env inbox-zero setup ``` -------------------------------- ### Start Development Against Conductor Port Source: https://github.com/elie222/inbox-zero/blob/main/docs/contributing.mdx Starts the development server, directing it to use the port assigned by Conductor. This is useful when integrating with other services managed by Conductor. ```bash pnpm dev-setup dev --url conductor ``` -------------------------------- ### Setup Inbox Zero with Vercel Source: https://github.com/elie222/inbox-zero/blob/main/packages/cli/README.md Link a Vercel project, provision necessary services like Neon and Upstash Redis, and seed environment variables. Supports skipping existing integrations and non-interactive setup. ```bash # Interactive Vercel setup inbox-zero setup-vercel # Skip provisioning an integration you already have inbox-zero setup-vercel --skip-neon # Non-interactive setup with defaults and placeholder provider credentials inbox-zero setup-vercel --yes ``` -------------------------------- ### Install Cloudflared Daemon Source: https://github.com/elie222/inbox-zero/blob/main/docs/hosting/gcp-cloudflare-tunnel.mdx Downloads and installs the Cloudflared daemon from a specific URL, typically provided by the Cloudflare dashboard. This prepares the VM to run a Cloudflare Tunnel. ```bash # Example — copy the exact command from the Cloudflare dashboard curl -L --output cloudflared.deb https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64.deb sudo dpkg -i cloudflared.deb ``` -------------------------------- ### Start Inbox Zero Application Source: https://github.com/elie222/inbox-zero/blob/main/packages/cli/README.md Pulls the latest Docker image and starts all necessary containers for Inbox Zero, including the web app and cron job. Can be run in the background or foreground. ```bash inbox-zero start # Start in background inbox-zero start --no-detach # Start in foreground ``` -------------------------------- ### Install Inbox Zero API CLI Source: https://github.com/elie222/inbox-zero/blob/main/clawhub/inbox-zero-api/references/cli-reference.md Install the Inbox Zero API CLI globally using npm or execute commands directly with npx. The executable name is inbox-zero-api. ```bash npm install -g @inbox-zero/api ``` ```bash npx @inbox-zero-api --help ``` -------------------------------- ### Install Inbox Zero Helm Chart Source: https://github.com/elie222/inbox-zero/blob/main/charts/inbox-zero/README.md Use this command to upgrade or install the Inbox Zero Helm chart. It specifies the chart location, namespace, and a custom values file for production settings. ```bash helm upgrade --install inbox-zero ./charts/inbox-zero \ -n inbox-zero \ --create-namespace \ -f values.prod.yaml ``` -------------------------------- ### Manual Cron Job Setup for Scheduled Actions Source: https://github.com/elie222/inbox-zero/blob/main/docs/hosting/self-hosting.mdx Set up a cron job to execute scheduled actions every minute. This is necessary when QStash is not configured. Ensure you replace YOUR_CRON_SECRET with your actual cron secret. ```bash # Scheduled actions - every minute (only needed when QStash is not configured) * * * * * curl -s -X GET "https://yourdomain.com/api/cron/scheduled-actions" -H "Authorization: Bearer YOUR_CRON_SECRET" ``` -------------------------------- ### Run Prisma Migrations Source: https://github.com/elie222/inbox-zero/blob/main/README.md Apply database migrations for the web application using Prisma. This command should be run after installing dependencies and setting up the environment. ```bash cd apps/web && pnpm prisma migrate dev && cd ../.. ``` -------------------------------- ### Start Inbox Zero Application with Docker Compose Source: https://github.com/elie222/inbox-zero/blob/main/docs/hosting/gcp-cloudflare-tunnel.mdx Starts the Inbox Zero application using Docker Compose with the 'all' profile. Ensure the NEXT_PUBLIC_BASE_URL environment variable is set correctly before running. ```bash NEXT_PUBLIC_BASE_URL=https://inbox.yourdomain.com docker compose --profile all up -d ``` -------------------------------- ### Quick Reset (Cloned Repo) Source: https://github.com/elie222/inbox-zero/blob/main/docs/hosting/troubleshooting.mdx Re-run setup without removing Google Cloud resources when running Inbox Zero from a cloned repository. This stops services, removes volumes, deletes the environment file, and then re-runs setup. ```bash docker compose --profile all down -v rm apps/web/.env inbox-zero setup ``` -------------------------------- ### Clone Repository and Build Docker Image Source: https://github.com/elie222/inbox-zero/blob/main/docs/hosting/self-hosting.mdx Clone the Inbox Zero repository, install dependencies, configure environment variables, and build the Docker image. ```bash # Clone the repository git clone https://github.com/elie222/inbox-zero.git cd inbox-zero # Install dependencies and configure environment (auto-generates secrets) npm install npm run setup nano apps/web/.env # Build and start docker compose build NEXT_PUBLIC_BASE_URL=https://yourdomain.com docker compose --profile all up -d ``` -------------------------------- ### Demo Data Services Configuration Source: https://github.com/elie222/inbox-zero/blob/main/charts/inbox-zero/README.md For demo or small self-hosted installs, configure bundled Postgres, Redis, and Redis HTTP by providing explicit secret values for their passwords and tokens. ```yaml postgresql: auth: password: replace-with-random-value redis: auth: password: replace-with-random-value redisHttp: token: replace-with-random-value ``` -------------------------------- ### Build Project Source: https://github.com/elie222/inbox-zero/blob/main/AGENTS.md Execute this command to build the project for production. ```bash pnpm build ``` -------------------------------- ### Install Node.js LTS on Amazon Linux 2023 Source: https://github.com/elie222/inbox-zero/blob/main/docs/hosting/ec2-deployment.mdx Install the Node.js Long Term Support (LTS) version using NodeSource repository. This is required if you plan to use the setup CLI. ```bash curl -fsSL https://rpm.nodesource.com/setup_lts.x | sudo bash - sudo dnf install -y nodejs ``` -------------------------------- ### Initialize Local Development Environment Source: https://github.com/elie222/inbox-zero/blob/main/docs/contributing.mdx Use this command to set up the current branch for local development, including database and port configurations. ```bash pnpm dev-setup init ``` -------------------------------- ### Install Cloudflared as a Systemd Service Source: https://github.com/elie222/inbox-zero/blob/main/docs/hosting/gcp-cloudflare-tunnel.mdx Registers cloudflared as a systemd service using a provided tunnel token. This ensures the tunnel starts automatically on system boot. ```bash sudo cloudflared service install ``` -------------------------------- ### Initialize Copilot Application Source: https://github.com/elie222/inbox-zero/blob/main/docs/hosting/aws-copilot.mdx Initializes a new Copilot application with your domain. Replace with your actual domain. ```bash copilot app init inbox-zero-app --domain ``` -------------------------------- ### Install Inbox Zero with Homebrew Source: https://github.com/elie222/inbox-zero/blob/main/packages/cli/README.md Use Homebrew to install the Inbox Zero CLI on macOS and Linux systems. ```bash brew install inbox-zero/inbox-zero/inbox-zero ``` -------------------------------- ### List all rules Source: https://github.com/elie222/inbox-zero/blob/main/docs/api-reference/cli.mdx List all available rules using the CLI. Use the --json flag for machine-readable output, which is preferred for bots. ```bash inbox-zero-api rules list ``` ```bash inbox-zero-api rules list --json ``` -------------------------------- ### Initialize with Empty Database Source: https://github.com/elie222/inbox-zero/blob/main/docs/contributing.mdx Initializes the development environment with a fresh, empty database. Useful for schema changes or clean migration testing. ```bash pnpm dev-setup init --db empty ``` -------------------------------- ### E2E Test Log Output Example Source: https://github.com/elie222/inbox-zero/blob/main/apps/web/__tests__/e2e/flows/README.md Example of detailed log output from E2E tests, including a run ID and step information. ```text [E2E-abc123] Step 1: Sending email from Gmail to Outlook [E2E-abc123] Email sent { messageId: "...", threadId: "..." } [E2E-abc123] Step 2: Waiting for Outlook to receive email ``` -------------------------------- ### Run Database Migrations Source: https://github.com/elie222/inbox-zero/blob/main/docs/contributing.mdx Navigate to the web app directory and run database migrations using Prisma. Ensure you have set up your environment variables first. ```bash cd apps/web pnpm prisma migrate dev ``` -------------------------------- ### Deploy Environment with Addons Source: https://github.com/elie222/inbox-zero/blob/main/docs/hosting/aws-copilot.mdx Deploy the environment after making changes to addon configurations. ```bash copilot env deploy --name production ``` -------------------------------- ### Setup Inbox Zero with Terraform Source: https://github.com/elie222/inbox-zero/blob/main/packages/cli/README.md Generate Terraform files for AWS deployment. Supports interactive setup or non-interactive mode using flags and environment variables. ```bash # Generate Terraform files in ./terraform (interactive) inbox-zero setup-terraform # Non-interactive mode (values read from flags/env vars) inbox-zero setup-terraform --yes --region us-east-1 ``` -------------------------------- ### Authentication and Configuration Source: https://github.com/elie222/inbox-zero/blob/main/clawhub/inbox-zero-api/references/cli-reference.md Details on setting up authentication and configuration for the CLI. ```APIDOC ## Authentication and config - `INBOX_ZERO_API_KEY` is required for authenticated commands such as `rules` and `stats`. - `INBOX_ZERO_BASE_URL` is optional for self-hosted or custom deployments. - Config precedence is: flags, environment variables, `~/.inbox-zero-api/config.json`. Examples: ```bash inbox-zero-api config list inbox-zero-api config get base-url inbox-zero-api config set base-url https://your-domain.com ``` ``` -------------------------------- ### Install Inbox Zero API CLI Source: https://github.com/elie222/inbox-zero/blob/main/clawhub/inbox-zero-api/SKILL.md Install the Inbox Zero API CLI globally using npm or npx. This command is necessary before using any of the CLI's features. ```bash npm install -g @inbox-zero/api ``` ```bash npx @inbox-zero/api ``` -------------------------------- ### Slack App Manifest Configuration Source: https://github.com/elie222/inbox-zero/blob/main/docs/slack/setup.mdx This is a sample manifest.yaml file for creating a Slack app. Replace YOUR_DOMAIN with your actual domain. ```yaml display_information: name: "Inbox Zero" features: bot_user: display_name: "Inbox Zero" always_online: true app_home: home_tabs: - type: "functionality" name: "Home" callback_id: "home_view" functions: - callback_id: "send_message_function" title: "Send Message" description: "Send a message to a channel or user" input_parameters: type: "object" properties: channel: type: "string" description: "The channel to send the message to" message: type: "string" description: "The message to send" required: - "channel" - "message" # Replace YOUR_DOMAIN with your actual domain # Example: https://your-domain.com "https://YOUR_DOMAIN/api/slack/events" ``` -------------------------------- ### Start BullMQ Worker with Docker Compose Source: https://github.com/elie222/inbox-zero/blob/main/docs/hosting/self-hosting.mdx Use this command to start the BullMQ worker profile in detached mode. This runs a separate worker process that communicates with the web app. ```bash docker compose --profile queue-worker up -d ``` -------------------------------- ### Install Inbox Zero API CLI Source: https://github.com/elie222/inbox-zero/blob/main/agents/inbox-zero-api-cli.md Install the Inbox Zero API CLI globally using npm. This command makes the `inbox-zero-api` executable available in your system's PATH. ```bash npm install -g @inbox-zero/api ``` -------------------------------- ### Add and Deploy Webhook Gateway Addon Source: https://github.com/elie222/inbox-zero/blob/main/docs/hosting/aws-copilot.mdx Copy the webhook gateway template to the addons directory and then deploy the environment again to include the addon. This should be done after the service is deployed. ```bash cp copilot/templates/webhook-gateway.yml copilot/environments/addons/ copilot env deploy --name production ``` -------------------------------- ### Initialize Production Environment Source: https://github.com/elie222/inbox-zero/blob/main/docs/hosting/aws-copilot.mdx Creates a production environment for your Copilot application. This will prompt for AWS profile/region and other infrastructure options. ```bash copilot env init --name production ``` -------------------------------- ### Clone Inbox Zero Repository and Configure Environment Source: https://github.com/elie222/inbox-zero/blob/main/docs/hosting/gcp-cloudflare-tunnel.mdx Manually clones the Inbox Zero repository, copies the example environment file, and opens it for editing. Key variables like NEXT_PUBLIC_BASE_URL, Google OAuth credentials, and LLM provider details need to be set. ```bash git clone https://github.com/elie222/inbox-zero.git cd inbox-zero cp apps/web/.env.example apps/web/.env nano apps/web/.env ``` ```env # Your Cloudflare Tunnel public hostname NEXT_PUBLIC_BASE_URL=https://inbox.yourdomain.com # Google OAuth GOOGLE_CLIENT_ID=... GOOGLE_CLIENT_SECRET=... # LLM provider/model DEFAULT_LLMS=anthropic:claude-sonnet-4-5-20250929 ANTHROPIC_API_KEY=... ``` -------------------------------- ### Install and Configure Claude Code LLM Source: https://github.com/elie222/inbox-zero/blob/main/docs/hosting/llm-setup.mdx Install the Claude Code provider package and enable CLI LLMs globally. Configure the default LLM to use Claude Code. Use only on trusted self-hosted deployments. ```bash cd apps/web pnpm add ai-sdk-provider-claude-code@3.1.0 claude auth login ``` ```env CLI_LLM_ENABLED=true DEFAULT_LLMS=claude-code:sonnet ``` -------------------------------- ### Follow Application Logs in Real-time Source: https://github.com/elie222/inbox-zero/blob/main/docs/hosting/aws-copilot.mdx Follow application logs in real-time using the Copilot CLI. ```bash copilot svc logs --follow ``` -------------------------------- ### Install and Configure Codex CLI LLM Source: https://github.com/elie222/inbox-zero/blob/main/docs/hosting/llm-setup.mdx Install the Codex CLI provider package and enable CLI LLMs globally. Configure the default LLM to use Codex and set CODEX_CLI_ALLOW_NPX to false. Use only on trusted self-hosted deployments. ```bash cd apps/web pnpm add ai-sdk-provider-codex-cli@1.1.0 pnpm add -g @openai/codex codex login ``` ```env CLI_LLM_ENABLED=true DEFAULT_LLMS=codex-cli:gpt-5.3-codex CODEX_CLI_ALLOW_NPX=false ``` -------------------------------- ### Check VPS Resource Usage Source: https://github.com/elie222/inbox-zero/blob/main/docs/hosting/troubleshooting.mdx Monitor VPS resource usage with `htop` or `docker stats` to identify performance bottlenecks. ```bash htop ``` ```bash docker stats ``` -------------------------------- ### Example Gmail Search Queries for Tabs Source: https://github.com/elie222/inbox-zero/blob/main/docs/essentials/inbox-zero-tabs-extension.mdx These examples demonstrate how to construct Gmail search queries to create custom tabs for organizing emails. They utilize various Gmail search operators like 'in:inbox', 'is:unread', 'from:', 'subject:', and 'label:' to filter emails effectively. ```plaintext in:inbox is:sent -in:chats -label:replied ``` ```plaintext in:inbox label:newsletter OR from:substack.com ``` ```plaintext in:inbox subject:(receipt OR invoice OR order) ``` ```plaintext in:inbox from:@yourcompany.com ``` ```plaintext in:inbox is:important is:unread ``` -------------------------------- ### Path Aliases for Imports Source: https://github.com/elie222/inbox-zero/blob/main/AGENTS.md Use path aliases starting with `@/` for imports from the project root. ```javascript import logger from '@/utils/logger' ``` -------------------------------- ### Safe Rule Mutation Flow Source: https://github.com/elie222/inbox-zero/blob/main/clawhub/inbox-zero-api/references/cli-reference.md A step-by-step guide for safely creating, updating, and deleting rules. ```APIDOC ## Safe rule mutation flow 1. Inspect the live schema: ```bash inbox-zero-api openapi --json ``` 2. Read the current rule when editing an existing one: ```bash inbox-zero-api rules get rule_123 --json > rule.json ``` 3. Edit `rule.json` in the workspace. 4. Apply the full replacement: ```bash inbox-zero-api rules update rule_123 --file rule.json --json ``` Create from a file: ```bash inbox-zero-api rules create --file rule.json --json ``` Create or update from stdin: ```bash cat rule.json | inbox-zero-api rules create --file - --json cat rule.json | inbox-zero-api rules update rule_123 --file - --json ``` Delete a rule: ```bash inbox-zero-api rules delete rule_123 ``` ``` -------------------------------- ### Configure QStash for Background Jobs Source: https://github.com/elie222/inbox-zero/blob/main/docs/hosting/self-hosting.mdx Set the QUEUE_BACKEND to 'qstash' and provide your QStash credentials in the .env file. This enables managed queues and is recommended when using Upstash. ```bash QUEUE_BACKEND=qstash QSTASH_TOKEN=your-qstash-token QSTASH_CURRENT_SIGNING_KEY=your-signing-key QSTASH_NEXT_SIGNING_KEY=your-next-signing-key ```