Quick Start
Get up and running with fx-bin in 5 minutes.
Installation
Method 1: pip (Recommended)
The easiest way to install fx-bin:
pip install fx-bin
Upgrade to the latest version:
pip install --upgrade fx-bin
Method 2: pipx (Isolated Installation)
For a clean, isolated environment:
pipx install fx-bin
Upgrade to the latest version:
pipx upgrade fx-bin
Method 3: From Source
For development or testing:
# Clone the repository
git clone https://github.com/frankyxhl/fx_bin.git
# Navigate to the directory
cd fx_bin
# Install using Poetry
poetry install --with dev
# Run fx commands
poetry run fx --help
Verify Installation
Check that fx-bin is installed correctly:
fx --version
You should see output like:
FX-Bin v2.4.0
Repository: https://github.com/frankyxhl/fx_bin
Your First Commands
Explore Available Commands
List all available fx commands:
fx list
Get help for the fx CLI:
fx --help
Count Files
Count files in the current directory:
fx files .
Count only Python files:
fx files . --pattern "*.py"
Analyze Sizes
Show file sizes in the current directory:
fx size .
Show the 10 largest files:
fx size . --limit 10 --unit MB
Find Files
Find files containing "config" in their name:
fx ff config
Find Python files:
fx ff .py
Filter by Extension
Find all Python files, sorted by modification time:
fx filter py --sort-by modified --reverse
Find multiple file types:
fx filter "jpg,png,gif" --format detailed
Replace Text
Replace "old" with "new" in a file:
fx replace "old" "new" file.txt
Replace text in multiple files:
fx replace "v1.0" "v2.0" *.py
Tip
Safety First: fx replace uses atomic writes with automatic backup. If the replacement fails, the original file is automatically restored.
Common Workflows
Daily Development Setup
# Navigate to today's workspace
fx today
# Count project files
fx files . --pattern "*.py" --recursive
# Find recently modified files
fx filter "py,js,ts" --sort-by modified --reverse --limit 10
# Locate TODO markers
fx ff TODO --exclude node_modules --exclude .git
Project Analysis
# Analyze file sizes
fx size . --limit 20
# Count files by type
fx files . --pattern "*.py"
fx files . --pattern "*.js"
fx files . --pattern "*.md"
# Find configuration files
fx ff config --exclude backup
# Identify largest directories
fx size . --recursive --sort desc
File Organization
# Create a backup before organizing
fx backup my_project --compress
# Organize files by date (preview)
fx organize my_project --date-source created --depth 3 --dry-run
# Execute organization
fx organize my_project --date-source created --depth 3
Command Reference
For detailed information about each command, see:
fx files- Count files in directoriesfx size- Analyze file/directory sizesfx ff- Find files by keywordfx fff- Find first file matching keywordfx filter- Filter files by extensionfx replace- Replace text in filesfx backup- Create timestamped backupsfx organize- Organize files by datefx root- Find Git project rootfx today- Create daily workspace
Troubleshooting
Command Not Found
If you see "command not found: fx":
# Check Python installation
python --version
# Reinstall with pip
pip uninstall fx-bin
pip install fx-bin
# Or with pipx
pipx uninstall fx-bin
pipx install fx-bin
Permission Denied
If you see "Permission denied" errors:
# macOS/Linux: Use sudo
sudo pip install fx-bin
# Or use a virtual environment
python -m venv .venv
source .venv/bin/activate
pip install fx-bin
Module Not Found
If you see "ModuleNotFoundError":
# Reinstall with all dependencies
pip install --force-reinstall fx-bin
# Or upgrade pip first
pip install --upgrade pip
pip install --upgrade fx-bin
Version Conflicts
If you have multiple Python versions:
# Specify Python version
python3.11 -m pip install fx-bin
# Or use pyenv/pyenv-win to manage Python versions
pyenv install 3.11.0
pyenv global 3.11.0
pip install fx-bin
Next Steps
- Explore the Command Reference for detailed usage
- Try the Use Cases for real-world examples
- Integrate fx-bin into your workflow with Shell Integration
Getting Help
- Documentation: Full documentation
- GitHub Issues: Report bugs
- GitHub Discussions: Ask questions
- Email: frank@frankxu.me
Ready to go? Start using fx-bin today and make your file operations faster, safer, and more efficient! 🚀