Feature request: Add attachment support to TaskNotes CLI
Feature request
It would be useful for the TaskNotes CLI to support adding and removing attachments from tasks.
TaskNotes already represents tasks as Markdown files, and attachments can naturally be represented as links to files in the vault. However, the CLI currently does not appear to expose attachment-related operations through tn update or a dedicated command.
Desired usage
Something along these lines would be ideal:
# Add an existing vault file
tn attach <taskId> "Attachments/screenshot.png"
# Or through update
tn update <taskId> --add-attachment "Attachments/screenshot.png"
# Remove an attachment
tn update <taskId> --remove-attachment "Attachments/screenshot.png"
# List attachments
tn attachments <taskId>
It would also be useful if the CLI could optionally accept a file outside the vault and copy it into a configured attachments folder:
tn attach <taskId> ~/Downloads/screenshot.png
For example, this could:
- Copy the file into the vault's configured attachment directory.
- Add the corresponding Obsidian link to the task's attachment metadata.
- Return the resulting vault path / attachment reference.
Motivation
My main use case is agent-driven task management.
I use TaskNotes from both Obsidian and CLI/automation workflows. An agent can already create and update tasks through the CLI, but supporting attachments would make it possible to associate artifacts such as:
- screenshots
- PDFs
- documents
- logs
- generated reports
with a task without requiring the agent to manually edit the task's Markdown/YAML frontmatter.
For example:
tn "Investigate Excel import bug"
tn attach <taskId> ./screenshots/error.png
tn attach <taskId> ./logs/debug.log
This would make TaskNotes significantly more useful as the task layer for CLI-based / agentic workflows.
Possible scope
A minimal implementation would be enough initially:
tn update <taskId> --add-attachment <vault-path>
tn update <taskId> --remove-attachment <vault-path>
File copying/importing from outside the vault could be added separately if that introduces too much scope.
If attachment support also needs to be exposed through the TaskNotes HTTP API first, I'm happy for this issue to be moved/split into the appropriate repository.
Feature request: Add attachment support to TaskNotes CLI
Feature request
It would be useful for the TaskNotes CLI to support adding and removing attachments from tasks.
TaskNotes already represents tasks as Markdown files, and attachments can naturally be represented as links to files in the vault. However, the CLI currently does not appear to expose attachment-related operations through
tn updateor a dedicated command.Desired usage
Something along these lines would be ideal:
It would also be useful if the CLI could optionally accept a file outside the vault and copy it into a configured attachments folder:
For example, this could:
Motivation
My main use case is agent-driven task management.
I use TaskNotes from both Obsidian and CLI/automation workflows. An agent can already create and update tasks through the CLI, but supporting attachments would make it possible to associate artifacts such as:
with a task without requiring the agent to manually edit the task's Markdown/YAML frontmatter.
For example:
This would make TaskNotes significantly more useful as the task layer for CLI-based / agentic workflows.
Possible scope
A minimal implementation would be enough initially:
File copying/importing from outside the vault could be added separately if that introduces too much scope.
If attachment support also needs to be exposed through the TaskNotes HTTP API first, I'm happy for this issue to be moved/split into the appropriate repository.