Free download link for Trae used in this article: www.trae.ai
Preface An efficient clipboard tool can significantly boost daily work efficiency, especially for those engaged in writing and coding. If you need to frequently copy common text or code templates from notes or code files to another place, it’s both cumbersome and time — consuming. In the Windows system, the built — in clipboard management tool allows you to conveniently store all copied content in one place. You just need to select the content you want to paste when needed, which is highly efficient and convenient. However, when I switched to the Mac system, I found that its built — in clipboard tool was completely different from that of Windows, and good third — party clipboard tools required payment. So I wondered, since I know nothing about Swift, can I use an AI IDE to develop a Mac clipboard management tool that meets my needs without writing any code? Eventually, I decided to try using Trae to achieve this goal. The result really surprised me. As a complete novice with zero knowledge of Swift, I was able to easily develop a practical Mac application without writing any code. This article will provide a detailed introduction to the entire process of using Trae to develop a Mac clipboard management tool without writing any code. Are you ready? Grab a cup of your favorite coffee or tea and explore this process with me in this article.
Trae Trae (/treɪ/) is a brand — new intelligent collaborative AI Integrated Development Environment (IDE) that is deeply integrated with AI. It offers intelligent Q&A, automatic code completion, and Agent — based AI automatic programming capabilities. When developing projects with Trae, you can collaborate flexibly with AI to enhance development efficiency.
Comprehensive IDE Features Trae provides traditional IDE functions, including code writing, project management, plugin management, source code management, etc.
Powerful AI Assistant
Intelligent Q&A While writing code, you can have a conversation with the AI assistant at any time to get help such as code explanations, code comments, and error fixes.
Real — time Code Suggestions The AI assistant can understand the current code and provide real — time code suggestions in the editor, thus improving programming efficiency.
Code Snippet Generation Describe your requirements in natural language, and the AI assistant will generate corresponding code snippets. It can even write project — level or cross — file code.
Developing Projects from Scratch Use the Builder mode to tell the AI assistant what program you want to develop. The AI assistant will provide relevant code or automatically create the required files based on your description.
Installing Trae Visit the Trae homepage to download and install the Trae application.
Install XCode Xcode is the integrated development environment (IDE) officially provided by Apple. Almost all macOS application development uses Xcode.
Features It includes code editing, interface design (Interface Builder), debugging tools, performance analysis, version control, etc.
Language Support — Swift: A modern programming language recommended by Apple, which is concise and efficient. — Objective — C: An older programming language for Apple development. Many legacy projects still use Objective — C.
Download Address You can download Xcode for free from the App Store.
Development of the Clipboard Management Tool
Create an Xcode Project Click “Create New Project…”.
Select “macOS — App”.
Enter the “Project Name” and “Organization Identifier”, and then click “Next”.
Select the directory where you want to store the project, and then complete the project creation.
The First Version of the Project Send the requirements of the application to Trae AI in text form and let it develop the clipboard management tool application. Open the Xcode project you just created.
Select the Builder mode and send the text requirements to let Trae AI generate the code. I’m using the Xcode tool to manage the project and aim to implement a clipboard history tool for the Mac system. Users can open the clipboard history panel by pressing the ⇧Shift + ⌘Cmd + V
shortcut keys. The panel is located at the bottom of the screen, and its length is approximately one — third of the system interface. The panel displays the recently copied content. Users can double — click an item to copy it to the clipboard, and the panel will automatically close. There is no main interface, making it lightweight and efficient.
Trae AI will create appropriate files for us based on the current project and populate them with code. Click “Accept All” to save all the changed content.
Bug Fixing When running the Swift program through the Xcode IDE, I found that there were many bugs in the generated code. Fortunately, Trae AI can help solve these bugs. Here are some bug — fixing cases. By sending pictures, I’ll let Trae AI gradually help me solve all the bugs.
After fixing all the bugs, the program can finally run. Here is the screenshot of the running effect.
Requirement Correction From the screenshot of the running effect, we can see that the application generated by Trae AI deviates from my expectations. The clipboard can only be displayed within the “ClipHistory” panel, while I expected it to be displayed at the system level. This discrepancy might be due to my unclear description before. So, I put forward the requirements to it again:
After a series of modifications and optimizations, the clipboard has been configured as a system — level floating window. Below is the image showing the optimized result:
Position Optimization Although the clipboard has been set as a system — level floating window, its position doesn’t meet my expectations. I want the panel to be located at the bottom of the screen. So, I need to put forward the optimization requirements again:
After the optimization, the clipboard is now positioned at the very bottom of the screen.
Card — style Display and Horizontal Arrangement Judging from the current effect screenshot, the content saved in the clipboard is arranged vertically from top to bottom, which is not the effect I like. So, I propose another optimization request to Trae AI:
After a series of adjustments and optimizations, such as adjusting the card height, marking the content types, and achieving multi — screen compatibility, the final effect is shown in the following image:
So far, the clipboard management tool is basically usable. However, some minor features can still be added, such as the functions to support deleting entries and quitting the application.
Deleting Entries Next, submit the requirement for improvement to Trae AI again, asking it to support the function of deleting entries.
The adjusted effect is shown in the following image:
Exit Application Function Currently, the clipboard management tool is an application without a main window, and its icon is displayed in the top menu bar.
However, clicking on this icon currently doesn’t trigger any actions. So, I want to add a function that allows users to exit the application by clicking the menu bar icon. Therefore, I’ll make this new — feature request to Trae AI one last time:
The adjusted effect is shown in the following image:
Up to this point, the development of a basic clipboard management tool application is completed.
Summary Through multiple rounds of conversations with Trae AI, the development of the Mac clipboard management tool is finally completed. In the future, I can continue to interact with Trae AI to further improve the application, such as adding a search function and item categorization features. As can be seen from this case, Trae AI is extremely powerful, especially its Builder function. With this function, I, a novice with zero knowledge of Swift, was able to successfully develop a Mac clipboard management tool from scratch just by providing simple text descriptions. Trae AI simplifies the development process and significantly lowers the development threshold, enabling people without programming experience to quickly get started.
Top comments (0)