{"id":25019081,"url":"https://github.com/perbu/calvin","last_synced_at":"2025-04-28T12:43:22.552Z","repository":{"id":275028421,"uuid":"924844372","full_name":"perbu/calvin","owner":"perbu","description":"Quickly peek at a colleges calendar","archived":false,"fork":false,"pushed_at":"2025-02-10T13:33:19.000Z","size":50,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-10T14:31:47.944Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/perbu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-30T18:47:28.000Z","updated_at":"2025-02-10T13:33:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"9f7836be-4497-4488-97f2-2b2071d765a7","html_url":"https://github.com/perbu/calvin","commit_stats":null,"previous_names":["perbu/calvin"],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perbu%2Fcalvin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perbu%2Fcalvin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perbu%2Fcalvin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perbu%2Fcalvin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/perbu","download_url":"https://codeload.github.com/perbu/calvin/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246301965,"owners_count":20755512,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-02-05T11:38:47.398Z","updated_at":"2025-04-28T12:43:22.545Z","avatar_url":"https://github.com/perbu.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Calvin - Google Calendar CLI\nCalvin is a command-line tool designed for quickly checking Google Calendar events. It provides a fast and efficient way to peek at your colleagues' or your own calendar—directly from your terminal—without opening a web browser.\n\n## Features\n\n- **Quick calendar checks:** Retrieve and display events for a specified user and date in a readable format.\n- **Flexible date input:** Supports relative dates like `today`, `tomorrow`, and `next \u003cweekday\u003e`, as well as specific dates in `YYYY-MM-DD` format.\n- **User-friendly output:** Presents event summaries, times, and attendees in a clear, color-coded terminal display.\n- **Default domain configuration:** Allows you to simply type a username instead of a full email address.\n- **Secure access:** Uses Google OAuth 2.0 for accessing Google Calendar.\n- **Timezone awareness:** Displays event times in the calendar's timezone or, optionally, in your local timezone.\n\n## Usage\n\nThe basic syntax for using Calvin is:\n\n```bash\ncalvin [flags] \u003cusername\u003e [date]\n```\n\n- `\u003cusername\u003e`: The username or email address of the calendar to view. If only a username is provided, Calvin will append the `default_domain` from your configuration. You can provide a default username that will be used if you omit the username.\n- `\u003cdate\u003e` (optional): The date for which to retrieve events. Acceptable formats include:\n  - **(Omitted):** Show events for today.\n  - **`tomorrow`:** Show events for tomorrow.\n  - **`next \u003cweekday\u003e`:** Show events for the next occurrence of the specified weekday (e.g., `next monday`).\n  - **`week`:** Show events for the current week (Monday through Sunday).\n  - **`next week`:** Show events for the next week (next Monday through Sunday).\n  - **`YYYY-MM-DD`:** Show events for a specific date in ISO 8601 format (e.g., `2025-12-25`).\n\n### Flags\n\n- `--local`: Use your local timezone for displaying event times instead of the calendar's timezone.\n\n## Examples\n\n### 1. Check today's events for `bob.smith` (using default domain):\n\n```bash\ncalvin bob.smith\n```\n\n*Expected output:*\n\n```\nListing events for 2025-01-30 (bob.smith@example.com) [tz: Europe/Oslo]...\n- Storage #1 talk       [13:00 --\u003e 13:30]  [john.doe, ...]\n- Storage #2 doc review  [14:30 --\u003e 15:30]  [jane.doe]\n- Company Update January [17:00 --\u003e 18:00]  []\n```\n\n### 2. Check tomorrow's events for `jane.doe`:\n\n```bash\ncalvin jane.doe tomorrow\n```\n\n### 3. Check events for `john.doe` next monday:\n\n```bash\ncalvin john.doe next monday\n```\n\n### 4. Check events for `carol@example.net` on a specific date (2025-12-25):\n\n```bash\ncalvin carol@example.net 2025-12-25\n```\n\n### 5. Check today's events for `bob.smith` using your local timezone:\n\n```bash\ncalvin --local bob.smith\n```\n\n*Expected output:*\n\n```\nUsing local timezone: Local\nListing events for 2025-01-30 (bob.smith@example.com) [tz: Europe/Oslo]...\n- Storage #1 talk       [13:00 --\u003e 13:30]  [john.doe, ...]\n- Storage #2 doc review  [14:30 --\u003e 15:30]  [jane.doe]\n- Company Update January [17:00 --\u003e 18:00]  []\n```\n\n### 6. Check events for the current week for `alice.smith`:\n\n```bash\ncalvin alice.smith week\n```\n\n*Expected output:*\n\n```\nListing events for the week of 2025-01-27 to 2025-02-02\n--------------------------------------------------\nListing events for 2025-01-27 (alice.smith@example.com) [tz: Europe/Oslo]...\n- Weekly Planning      [09:00 --\u003e 10:00]  [team, ...]\n- Project Review       [14:00 --\u003e 15:00]  [manager]\n--------------------------------------------------\nListing events for 2025-01-28 (alice.smith@example.com) [tz: Europe/Oslo]...\n- Team Standup         [09:30 --\u003e 10:00]  [team, ...]\n- Client Meeting       [13:00 --\u003e 14:00]  [client, ...]\n--------------------------------------------------\n...\n```\n\n### 7. Check events for next week for `dave.jones`:\n\n```bash\ncalvin dave.jones next week\n```\n\n## Installation\n\n### Prerequisites\n\n- **Go:** Version 1.20 or higher is required. Download it from [https://go.dev/dl/](https://go.dev/dl/).\n\n### Install Calvin\n\nRun the following command to install Calvin:\n\n```bash\ngo install github.com/perbu/calvin@latest\n```\n\nThis command downloads and installs the `calvin` executable into your `$GOPATH/bin` directory. Make sure that `$GOPATH/bin` is in your system's PATH so you can run Calvin from anywhere.\n\n## Configuration\n\nTo use Calvin, you must configure access to the Google Calendar API and set up a configuration file.\n\n### 1. Create OAuth Credentials\n\nCalvin uses Google's OAuth 2.0 for secure access. Follow these steps to create the necessary credentials:\n\n1. **Go to the [Google Cloud Console](https://console.cloud.google.com/).**  \n   - If you don't have a project, create one.\n2. **Enable the Google Calendar API:**  \n   - Navigate to **APIs \u0026 Services → Enabled APIs \u0026 Services**.\n   - Click **+ ENABLE APIS AND SERVICES**.\n   - Search for **Google Calendar API** and enable it.\n3. **Create OAuth 2.0 credentials:**  \n   - In the left-hand menu, click **APIs \u0026 Services → Credentials**.\n   - Click **+ CREATE CREDENTIALS** and choose **OAuth client ID**.\n   - If prompted, configure the consent screen:\n     - Click **CONFIGURE CONSENT SCREEN**.\n     - Choose **External** (or **Internal** if using a Google Workspace account).\n     - Fill in the required fields (App name, User support email, Developer contact info). Minimal information is sufficient for personal use.\n     - Click **SAVE AND CONTINUE** (bypassing optional steps) and return to the dashboard.\n   - Click **+ CREATE CREDENTIALS → OAuth client ID** again.\n   - Select **Desktop application** as the Application type.\n   - Name it (e.g., \"Calvin CLI\") and click **CREATE**.\n   - Click **DOWNLOAD JSON** to save your credentials as `credentials.json`.\n4. **Place the `credentials.json` file:**  \n   - Create a directory named `.calvin` in your home directory:\n\n     ```bash\n     mkdir ~/.calvin\n     ```\n\n   - Move the downloaded `credentials.json` file into the `~/.calvin` directory.\n\n### 2. Create a Config File\n\nCreate a `config.json` file in the `~/.calvin` directory to set your default configurations:\n\n1. Open (or create) the file with your preferred editor:\n\n    ```bash\n    nano ~/.calvin/config.json\n    ```\n\n2. Paste the following JSON content into the file and save it:\n\n    ```json\n    {\n      \"default_domain\": \"example.com\",\n      \"default_username\": \"bob.smith\"\n    }\n    ```\n\n- **`default_domain`** (optional): Set this to your organization's domain. This lets you simply use a username (e.g., `calvin bob.smith`) instead of a full email address. If you work with multiple domains, you can leave this blank and always specify full email addresses.\n\n### Running Calvin for the First Time\n\nWhen you run Calvin for the first time, it will launch a browser window to authenticate with Google. Follow the on-screen instructions to grant Calvin permission to access your Google Calendar. Once authenticated, Calvin saves a token for future use so that you won’t need to log in every time.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperbu%2Fcalvin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fperbu%2Fcalvin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperbu%2Fcalvin/lists"}