Runs a repo script by its bare name.

Runs a repo script by its bare name.
Status: stub. Tested with Claude Code 2.1.287.
hooks/register.ts 15 lines1import type { Register } from 'claude-code'
2
3// STUB. Loads, validates, and answers /run-by-name with what it will become.
4// The shape it is heading for: /t <name>: finds the script and runs it via $.process
5export const register: Register = on => {
6 on('session.start', async ($, e, next) => {
7 await $.command.register({ name: 'run-by-name', description: "Runs a repo script by its bare name." })
8 return next(e)
9 })
10
11 on('command.run', { command: 'run-by-name' }, async () => {
12 return { text: 'Not built yet. ' + "Runs a repo script by its bare name." }
13 })
14}
15