Like many of us these days, I use ChatGPT to streamline various productivity workflows. This week, I set out to integrate Tinderbox with ChatGPT to enhance my note-taking and thought organization.
Below is a simple yet flexible integration that requires minimal command-line (or Terminal) knowledge. No API sign-ups or subscriptions are needed—this works with the free version of ChatGPT. However, you do need to have the ChatGPT macOS app installed and set up.
Setup Steps
Install the Shortcut. First, install this Shortcut, which allows Tinderbox to send input and receive output from the macOS ChatGPT app. Here’s a screenshot if you would like to create it yourself. (Note: The name of the shortcut needs to match the Shortuct name specified in the following step, which is ChatGPT.)
Add Functions to Tinderbox’s “Library”. Next, add the following two functions to a note in your Tinderbox “Library” located in /Hints/Library:
//
// Runs the "shortcuts" command with the specified
// shortcut name and input in data.
//
function runShortcut(stdin, shortcut) {
// Construct the Shortcut command
var:string cmd = "shortcuts run \"" + shortcut + "\"";
return runCommand(cmd, stdin, getDir()).trim;
}
//
// Prompts ChatGPT with the given text.
//
function promptChatGPT(text) {
// Display a waiting message
show("⏳ Prompting ChatGPT, please wait...");
return runShortcut(text, "ChatGPT");
}
The first function, runShortcut(), allows one to run any Shortcut, while the second function promptChatGPT() calls runShortcut() to execute the ChatGPT Shortcut that was added in step 1.
Create a Stamp to Send Notes to ChatGPT. Finally, create a Stamp that runs the promptChatGPT() function, using the $Text of the selected note(s) as the prompt:
Note: This Stamp appends the ChatGPT results to the selected note(s) using the selected notes’ $Text as input, effectively simulating a “chat”.
Run the Stamp. Create a new note with a prompt as its $Text and apply the Stamp created in the previous step to it.
Use and Enjoy! . That’s it! Now, you can use this setup to quickly query ChatGPT from within Tinderbox.
Limitations and Future Enhancements
One downside to this approach is that each time you prompt ChatGPT, it starts a new chat. Unfortunately, there doesn’t seem to be a way to programmatically delete chats or mark them as temporary. If anyone finds a workaround, I’d love to hear about it!
I hope this integration proves as useful for you as it has for me. Happy Tinderboxing!
it would really be nice to see a Tinderbox-Meetup in the not so distant future covering the basics of a copilot-esque AI-integration into Tinderbox as Jacob showcased here.
*i know that @webline already came up with some AI-TBX-Wizardry; and yet … i, too, know September 21, 2024, TBX-Meetup and Michael’s ChatGPT presentation there; and yet … *
FWIW, I would be more than happy to showcase my ChatGPT integration method using Shortcuts, along with a few more advanced workflows, during a future meetup.
@JacobIO To start, yes, I am a relatively poor man, yet I work for an institution that pays for the most advanced levels of ChatGPT. Thus, I’ve had some experience learning how this new age of AI works within my professional context. But I’ve felt like someone on an lonely island here on Tinderbox during the last year or so of Claude this and MCP that (still I have no clue what those letters refer to and don’t think I need to know, yet.)
I tried to follow your instructions a week ago and failed, probably because I had too many other things on my mind at the time. Learning something new in Tinderbox, I’ve learned the hard way, requires a clear mind. So this morning, I cleared my head and tried again. Voilà, the integration with my institutional ChatGPT subscription worked like a charm. So I just thought you’d like to hear my little testimonial.
I have one side thought: I intuit that I need to load these functions and stamps for each Tinderbox document, right? That’s not an issue for me as I take a few baby steps into this brave new world of AI. I still don’t have much of a sense of how I would use AI, or why, in my Tbx work, but I was intrigued by the evening in which I watched @andreas demonstrate Claude (which I will never use, I assume because I refuse to pay a subscription for yet another app). So here on the forum, I’ll let all of these references to Claude pass me by simply because I don’t care. However, @JacobIO or anyone else, I will take the advice as I move forward to Use and Enjoy this solution. I have experimented within the ChatGPT app itself over the last year on topics related to my disciplinary focus.
So I’m learning how AI can both enhance and upend my work. I’m still wondering just what I can do or how I can use this newfound integration (Tbx and ChatGPT) to improve upon my Tinderbox knowledge and skills. Call it the poor man’s approach. Thank you @JacobIO for the work you have done on this poor man’s behalf.
The Claude Code variant of the app requires a Claude subscription. That is Claude requirement not a Tinderbox one. I’m not clear if Claude command line use is basic Claude or Claude Code.
For a user perspective, there is one Clause macOS desktop app. Features like the ‘code’ variant are hidden unless until you have a subscription to Claude’s AI.
What is less clear, from a new starters perspective is where/when a requirement for MCP to use Claude Code becomes necessary.