Skip to content

jo1gi/sea-serpent

Repository files navigation

Sea Serpent

GitHub release GitHub top language License Donate using Ko-Fi

Basic cli file tagging

This project is still early in development and can change at any moment

Sea-serpent uses a local database (a single directory and its subdirectories) to store tags for files.

Installation

sea-serpent can be installed by downloading a pre-compiled binary from Release or by compiling it youself.

To compile sea-serpent youself you have to install cargo and run:

cargo install --git "https://github.com/jo1gi/sea-serpent.git"

Usage

Initialize database

To initialize a new sea-serpent database simply run

sea-serpent init

This will create a new folder in the current directory called .sea-serpent which will contain all files for sea-serpent.

Adding tags

  • Add a tag to a file
sea-serpent add -t <tag> -f <file>
  • Add tag to directory and all its descendants with the --recursive or the -r argument
sea-serpent add -t <tag> -f <directory> --recursive
  • Don't include directories with --exclude-dirs
sea-serpent add -t <tag> -f <directory> --recursive --exclude-dirs
  • Tag files with key-value pairs by separating the key and the value with a colon
sea-serpent add -t <key>:<value> -f <files>

Searching

  • Search for files with specific tags
sea-serpent search <tag1> <tag2>
  • Search for either tag1 or tag2 with or keyword
sea-serpent search <tag1> or <tag2>
  • Exclude tags with not keyword
sea-serpent search <tag1> and not <tag2>
  • Combine to more complex operation by grouping with parentheses
sea-serpent search (<tag1> or <tag2>) and (<tag3> or not <tag2>)
  • Search for a key-value pair by adding a colon
sea-serpent search <key>:<value>
  • Search for with a value (not key)
sea-serpent search :<value>
  • Search for with a key (not value)
sea-serpent search <key>:
  • Sort the search results by the values in a key-value pair
sea-serpent search <tag> --sort-by <key>
  • Limit the amount of results
sea-serpent search <tag> --limit <number>

Contributions

Issues, bug-reports, pull requests or ideas for features and improvements are very welcome.

Donations

If you like the project, please consider donating: