try icon indicating copy to clipboard operation
try copied to clipboard

Support running a command after creating new folder

Open jellydn opened this issue 1 month ago • 1 comments

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:

  1. Create a dated directory (e.g., 2025-01-06-my-project)
  2. Change into the directory
  3. 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.

jellydn avatar Jan 05 '26 22:01 jellydn

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

  1. try something should directly enter the first match?
  2. 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.

miguelalcalde avatar Jan 15 '26 17:01 miguelalcalde