{"id":50275385,"url":"https://github.com/sliday/caip","last_synced_at":"2026-05-27T20:00:55.455Z","repository":{"id":360712063,"uuid":"1251379504","full_name":"sliday/caip","owner":"sliday","description":"copy → AI → paste. Tiny native macOS menubar app.","archived":false,"fork":false,"pushed_at":"2026-05-27T14:18:47.000Z","size":850,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-27T16:12:55.503Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://caip.dev","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sliday.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-27T14:17:10.000Z","updated_at":"2026-05-27T14:20:16.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/sliday/caip","commit_stats":null,"previous_names":["sliday/caip"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/sliday/caip","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sliday%2Fcaip","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sliday%2Fcaip/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sliday%2Fcaip/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sliday%2Fcaip/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sliday","download_url":"https://codeload.github.com/sliday/caip/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sliday%2Fcaip/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33581559,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-27T02:00:06.184Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":"2026-05-27T20:00:51.259Z","updated_at":"2026-05-27T20:00:55.446Z","avatar_url":"https://github.com/sliday.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"docs/icon.png\" width=\"128\" alt=\"caip\"/\u003e\n  \u003ch1\u003ecaip\u003c/h1\u003e\n  \u003cp\u003e\u003cstrong\u003ec\u003c/strong\u003eopy → \u003cstrong\u003eAI\u003c/strong\u003e → \u003cstrong\u003ep\u003c/strong\u003easte\u003c/p\u003e\n  \u003cp\u003eTiny native macOS menubar app. Select any text, press a hotkey, get AI-rewritten text pasted in place.\u003c/p\u003e\n  \u003cp\u003e\n    \u003ca href=\"https://caip.dev\"\u003ecaip.dev\u003c/a\u003e\n    ·\n    \u003ca href=\"https://openrouter.ai/keys\"\u003eOpenRouter\u003c/a\u003e\n    ·\n    \u003ca href=\"#install\"\u003eInstall\u003c/a\u003e\n    ·\n    \u003ca href=\"#how-it-works\"\u003eHow it works\u003c/a\u003e\n  \u003c/p\u003e\n\u003c/div\u003e\n\n---\n\n## Features\n\n- **Menubar only.** No Dock icon, no Electron. Sits in the menubar (`✦`) and gets out of the way.\n- **Per-action hotkeys.** Multiple presets, each with its own prompt and global shortcut. ⌃⌥⇧⌘ in any combination, plus standalone F-keys.\n- **OpenRouter under the hood.** Bring your key. 350+ models. Pick one default; sort by price, context, or recency.\n- **Real native UI.** SwiftUI + AppKit. Stock controls, no custom theming.\n- **~700 KB binary.** Universal Swift build, no dependencies.\n\n## Install\n\n### From source\n\n```bash\ngit clone https://github.com/sliday/caip.git\ncd caip\nbash build.sh\nopen build/caip.app\n```\n\nRequires Swift 5.9+. Xcode Command Line Tools is enough — no full Xcode needed.\n\n\u003e Drag `build/caip.app` to `/Applications` to install permanently.\n\n### Permissions\n\ncaip needs **Accessibility** access to send ⌘C and ⌘V on your behalf. On first run, grant it in System Settings → Privacy \u0026 Security → Accessibility.\n\nFor ad-hoc builds (no Developer ID), each rebuild creates a fresh code identity. If permission seems granted but caip still complains, use **Settings → OpenRouter → ⋯ → Reset \u0026 re-grant**.\n\n## How it works\n\n1. You select text in any app.\n2. You press the hotkey you bound to an action.\n3. caip simulates **⌘C**, reads the pasteboard, substitutes `{selectedText}` into your prompt.\n4. caip POSTs to `https://openrouter.ai/api/v1/chat/completions`.\n5. caip writes the response to the pasteboard and simulates **⌘V**.\n6. caip restores your previous clipboard.\n\nThe whole roundtrip is typically under a second with a fast model.\n\n## Setup\n\n1. Click the `✦` in the menubar → **Settings…**\n2. **OpenRouter** tab → paste your API key (from [openrouter.ai/keys](https://openrouter.ai/keys)).\n3. Pick a default model. Search and sort to find one with the right price/context tradeoff.\n4. **Actions** tab → **+ Add Action** → give it a name, write a prompt, record a shortcut.\n\n### Prompt placeholders\n\nIn an action's prompt, `{selectedText}` (or `{s}`) is replaced with the selected text before the request fires.\n\n```\nFix grammar in [TEXT]. Output corrected text only. No commentary.\n\n[TEXT]:\n```{selectedText}```\n```\n\n## Build\n\n```bash\nbash build.sh\n```\n\nOutputs `build/caip.app`. The script:\n- runs `swift build -c release`,\n- copies the binary into a proper `.app` bundle,\n- bundles `AppIcon.icns` and `Info.plist` (`LSUIElement=true`),\n- ad-hoc code-signs with stable identifier `net.variant.caip`.\n\n### Regenerating the icon\n\n```bash\npython3 scripts/make_icon.py\niconutil -c icns build/AppIcon.iconset -o build/AppIcon.icns\n```\n\n## File layout\n\n```\nSources/caip/\n├── App.swift            – @main, AppDelegate adaptor\n├── AppDelegate.swift    – menubar, lifecycle, permission helpers\n├── Models.swift         – Preset / Hotkey models\n├── PresetStore.swift    – JSON persistence, defaults, prefs\n├── HotkeyManager.swift  – Carbon RegisterEventHotKey\n├── HotkeyRecorder.swift – CGEvent tap recorder\n├── ActionRunner.swift   – copy → API → paste pipeline\n├── OpenRouter.swift     – REST client + model list\n├── SettingsView.swift   – SwiftUI Settings UI\n├── Toast.swift          – floating HUD notifications\n└── Provider.swift       – provider icons / colors\nResources/Info.plist     – bundle metadata\nbuild.sh                 – build + package script\nscripts/make_icon.py     – icon generator\n```\n\n## Data\n\n- **Presets:** `~/Library/Application Support/caip/presets.json`\n- **API key + default model:** `~/Library/Preferences/net.variant.caip.plist`\n\n## License\n\nMIT — see [LICENSE](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsliday%2Fcaip","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsliday%2Fcaip","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsliday%2Fcaip/lists"}