tags

package
v0.11.0-beta.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 23, 2026 License: Apache-2.0, MIT Imports: 9 Imported by: 0

Documentation

Overview

Package tags stores user-applied annotations on file paths. Tags are surfaced in the TUI via /tags and used by the agent to find files quickly (e.g. "show me the @important files").

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

Manager owns the tag store. Backed by a JSONL file appended atomically.

func NewManager

func NewManager(path string) (*Manager, error)

NewManager opens (or creates) a tag store at the given path. If path is empty, it defaults to ~/.overkill/tags.jsonl.

func (*Manager) ByPath

func (m *Manager) ByPath(path string) []Tag

ByPath returns all tags on a given path.

func (*Manager) ByTag

func (m *Manager) ByTag(tag string) []Tag

ByTag returns all paths that have the given tag, in insertion order.

func (*Manager) List

func (m *Manager) List() []Tag

List returns a snapshot of all tags, sorted by tag then path.

func (*Manager) Tag

func (m *Manager) Tag(path, tag, note string) error

Tag adds an annotation. If (path, tag) already exists, the note is updated.

func (*Manager) Tags

func (m *Manager) Tags() []string

Tags returns the unique set of tag names in the store.

func (*Manager) Untag

func (m *Manager) Untag(path, tag string) error

Untag removes a (path, tag) pair. If tag is empty, all tags on the path are removed.

type Tag

type Tag struct {
	Path string    `json:"path"`
	Tag  string    `json:"tag"`
	Note string    `json:"note,omitempty"`
	Time time.Time `json:"ts"`
}

Tag is a single annotation on a file path.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL