Command nodes help you get one or more tasks done in Tana. You can create your own command nodes with multiple commands, or steps, within them. For example, build a “Process voice memo” command node that grabs the voice recording, transcribes it, creates and tags tasks and ideas that it finds, and sends it all to your daily notes.
Command nodes can be run via the command line, as buttons on a supertag, or via node events.
Command nodes are easier to understand if you're already comfortable with using the command line and the search query.
There are three essential elements to creating custom commands: the command node that is a container for the command, the commands that represent the actions you want to do, and the parameters that are the settings for the commands
To create a custom command node, run Cmd/Ctrl+K > Convert to command node on an empty node.
To configure what the command node does, add commands as child nodes to it. To get a list of all available commands you can add, use @.
Each command can receive certain parameters (represented as system fields), listed in the description. The ones that are starred are required. Add the necessary parameter fields to the command (hit > to create a field, then the name of the parameter), and fill it with the necessary field value.
If there are multiple commands in the command node, they are executed in the order that they're listed from the top.
You cannot add the same command twice. To repeat a command, wrap it in another command node and add that to the list.
Command nodes appear as buttons attached to nodes, supertag instances, or fields. They also appear in the command line.
You can control when/where a command appears by using node filter and node context parameters on the main command node.
You can find all commands in your workspaces by writing the keyword operator IS COMMAND in the search node.
To configure the command node, select the commands you want using @. This gives you a filtered list of all available commands, including Tana commands, AI commands and custom commands you've defined previously.
Tana commands include:
Set field value tells the system to do the _action_ of setting a field underneath your node—same way we do it ourselves—and then, optionally, filling that field with a specific value.
Insert a cloned copy of a node tells the system to do the action of copying another node (that you specify inside the command) and bringing a clone of that node into the context in which you're working.
Add tag adds a tag to your node, and Remove tag takes one away.
Each command has a set of parameters you use to configure it. To add a parameter to a command, add any of the listed parameters as a field under the command. Parameters with a star are required.
Using the example of the Move node command, you'll find these settings:
Target node: Let's you instruct the action where to send the moved node.
Remove reference after moving node: Let's you decide whether you want there to be a reference to your moved node at the current location, or not.
Node filter/Node context: These settings are available on all commands and let you specify which nodes will run your command, in various ways.
Using the Move node-command and these settings, you could, for instance, make a command that
Sends a node to your team workspace and
Removes the reference from your workspace
Combining this with Add tag and Set field values, you could
create a new #project (Add tag)
assign it to your teammate Brage (Set field value)
set status to Active (Set field value) and
send it to your shared workspace Viral Content (Move node)
Once you've configured your command node, it will appear in the command line (Cmd/Ctrl+K) as another command you can access alongside the default commands.
Once you've configured your command node, you can use it to make buttons appear in any node. With your caret on target node, go to the command line Cmd/Ctrl+K > Configure node to open the node configuration. Add your command node in the Commands field.
You can also add a command node to a supertag or field, see the Advanced section of the supertag/field configuration panel. The command will appear alongside the tagged node or field.
You can find all commands in your workspaces by creating a search node and using the keyword operator IS COMMAND. Scope it down to a workspace to only find commands from there.
Takes the same information that is stored as a custom view on a node - can be used to configure which columns are shown, sorting, filtering, grouping etc.
Let's you run a command on the children based on what currently is in view. It respects the current search query (which may not be saved) and filtering of results.
Description: References to other fields on the same node. If any of these fields are empty, and have AI turned on, then their AI prompts will be run before evaluating this command.
Description: Write out the commands you want to run.
If you're uncertain about how a command is written out, navigate to it through the command line, create a custom shortcut, and go to Settings > Private keyboard shortcuts to the shortcut you just made and expand it. You'll find the command written out in a node.
Description: Either a date, or use Lookup field to reference a field. If reference date is May 1, and relative date is in two weeks, the output will be May 15th.
Description: Allows you to specify the granularity of the date object. Use the dropdown to set year, month, week, day, hour, minute, second, or millisecond.
ImprovedYou can now use Draft panel as the Target node all command nodes that support Target node (press space to choose), which will open an ephemeral panel to the right with the output, with the option to move or insert in daily node ()
FixedFixed bug where Transcribe Youtube video command didn't recognize certain valid Youtube URLs ()
Why are my prompt variables not getting replaced with the actual values?
Nov 26, 2024
In the command line, Set [field] -> [value] doesn't show all my fields, why?
Sep 26, 2024
How do I share a supertag from my private workspace to a shared one?
Sep 26, 2024
Can a command move the current node to a field of a new node?
Sep 26, 2024
Examples
A keyboard shortcut to invoke a set of commands
Nov 21, 2024
🙏 Thanks to Chuck for surfacing this excellent tip for all keyboard users out there doing incremental/bullet journaling and who find that command buttons just aren't their thing! For more stuff like this, join our community to share and learn about all things Tana 🫶
For this example, we're going to build one command that brings up a set of commands for a bullet journaling practice. People who practice bullet journalling (or BuJo) usually decide on a list of keys or "signifiers": bullet symbols that mean different things to the writer. Here's an example of things that might be in this list:
In Tana, we can assume each item in the list is a separate supertag.
Decide on a prefix for your commands. In this example, we'll use "Bujo:".
For each of the signifiers
Create a new command called Bujo: [signifier]
Add the command Add tag, and insert the supertag definition to the parameter
Create a keyboard shortcut: Run Create keyboard shortcut in the command line, then record the shortcut you want to use. In this case, we're using Cmd/Ctrl+Shift+P. In the parameter Commands, write the words Bujo:.
🙏 Thanks to many community members but especially Ready and Navigator Dee for surfacing this tip in a recent conversation! For more stuff like this, join our community to share and learn about all things Tana 🫶
To move all nodes to a single place when they get tagged. This is useful if you want nodes of a certain type to live in a place that makes sense for breadcrumb navigation.
In the parameter Move node target, pick the Library from the dropdown. There are other locations to choose from as well, and you can insert a reference to any node you want as the target
Add parameter Remove references after moving node and give it your desired setting. Most would want it unchecked so it leaves a reference of the node in the original location
Add parameter Move original node and check it. This ensures that even when you use the Add tag action on a reference, it moves the original node to the desired location and not the reference (which won't achieve the goal of this command)
Add the command to the config of the supertag in question. Go to AI and Commands > On added, and add a reference to the command here.
Community member Jérémie asked: "I created a new supertag called #feedback to collect feedback from my team. They can easily add a comment and add the supertag. Is there a way to receive a notification when the tag has been added?"
Great question! Below was the solution that worked 👇 For more stuff like this, join our community to share and learn about all things Tana 🫶
In the parameter Commands, write Notify @[your tana account email]. Example: Notify @fei@tana.inc
Go to the supertag config you want to be notified on, to the section Trigger commands on events, and add a reference to the command to the On added section:
One command to toggle the related content section on/off
Nov 12, 2024
🙏 Thanks to Navigator Theo for sharing how to implement this "focus mode" idea on Related content sections! For more stuff like this, join our community to share and learn about all things Tana 🫶
To configure the related content sections you want to toggle the visibility on, each section will need a node filter where the checked state of the is visible field determines whether they show up or not:
Navigate to the Related content section in the configuration:
For supertags, Cmd/Ctrl+Shift click on the tag itself
For nodes, run the command Configure node
For every related content section
Run the command Add contextual content on the related content nodes, and add >Node filter:: >is visible:: true (checked)
You want to build one command that toggles the state of something, like a checkbox. The key that unlocks this is the obscure Run commands in parallel command, and this is an excellent use for it. The uses for a toggle are endless; this example will demonstrate how to build a visibility switch for command buttons.
Let's call it the single-command toggle.
Note: This is more like a proto-command, something that isn't useful on its own, but unlocks many creative uses.
To configure the commands you want to toggle the visibility on, each command will need a node filter where the checked state of the is visible field determines whether they show up or not:
Create or find a node that has many command buttons you want to hide
For every command, add the >Node filter:: >is visible:: true (checked)
As you do this, the buttons should, one by one, disappear from the node.
There is a command called Set view definition. It can set the Group, Sort and Display settings of a node view.
There is no good UX for this at the moment, so the instructions are not conventional nor friendly for beginners. But right now, this is one way of doing it:
Mock up a node that will have sample child nodes representing the data you'll be applying this command on
Then, create the exact view settings you want with Group, Sort and Display.
Go Cmd/Ctrl+K > Debug Node on the parent node and look at Views for node:
Clone the fields over to the command node so it looks like this:
When you run this command on a node, this should change the view settings according to your configuration.
How can I add supertags on things that I send from Tana Capture?
Sep 26, 2024
While it isn't possible to tag things when you're sending things from Tana Capture, you can have Tana do some post-processing magic to convert written-out tags to real tags once they arrive the Inbox—no AI needed!
This method uses a simple Tana Paste command that you can run on the Inbox node, which targets all new children that have "#" in them.
Once you've created the command, you must add it to the On child added section of the Inbox node. You can find it by running the command Debug node on the title of the Inbox.
"All it does is paste the nodes that have # in them and that are not tagged, using Tana Paste.
Say we add this through Tana Capture:
buy milk #todo
The command will paste that exact text back in with Tana Paste, where ${name} is buy milk #todo and ${sys:content} are any child notes that are present. Using Tana Paste, #todo will be added as a tag.
Note: this creates a new node, so the created date will change, meaning you’ll lose the time that the node was captured through Tana Capture."