Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sexton

A TUI application for archiving abandoned projects to a "graveyard" directory, keeping your workspace clean while preserving code you're not ready to delete.

Etymology

The name "sexton" comes from Old English, referring to the church official responsible for maintaining the building and grounds—including the cemetery. It's the perfect name for an app that tends to your project graveyard.

Features

  • Browse directories and select multiple projects to archive
  • One-command archiving with optional git auto-commit before archiving
  • Metadata tracking including project size, last modified date, git commit info, and user notes
  • Archive browsing with search, sort, and filtering
  • Restore projects from the graveyard (to current directory, original location, or custom path)
  • Peek inside archives to see file structure without extracting
  • Permanent delete with safety confirmation
  • Osaka Jade color scheme for a pleasant terminal experience

Installation

From Source

Requirements:

  • Go 1.25.3 or higher
git clone https://github.com/ricardovfreixo/sexton.git
cd sexton
make install

Or manually:

go install ./cmd/sexton

The binary will be installed to $GOPATH/bin/sexton (typically ~/go/bin/sexton).

Build and Run Locally

make build
./bin/sexton

Usage

Starting Sexton

sexton

Sexton opens in the Browse mode by default, scanning the current working directory for subdirectories.

Modes

Sexton has two main modes:

  • Browse (tab to switch): View directories in current location, select and archive them
  • Archives (tab to switch): View all archived projects in the graveyard, search, restore, and delete

Keybindings

Browse Mode

Key Action
j / Move cursor down
k / Move cursor up
space Toggle selection
enter Archive selected items (or highlighted if none selected)
N Sort by name (alphabetical)
S Sort by size (largest first)
D Sort by date (most recent first)
tab Switch to Archives mode
q / ctrl+c Quit

Archive Confirmation Modal

Key Action
y / enter Confirm archive operation
n / esc Cancel
tab Edit notes field

Archives Mode

Key Action
j / Move cursor down
k / Move cursor up
/ Start fuzzy search
esc (when searching) Cancel search
enter (when searching) Confirm search filter
i Show archive info
p Peek inside archive (show file tree)
r Restore archive to disk
d Delete archive permanently
N Sort by name (alphabetical)
S Sort by size (largest first)
D Sort by date (most recent first)
tab Switch to Browse mode
q / ctrl+c Quit

Peek Modal

Key Action
j / Scroll down
k / Scroll up
esc / p / q Close modal

Restore Modal

Key Action
c Restore to current directory
o Restore to original location
p Restore to custom path
y / enter Confirm restore
n / esc / q Cancel

Delete Confirmation Modal

Key Action
Type characters Enter confirmation text
backspace Delete character
enter Confirm delete (only after typing "DELETE")
esc Cancel

Configuration

Sexton creates a configuration file at ~/.config/sexton/config.yaml on first run.

Configuration Options

# Path where archived projects are stored
# Default: /extra/graveyard
graveyard_path: /extra/graveyard

# Automatically commit uncommitted changes before archiving git repos
# Default: true
git_auto_commit: true

# Commit message used when auto-committing
# Default: "WIP: archived by sexton"
git_commit_message: "WIP: archived by sexton"

Configuration Locations

Sexton respects the XDG Base Directory specification:

  • Config file: $XDG_CONFIG_HOME/sexton/config.yaml (defaults to ~/.config/sexton/config.yaml)
  • Graveyard: Defaults to /extra/graveyard (configurable in config.yaml)

Archive Structure

Archives are stored in the graveyard organized by year and month:

/extra/graveyard/
  .sexton-index.json          # Metadata for all archives
  2026/
    01/
      a1b2c3d4-e5f6-....tar.gz
      x7y8z9a0-b1c2-....tar.gz
    02/
      ...

Each archive contains:

  • The complete project directory structure
  • All files and symlinks
  • Git history (the .git directory if it existed)

The .sexton-index.json file stores metadata for each archive:

  • Original project name and path
  • Archive size (uncompressed)
  • Timestamp (when archived and last modified)
  • Git information (commit hash, date, dirty status)
  • User notes

How It Works

Archiving a Project

  1. Select one or more directories in Browse mode with space
  2. Press enter to show confirmation
  3. Review the list, total size, and graveyard destination
  4. Add optional notes
  5. Press y or enter to confirm
  6. If the project is a git repository and has uncommitted changes:
    • If git_auto_commit is enabled, Sexton commits with the configured message
    • The commit info is recorded in the archive metadata
  7. Project is compressed to .tar.gz and moved to graveyard
  8. Metadata entry is added to .sexton-index.json
  9. Original directory is removed from disk

Restoring a Project

  1. Switch to Archives mode with tab
  2. Find the archive with / search or j/k navigation
  3. Press r to show restore dialog
  4. Choose destination: current directory, original location, or custom path
  5. Press y to extract and restore
  6. Archive remains in graveyard (use d to delete if desired)

Deleting an Archive

  1. Switch to Archives mode with tab
  2. Find the archive
  3. Press d to show delete confirmation
  4. Type "DELETE" exactly (case insensitive) to confirm
  5. Press enter to permanently delete

Development

Project Structure

cmd/sexton/                 # Entry point
internal/
  config/                   # Configuration loading (XDG paths)
  metadata/                 # Archive index management
  archive/                  # Tar and extraction operations
  git/                      # Git detection and operations
  tui/                      # Terminal UI (Bubble Tea)
    colors.go               # Osaka Jade color palette
    styles.go               # Lipgloss styling
    app.go                  # Main Bubble Tea model
    browser.go              # Directory browser component
    archivelist.go          # Archive list component
    modal.go                # Reusable modal component
    confirm.go              # Archive confirmation modal
    progress.go             # Archive progress display
    peek.go                 # Archive contents viewer

Building and Testing

# Build
make build

# Run tests
go test ./...

# Code quality checks
go vet ./...
go fmt ./...

# Clean
make clean

Dependencies

Core UI and utilities:

  • github.com/charmbracelet/bubbletea - Terminal UI framework
  • github.com/charmbracelet/lipgloss - Terminal styling
  • github.com/charmbracelet/bubbles - Pre-built components
  • gopkg.in/yaml.v3 - YAML configuration parsing
  • github.com/google/uuid - Archive identifiers

License

Sexton is licensed under the Fair Source License 1.0.0. This means:

  • You can use, modify, and examine the source code
  • You can run it for personal use and operate websites with it
  • You cannot use it as a commercial offering or to compete with the original
  • The prior major version will be released under an OSI-approved open source license

See LICENSE for full details.

Contributing

This is a source-available project. Contributions are not currently accepted, but you're free to fork and modify for personal use.

Acknowledgments

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages