| Crates.io | squirrel_tools |
| lib.rs | squirrel_tools |
| version | 0.1.0-pre5 |
| created_at | 2026-01-06 00:17:09.360675+00 |
| updated_at | 2026-01-08 17:28:30.809237+00 |
| description | A CLI tool for archiving files with date-based organization |
| homepage | https://github.com/yourusername/squirrel_tools |
| repository | https://github.com/yourusername/squirrel_tools |
| max_upload_size | |
| id | 2024852 |
| size | 366,688 |
A fast CLI tool for archiving files, managing dotfiles, and organizing executables.
$ sq document.pdf --compress gz
Squirrel Archive
--------------------------------------------------
File: document.pdf (2.4 MB)
Destination: ~/.nuts/pdf/2026/01/06/
Compression: gz
✓ Compressed (2.4 MB -> 892 KB, 63% reduction)
✓ Archived to ~/.nuts/pdf/2026/01/06/document.pdf.gz
Done in 0.3s
git clone https://github.com/aladac/squirrel
cd squirrel
cargo install --path .
sq <file> # Archive file (shorthand)
sq archive add <file> # Archive file (explicit)
sq archive get <file> # Restore from archive (alias: restore)
sq archive list # List archived files (alias: ls)
sq archive search <pattern> # Search archives (alias: find)
sq archive stats # Show statistics
sq archive clean # Clean old files
Options for add:
| Flag | Description |
|---|---|
-c, --copy |
Copy instead of moving |
-f, --force |
Overwrite existing files |
-e, --epoch |
Prefix with epoch timestamp |
-z, --compress <FMT> |
Compression: gz, bz2, zip |
--git |
Create git commit |
--git-rm |
Commit removal from source repo |
sq dotfiles <file> # Add dotfile (shorthand)
sq rc <file> # Add dotfile (alias)
sq dotfiles add <file> # Add dotfile (explicit)
sq dotfiles rm <file> # Remove from management
sq dotfiles list # List managed dotfiles
Options:
| Flag | Description |
|---|---|
-r, --repo |
Dotfiles repo path (default: ~/.nuts/dotfiles) |
-f, --force |
Overwrite if exists |
--no-commit |
Skip git commit |
sq bin <file> # Add executable (shorthand)
sq exe <file> # Add executable (alias)
sq bin add <file> [name] # Add with optional rename
sq bin rm <name> # Remove executable
sq bin list # List executables (alias: ls)
Options for add:
| Flag | Description |
|---|---|
-f, --force |
Overwrite existing files |
-l, --link |
Also create symlink in /usr/local/bin (sudo) |
-d, --dir |
Bin directory (default: ~/.nuts/bin) |
--no-commit |
Skip git commit |
Options for rm:
| Flag | Description |
|---|---|
-l, --link |
Also remove symlink from /usr/local/bin (sudo) |
-c, --copy <PATH> |
Copy executable to path before removing |
-m, --move-to <PATH> |
Move executable to path (requires --confirm) |
--confirm |
Confirm move operation |
--no-commit |
Skip git commit |
Features:
sq init # Initialize ~/.nuts with git
sq configure # Configure settings
sq git-config # Git integration settings
sq completions <shell> # Generate shell completions
# Zsh
sq completions zsh > ~/.zfunc/_sq
# Bash
sq completions bash > /etc/bash_completion.d/sq
# Fish
sq completions fish > ~/.config/fish/completions/sq.fish
Config stored at ~/.nuts/config.toml:
base_path = "~/.nuts/archive"
date_pattern = "%Y/%m/%d"
organize_by_type = true
[git]
enabled = false
template = "Archived {filename} to {destination}"
[github]
user = ""
repo = "nuts"
~/.nuts/
├── archive/
│ ├── pdf/2026/01/08/
│ │ └── document.pdf
│ └── txt/2026/01/08/
│ └── notes.txt
├── bin/
│ ├── my-script
│ └── another-tool
├── dotfiles/
│ ├── .bashrc
│ ├── .config/
│ │ └── nvim/
│ └── _root/
│ └── etc/my-config
└── config.toml
just build # Build
just test # Test
just release # Release build
just install # Install
just bump # Bump pre-release version
just bump patch # Bump patch version
just bump minor # Bump minor version
MIT