claudes

package module
v0.0.0-...-451a47d Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2026 License: Unlicense Imports: 12 Imported by: 0

README

Claudes

Manage multiple Claude Code sessions in worktrees from a single terminal interface.

Installation

go install github.com/brittonhayes/claudes/cmd/claudes@latest

Requires Go 1.21+ and Claude Code CLI (claude).

Usage

Spawn Parallel Sessions
claudes "Review auth.py" "Run all tests" "Check for TODOs"

This spawns 3 background Claude sessions and opens the TUI.

From File
cat > prompts.txt <<EOF
Review all Python files for security issues


Run the test suite and fix any failures


Update documentation for new API endpoints
EOF

claudes -f prompts.txt

Prompts separated by 3+ newlines.

View Active Sessions
claudes

Opens the TUI showing all active sessions:

Claudes

> 0  Review auth.py      Running      2m       Reviewing authentication...
  1  Run all tests       Running      2m       Running pytest suite...
  2  Check for TODOs     Complete     1m       Found 12 TODO items

[↑↓] navigate  [enter] resume  [d] delete  [r] refresh  [q] quit
Resume Sessions
  1. Navigate with ↑↓ or j/k
  2. Press Enter on a session
  3. Opens Claude Code UI with the resumed session
  4. When you exit Claude Code, automatically returns to Claudes TUI

Sessions stay alive for continuous conversation with full Claude Code UI access.

Delete Sessions

Press d on any session to delete it.

Reference

Command Options
-f FILE    Read prompts from file (- for stdin)
-h         Show help

License

MIT

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateWorktreeName

func GenerateWorktreeName(ctx context.Context, prompt string, sessionID string) (string, error)

GenerateWorktreeName uses Claude SDK to generate a unique worktree name To use Haiku model for faster, cost-effective name generation, set:

export ANTHROPIC_MODEL=claude-haiku-4

func RemoveWorktree

func RemoveWorktree(path string) error

RemoveWorktree removes a git worktree

func Truncate

func Truncate(s string, max int) string

Types

type Manager

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

func NewManager

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

func (*Manager) Attach

func (m *Manager) Attach(sess *Session) error

func (*Manager) Spawn

func (m *Manager) Spawn(sess *Session) error

func (*Manager) Stop

func (m *Manager) Stop(id string)

func (*Manager) Tail

func (m *Manager) Tail(sess *Session) (string, error)

type Model

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

func NewModel

func NewModel(store *Store, agent *Manager) Model

func (Model) Attach

func (m Model) Attach() *Session

func (Model) Init

func (m Model) Init() tea.Cmd

func (Model) Update

func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (Model) View

func (m Model) View() string

type Session

type Session struct {
	ID           string    `json:"id"`
	Prompt       string    `json:"prompt"`
	Status       Status    `json:"status"`
	OutputFile   string    `json:"output_file"`
	Started      time.Time `json:"started"`
	AgentID      string    `json:"agent_id,omitempty"`
	WorktreePath string    `json:"worktree_path,omitempty"`
	WorktreeName string    `json:"worktree_name,omitempty"`
	BranchName   string    `json:"branch_name,omitempty"`
}

type Status

type Status string
const (
	Running  Status = "Running"
	Complete Status = "Complete"
	Failed   Status = "Failed"
)

type Store

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

func NewStore

func NewStore(dir string) (*Store, error)

func (*Store) Delete

func (s *Store) Delete(id string) error

func (*Store) List

func (s *Store) List() ([]*Session, error)

func (*Store) Load

func (s *Store) Load(id string) (*Session, error)

func (*Store) Save

func (s *Store) Save(sess *Session) error

type WorktreeInfo

type WorktreeInfo struct {
	Name   string // Generated name for the worktree
	Branch string // Git branch name
	Path   string // Full path to the worktree directory
}

WorktreeInfo contains information about a git worktree for a session

func CreateWorktree

func CreateWorktree(baseDir, branchName, worktreeName string) (*WorktreeInfo, error)

CreateWorktree creates a git worktree with the specified branch

Directories

Path Synopsis
cmd
claudes command

Jump to

Keyboard shortcuts

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