{"id":21656697,"url":"https://github.com/macpaw/project-echo","last_synced_at":"2025-04-11T22:12:37.742Z","repository":{"id":263795198,"uuid":"890544868","full_name":"MacPaw/project-echo","owner":"MacPaw","description":"Project Echo is macOS application that utilizes Accessibility and OpenAI API to control 3rd party applications","archived":false,"fork":false,"pushed_at":"2025-02-20T10:59:23.000Z","size":358,"stargazers_count":17,"open_issues_count":0,"forks_count":1,"subscribers_count":7,"default_branch":"develop","last_synced_at":"2025-04-11T22:12:29.996Z","etag":null,"topics":["assistant","echo","macos","trd"],"latest_commit_sha":null,"homepage":"","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/MacPaw.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}},"created_at":"2024-11-18T18:53:19.000Z","updated_at":"2025-03-19T11:57:30.000Z","dependencies_parsed_at":"2024-11-20T12:00:27.365Z","dependency_job_id":null,"html_url":"https://github.com/MacPaw/project-echo","commit_stats":null,"previous_names":["macpaw/project-echo"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MacPaw%2Fproject-echo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MacPaw%2Fproject-echo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MacPaw%2Fproject-echo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MacPaw%2Fproject-echo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MacPaw","download_url":"https://codeload.github.com/MacPaw/project-echo/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248487683,"owners_count":21112190,"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":["assistant","echo","macos","trd"],"created_at":"2024-11-25T09:16:18.852Z","updated_at":"2025-04-11T22:12:37.697Z","avatar_url":"https://github.com/MacPaw.png","language":"Swift","readme":"# Echo\n\n![EchoIcon-256](https://github.com/user-attachments/assets/5ce1e09e-8413-48cb-a626-99b45dd18717)\n\n**Echo** is a macOS application that demonstrates how to interact with macOS applications using Accessibility and [OpenAI](https://openai.com) APIs. It allows users to send prompts to the frontmost application and receive responses, showcasing a functional chat-like interface.\n\n\u003cimg width=\"1800\" alt=\"Screenshot 2024-11-18 at 2 58 45 PM\" src=\"https://github.com/user-attachments/assets/b7d2a457-d4c6-430b-8fae-c3364ea4c7af\"\u003e\n\n## Features\n\n- **Real-Time Frontmost Application Detection**: Automatically detects the currently active macOS application.\n- **User Prompts**: Send prompts to interact with text area of the detected application.\n- **Chat View Interface**: Displays interactions in a chat-like interface\n\n\u003e [!WARNING]  \n\u003e Project Echo is an experimental prototype that demonstrates an approach, use in on your own risk\n\n## Requirements\n\n- macOS 14.0 or later\n- Xcode 15.0 or later\n\n## Installation\n\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/username/Echo.git\n   cd Echo\n   ```\n\n2. Open the project in Xcode:\n   ```bash\n   open Echo.xcodeproj\n   ```\n\n3. Build and run the project:\n   - Select your target device (Mac).\n   - Press **Cmd + R** or click the Run button in Xcode.\n\n## Usage\n\n1. Launch **Echo** on macOS.\n2. Activate/launch 3rd party application\n3. Type your prompt into the text field\n4. Click the **Send** button to interact with the frontmost application.\n5. View the response in the chat interface.\n\nNote: You should add OpenAI API key to environment variables.\n\u003cimg width=\"945\" alt=\"Screenshot 2024-11-18 at 2 43 48 PM\" src=\"https://github.com/user-attachments/assets/ab34b050-2401-4ce1-be4c-3452470d95fa\"\u003e\n\n## Code Overview\n\n### Key Components\n\n- **`ViewController`**: \n  - Manages the main app logic, including UI setup, handling user prompts, and interacting with applications.\n  \n- **`MessagesStore`**: \n  - Stores and manages messages displayed in the chat interface.\n\n- **`Agent`**: \n  - Processes user prompts and generates responses based on the content of the frontmost application.\n\n- **`FrontmostApplication`**: \n  - Observes and detects the currently active macOS application.\n\n- **`AccessbilableApplication`**: \n  - Provides Accessibility API integration to fetch and update content in the frontmost application.\n\n### View Hierarchy\n\n- **Chat Interface**:\n  - Built using `SwiftUI` and embedded into `NSViewController` via `NSHostingController`.\n\n## Accessibility Permissions\n\nThis app requires and asks automatically macOS Accessibility permissions to function correctly. Follow these steps to grant permissions:\n\n1. Open **System Preferences** \u003e **Privacy \u0026 Security** \u003e **Accessibility**.\n2. Click the lock to make changes and authenticate.\n3. Add **Echo** to the list of allowed applications.\n\n## Example Screenshots\n\n### Xcode\n![xcode](https://github.com/user-attachments/assets/79fc4d19-fb7a-47d5-b0fd-885f720471ad)\n\n### Safari\n![safari](https://github.com/user-attachments/assets/34cc2da5-f30c-4087-ad2f-4fb97b4f2af2)\n\n### TextMate\n![textmate](https://github.com/user-attachments/assets/76270d69-1104-42ff-8b4b-4aeb2a17de3c)\n\n## Demo Video\n\n[![Youtube Demo Video](https://img.youtube.com/vi/RmiFfuKhAJQ/0.jpg)](https://www.youtube.com/watch?v=RmiFfuKhAJQ)\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n\n## Author\n\nCreated by [MacPaw Research](https://research.macpaw.com)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmacpaw%2Fproject-echo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmacpaw%2Fproject-echo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmacpaw%2Fproject-echo/lists"}