Skip to content

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Recent

English | 日本語

Recent is a CLI tool for Windows to quickly search and list recently created or modified files. Even if you don't remember the exact filename, you can find files based on time-criteria like "saved a moment ago" or "downloaded today", then apply explicit actions to the indexed result.

Key Features

  • Time-Based Sorting: Automatically sorts and lists files by the newer of their creation or modification times (you can also use only one of them using --created or --modified).
  • Explicit Action Commands: After listing results, use recent open <index>, recent reveal <index>, recent path <index>, or recent copy <index> to act on the numbered entry.
  • Category Filtering: Filter files by category such as images, videos, documents, or source code.
  • Fast Run-time Scanning & Exclusions: Automatically skips system files, hidden files, and development folders like .git or node_modules for extremely fast scans.

Installation

Building from Source

Ensure you have Go 1.21 or later installed.

git clone https://github.com/yhotamos/recent.git
cd recent
go build -o recent.exe main.go

After building, place the generated recent.exe in a directory included in your system's PATH environment variable.


Usage

1. List Recent Files

By default, it searches files in standard user directories (Desktop, Downloads, Documents, Pictures, Videos) sorted by date descending.

recent

Example Output:

  #    Time              Reason    File
--------------------------------------------------------------------------------
  1    2 minutes ago     created   ~\Downloads\screenshot.png
  2    18 minutes ago    modified  ~\Documents\report.docx
  3    1 hour ago        created   ~\Videos\movie.mp4

2. Actions by Index

First run a search/list command such as recent or recent --today --image to generate the numbered result set. Then use an explicit action command to operate on that saved result set:

  • Open with default application
    recent open 2
  • Reveal and select in File Explorer
    recent reveal 2
  • Print absolute path
    recent path 2
  • Copy absolute path to clipboard
    recent copy 2

3. Filters

  • Filter by time range
    recent --today       # Files created/modified today only
    recent --days 7      # Files from the last 7 days only
  • Filter by file types
    recent --image       # Image files (.png, .jpg, .gif, .webp, etc.)
    recent --video       # Video files (.mp4, .mkv, .avi, etc.)
    recent --document    # Document files (.docx, .pdf, .xlsx, .txt, etc.)
    recent --code        # Code files (.go, .py, .js, .json, .md, etc.)
  • Combine filters
    recent --today --code
  • Change result limit (default is 20)
    recent --limit 50
  • Output as JSON
    recent --json

4. Customizing Search Directories

You can add, remove, and list custom search target folders.

  • Add directory to search list
    recent config add C:/project
  • Remove directory from search list
    recent config remove C:/project
  • List current configuration (shows custom directories and global ignores)
    recent config list

Config & History File Locations

  • Configuration file: %APPDATA%\recent\config.json
    • Stores the search directories and ignore patterns.
  • History cache file: %LOCALAPPDATA%\recent\last_results.json
    • Temporarily stores the file paths of the last search result set, used to resolve index numbers for explicit commands such as recent open 2, recent reveal 2, recent path 2, and recent copy 2.

Author

yhotta240 https://github.com/yhotta240

License

MIT

About

A CLI tool for Windows to quickly search and list recently created or modified files.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages