discover

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package discover suggests folders the user probably wants as projects: folders where coding agents have run before, and the folders inside the usual code directories.

Index

Constants

This section is empty.

Variables

View Source
var CodeDirs = []string{"projects", "Projects", "code", "Code", "src", "dev", "work", "repos", "git"}

CodeDirs are common parents of project folders, relative to home.

View Source
var HistoryDirs = []HistoryDir{
	{Agent: "Claude Code", Dir: ".claude/projects"},
	{Agent: "Codex", Dir: ".codex/sessions"},
}

HistoryDirs are the known agent history locations.

Functions

This section is empty.

Types

type Candidate

type Candidate struct {
	Name   string
	Path   string
	Reason string // why it was suggested, e.g. "recent agent sessions"
	Seen   time.Time
}

Candidate is a suggested project folder.

func Suggest

func Suggest(o Options) []Candidate

Suggest returns candidate project folders, most recently used first.

type HistoryDir

type HistoryDir struct {
	Agent string
	Dir   string // relative to the home directory
}

HistoryDir is where an agent keeps session logs as JSONL files that record the working directory in a "cwd" field. Locations are data so no agent is special; add one when an agent stores history that way.

type Options

type Options struct {
	Home    string   // defaults to the user's home directory
	Exclude []string // paths already registered as projects
	Limit   int      // maximum suggestions; default 12
}

Options tunes a search. Zero values use sensible defaults.

Jump to

Keyboard shortcuts

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