Skip to content

fossillogic/shark

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

325 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Shark Tool Logo

A Command-Line Power Utility by Fossil Logic

Shark Tool is the ultimate all-in-one file and system administration utility. Built for admins, developers, and power users, Shark unifies essential file management, automation, and analysis tasks into a single, powerful command-line interface—eliminating the need for multiple separate tools. Its unique commands, such as grammar for advanced text analysis, summary for structured file summaries, and introspect for deep file inspection, set Shark apart by providing capabilities rarely found in traditional CLI utilities.


Features

  • Comprehensive file and directory operations (show, copy, move, delete, rename, create)
  • Powerful archive creation, extraction, and listing (zip, tar, gz)
  • Advanced recursive search by name or content with filtering options
  • Smart file timestamp and metadata management
  • Cross-platform compatibility (Linux, macOS, Windows)
  • Command palette for quick access to all features
  • Grammar analysis, correction, and tone detection via SOAP API
  • Structured file summaries and statistics (keywords, topics, entropy)
  • File synchronization and backup with flexible options
  • Real-time file monitoring and change detection

Command Palette


Core File Operations

Command Description Flags
show Display files and directories. -a, --all (show hidden)
-l, --long (detailed info)
-h, --human (human-readable sizes)
-r, --recursive (include subdirs)
-d, --depth <n> (limit recursion)
--as <mode> (format: list/tree/graph)
--time (show timestamps)
move Move or rename files/directories. -f, --force (overwrite)
-i, --interactive (confirm overwrite)
-b, --backup (backup before move)
copy Copy files or directories. -r, --recursive (copy subdirs)
-u, --update (only newer)
-p, --preserve (keep permissions/timestamps)
remove / delete Delete files or directories. -r, --recursive (delete contents)
-f, --force (no confirmation)
-i, --interactive (confirm per file)
--trash (move to trash)
--wipe (secure overwrite before delete)
--shred <passes> (multi-pass secure deletion)
--older-than <time> (delete files older than)
--larger-than <size> (delete files larger than)
--empty (delete only empty dirs)
--log <file> (write deletion log)
rename Rename files or directories. -f, --force (overwrite target)
-i, --interactive (confirm overwrite)
create Create new directories or files. -p, --parents (create parent dirs)
-t, --type <type> (file or dir)
search Find files by name or content. -r, --recursive (include subdirs)
-n, --name <pattern> (filename match)
-c, --content <pattern> (search contents)
-i, --ignore-case (case-insensitive)
archive Create, extract, or list archives. -c, --create (new archive)
-x, --extract (extract)
-l, --list (list archive)
-f <format> (zip/tar/gz)
-p, --password <pw> (encrypt)
view Output file contents to terminal. -n, --number (number lines)
-b, --non-blank (number non-blank)
-s, --squeeze (remove blank lines)
-h, --head <n> (first n lines)
-t, --tail <n> (last n lines)
--time (show timestamps)
compare Compare two files/directories. -t, --text (line diff)
-b, --binary (binary diff)
--context <n> (context lines)
--ignore-case (ignore case)
help Display help for commands. --examples (usage examples)
--man (full manual)
sync Synchronize files/directories. -r, --recursive (include subdirs)
-u, --update (only newer)
--delete (remove extraneous files)
watch Monitor files or directories. -r, --recursive (include subdirs)
-e, --events <list> (event filter)
-t, --interval <n> (poll interval)
rewrite Modify file contents or metadata. -a, --append (append)
--in-place (edit in place)
--access-time (update atime)
--mod-time (update mtime)
--size <n> (set file size)
introspect Examine file contents/type/meta. --head <n> (first n lines)
--tail <n> (last n lines)
--count (count lines/words/bytes)
--type (show type)
--fson (FSON output)
grammar Analyze/correct grammar/style via SOAP API. --check (analyze grammar & style)
--correct (apply grammar correction)
--sanitize (clean unsafe language)
--suggest (improvement suggestions)
--summarize (concise summary)
--score (readability/clarity/quality scores)
--tone (detect tone)
--detect <type> (detect traits: conspiracy, spam, ragebait, clickbait, bot, marketing, technobabble, hype, political, offensive, misinfo, brain_rot, formal, casual, sarcasm, neutral, aggressive, emotional, passive, snowflake, redundant, poor_cohesion, repeated_words)
--reflow-width <n> (reflow to width)
--capitalize <mode> (sentence-case or title-case)
--format (pretty-print with indentation)
--declutter (repair whitespace & word boundaries)
--punctuate (normalize punctuation)
cryptic Encode or decode text using various ciphers. -e, --encode (encode text)
-d, --decode (decode text)
-c, --cipher <type> (cipher: caesar, vigenere, base64, base32, binary, morse, baconian, railfence, haxor, leet, rot13, atbash)

Global Flags (Available to All Commands)

Flag Description
--help Show command help.
--version Display Shark Tool version.
-v, --verbose Enable detailed output.
-q, --quiet Suppress standard output.
--dry-run Simulate actions without changes.
--color Colorize output where applicable.
--time Display timestamps in output.

Usage Examples

Example Description
shark show -alh --as=tree --time List all files (including hidden) in long, human-readable format as a tree, with timestamps.
shark move -i -b old.txt archive/old.txt Move a file interactively, creating a backup before moving.
shark copy -rp src/ backup/ Recursively copy the src/ directory to backup/, preserving permissions and timestamps.
shark remove -r --trash temp/ Recursively move the temp/ directory and its contents to the system trash.
shark rename -i draft.md final.md Rename a file with confirmation before overwriting the target.
shark create -p -t dir logs/archive/2024/ Create a nested directory structure for logs.
shark search -rc "config" Recursively search for the string "config" inside files.
shark archive -c -f tar project.tar src/ Create a TAR archive from the src/ directory.
shark view -n -h 20 --time notes.txt View the first 20 lines of a file with line numbers and timestamps.
shark compare -t main_v1.c main_v2.c --context 5 Show a line-by-line diff of two files with 5 lines of context.
shark sync -ru src/ dest/ Synchronize files from src/ to dest/, copying only newer files recursively.
shark watch -r -e create,delete src/ Monitor the src/ directory recursively for file creation and deletion events.
shark rewrite -i --append log.txt "New entry" Append a new entry to a log file in-place.
shark introspect --mime report.pdf Show the MIME type of a file.
shark grammar --check --tone notes.txt Run a grammar check and detect tone in a text file.

Prerequisites

Ensure you have the following installed before starting:

  • Meson Build System: This project relies on Meson. For installation instructions, visit the official Meson website.

Setting Up Meson Build

  1. Install Meson:
    • Follow the installation guide on the Meson website for your operating system.

Setting Up, Compiling, Installing, and Running the Project

  1. Clone the Repository:

    git clone https://github.com/fossillogic/shark.git
    cd shark
  2. Configure the Build:

    meson setup builddir
  3. Compile the Project:

    meson compile -C builddir
  4. Install the Project:

    meson install -C builddir
  5. Run the Project:

    shark --help

Contributing

Interested in contributing? Please open pull requests or create issues on the GitHub repository.

Feedback and Support

For issues, questions, or feedback, open an issue on the GitHub repository.

License

This project is licensed under the Apache Public License.

About

Shark Tool is the ultimate all-in-one file and system administration utility. Built for admins, developers, and power users, Shark unifies essential file management, automation, and analysis tasks into a single, powerful command-line interface—eliminating the need for multiple separate tools.

Topics

Resources

License

Security policy

Stars

Watchers

Forks

Contributors