Support running a command after creating new folder
Feature Request: Run Command After Creating Folder
Currently, try creates new directories but doesn't support running initialization commands.
Proposed Feature: Add a --run flag or similar option to execute a command after creating and entering the new directory.
Example Usage:
try . --run "npx motia@latest create"
This would:
- Create a dated directory (e.g.,
2025-01-06-my-project) - Change into the directory
- Execute the specified command
Use Cases:
- Initialize projects with framework-specific commands
- Run setup scripts after creating experiment directories
- Automate common post-creation tasks
This would be particularly useful for quickly starting new experiments with specific tooling.
This would fundamentally change how you enter the command right? Currently try or try something opens the try TUI with the search which is what helps you find potential duplicates of your work.
Are you suggesting
-
try somethingshould directly enter the first match? - or
try something→ enter, then should run the command
The place where I see this happening (sort of) is with an option that would flag in as you cd into the directory, and even then: would it always be the same command? Or would you need to configure it somewhere? How do you envision this.