Documentation
¶
Overview ¶
Package scripts is the repo-local store of reusable multi-step command sequences — a proven recipe ("rebuild the cli", "commit, push, deploy") saved once and replayed by name instead of re-derived every time. Each script is a real shell file at .memcode/scripts/<slug>.sh: a shebang line followed by a hand-parsed `#`-comment metadata header (description/created/last-run/run-count — no YAML dependency, matching the internal/skills package's existing convention) and then the command body.
.memcode is gitignored, so scripts are per-machine and a hard delete isn't git-recoverable — Delete therefore moves a script to a .trash/ subdirectory rather than removing it outright.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Delete ¶
Delete soft-deletes a script: moves it to .memcode/scripts/.trash/<slug>-<unixnano>.sh rather than removing it outright, since .memcode is gitignored (a hard delete wouldn't be git-recoverable).
Types ¶
type Script ¶
type Script struct {
Slug string
Description string
Body string
CreatedAt time.Time
LastRunAt time.Time // zero value: never run
RunCount int
Path string
}
Script is one saved command sequence.
func List ¶
List returns every saved (non-trashed) script, sorted by slug. An absent directory is not an error — it just means nothing has been saved yet.