CLI Tags Resource¶
CLITagsResource(cli)
¶
Bases: BaseCLIResource
CLI resource for tag operations.
Attributes:
| Name | Type | Description |
|---|---|---|
_cli |
Reference to the parent |
Source code in src/aiobsidian/cli/_base.py
get(name)
async
¶
Get notes that contain a specific tag.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Tag name (without |
required |
Returns:
| Type | Description |
|---|---|
list[dict[str, Any]]
|
List of matching note objects. |
Source code in src/aiobsidian/cli/tags.py
rename(old, new)
async
¶
Rename a tag across the entire vault.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
old
|
str
|
Current tag name. |
required |
new
|
str
|
New tag name. |
required |
list(*, sort=None, path=None, counts=False)
async
¶
List all tags in the vault.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
sort
|
str | None
|
Sort order (e.g. |
None
|
path
|
str | None
|
Restrict to tags found under this path. |
None
|
counts
|
bool
|
If |
False
|
Returns:
| Type | Description |
|---|---|
list[dict[str, Any]]
|
List of tag objects. |