aias add¶
Add or replace a single prompt's cron job without touching any other installed jobs.
PATH is the path to the prompt file — absolute or relative. The file must live inside the configured prompts directory.
What It Does¶
- Expands
PATHto an absolute path - Verifies the file exists and is inside the prompts directory
- Parses the file's YAML frontmatter via
PM::Metadata - Errors immediately if the file has no
schedule:key - Runs the same validation as
update(schedule syntax, parameter defaults,aiabinary) - Derives the prompt ID from the file's path relative to the prompts directory
- Upserts the single cron entry into the aias-managed crontab block — if the prompt was already installed, its old entry is replaced; all other entries are left untouched
When to Use add vs update¶
| Situation | Command |
|---|---|
| You edited or created one prompt and want it scheduled now | aias add PATH |
| You edited multiple prompts, or want to sync everything | aias update |
| You want to see what would change first | aias dry-run or aias check |
add is faster than update for large prompts directories because it does not scan the entire tree — it only reads the one file you specify.
Example Output¶
Success:
Prompt has no schedule:
Invalid schedule:
aias [error] bad_prompt: Schedule 'every banana': not a valid cron expression or natural language schedule
File outside prompts directory:
Upsert Semantics¶
Re-running add on the same prompt replaces its cron entry cleanly — no duplicates are created. This makes add safe to run any number of times:
# Install:
aias add ~/.prompts/standup.md
# aias: added standup (every weekday at 9:00am (0 9 * * 1-5))
# Update the schedule in the file, then re-install:
aias add ~/.prompts/standup.md
# aias: added standup (every weekday at 10:00am (0 10 * * 1-5))
Prompt ID Derivation¶
The prompt ID is derived the same way as update: the file's absolute path with the prompts directory prefix and .md extension removed.
prompts_dir: /Users/you/.prompts
file: /Users/you/.prompts/reports/weekly.md
prompt_id: reports/weekly
Options¶
| Option | Alias | Description |
|---|---|---|
--prompts-dir PATH |
-p |
Use PATH as the prompts directory (also determines the prompt ID prefix) |
When --prompts-dir is not supplied, the prompts directory is read from AIA_PROMPTS__DIR or AIA_PROMPTS_DIR. The same value is embedded in the generated aia command so the cron job runs against the correct directory.
Exit Codes¶
| Code | Condition |
|---|---|
0 |
Job installed successfully |
1 |
File not found, outside prompts dir, no schedule:, validation failure, or crontab write error |
See Also¶
aias update— sync all scheduled prompts at onceaias check— diff view before making changesaias list— confirm the job was installed- Scheduling Prompts — schedule format reference