FurLab is a cross-platform command-line interface (CLI) built with .NET that helps developers automate repetitive development tasks. It provides commands for database operations, file management, AI tool installation (Claude Code, OpenCode), and Windows package management.
Note: This is a hobby project created for personal use. It may not follow all best practices or have comprehensive testing. Contributions and feedback are welcome, but please keep in mind this was built to solve the author's specific needs.
Developers often perform repetitive tasks that can be automated:
- Combining multiple files into one
- Installing and configuring AI development tools
- Backing up and restoring Windows packages
- Running SQL queries across multiple PostgreSQL servers
FurLab consolidates these tasks into a single, easy-to-use CLI tool.
- Database Backup: Backup PostgreSQL databases using pg_dump
- Query Execution: Run SQL queries across multiple PostgreSQL servers with interactive server selection, parallel execution, and CSV export
- Destructive Query Guard Rail: Automatic detection of INSERT, UPDATE, DELETE, ALTER, DROP, etc. with confirmation prompt
- Server Management: Add, list, remove, and test PostgreSQL servers via CLI
- File (Combine): Combine multiple files into one
- Claude Code Integration: Install and configure Claude Code CLI
- OpenCode Integration: Install and configure OpenCode CLI
- Winget Manager: Backup and restore Windows package manager packages
- Framework: .NET 10
- Language: C#
- CLI Parsing: System.CommandLine
- Database: Npgsql (PostgreSQL)
- Configuration: JSONC (furlab.jsonc)
- UI: Spectre.Console
- .NET SDK 10 or later
- Windows (required for Claude, OpenCode, and Winget commands)
dotnet tool install --global FurLabOr install from NuGet:
dotnet tool install -g FurLabgit clone https://github.com/your-repo/FurLab.git
cd FurLab
dotnet restore
dotnet builddotnet run -- --help# Run a SQL file across selected servers
FurLab query run --input query.sql
# Run an inline query
FurLab query run --command "SELECT * FROM users"
# Run with output directory
FurLab query run -i query.sql -o ./results
# Generate one CSV per server
FurLab query run -i query.sql --separate-filesOn execution, FurLab shows an interactive server selection prompt (all configured servers are pre-selected). Results are exported to CSV with columns Server, Database, <query columns>.
# List configured servers
FurLab settings db-servers ls
# Add a server interactively
FurLab settings db-servers add -i
# Add a server with flags
FurLab settings db-servers add -n dev -h localhost -p 5432 -U postgres -W mypass
# Test connection to a server
FurLab settings db-servers test -n dev
# Remove a server
FurLab settings db-servers rm -n dev# Backup with default connection settings
FurLab database backup mydb
# Backup with custom connection settings
FurLab database backup mydb --host localhost --port 5432 --username postgres --password mypassword
# Backup with custom output path
FurLab database backup mydb -o "C:\backups\mydb.backup"FurLab file combine -i "C:\temp\*.sql" -o "C:\temp\result.sql"FurLab claude installFurLab winget backup -o "C:\backup"
FurLab winget restore -i "C:\backup\backup-winget.json"FurLab stores user configuration in %LocalAppData%\FurLab\furlab.jsonc (JSONC format with comments support).
| Command | Description |
|---|---|
query run |
Execute SQL queries and export to CSV |
settings db-servers ls |
List configured servers |
settings db-servers add |
Add a server (interactive or with flags) |
settings db-servers rm |
Remove a server |
settings db-servers test |
Test server connection |
database backup |
Backup PostgreSQL database |
file combine |
Combine multiple files into one |
claude |
Claude Code integration |
opencode |
OpenCode CLI integration |
winget |
Windows package manager |
| Option | Description |
|---|---|
-i, --input <file> |
SQL input file |
-c, --command <sql> |
Inline SQL query (mutually exclusive with -i) |
-o, --output <path> |
Output file or directory |
--separate-files |
One CSV per server (default: single consolidated file) |
--all, -a |
Query all databases on server |
--exclude <dbs> |
Comma-separated databases to exclude |
--no-confirm |
Skip destructive query confirmation |
- Consolidated (default): Single file with columns
Server, Database, <query columns> - Separate files (
--separate-files): One file per server (<server>_<timestamp>.csv) - Errors are logged to the terminal, not included in CSV
Queries containing INSERT, UPDATE, DELETE, ALTER, DROP, CREATE, TRUNCATE, MERGE, GRANT, REVOKE, or SET ROLE trigger a confirmation prompt before execution. Use --no-confirm to skip in CI/scripts.
For more detailed information, see:
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Please ensure all tests pass and code follows the project's coding standards.
This project is licensed under the MIT License - see the LICENSE file for details.
🇺🇸 English (default)
🇧🇷 Portuguese: README.pt-BR.md
{ // PostgreSQL servers configuration "servers": [ { "name": "dev", // Unique identifier "host": "localhost", "port": 5432, "username": "postgres", "password": "mypassword", "databases": ["mydb", "app_dev"], "sslMode": "Prefer", "timeout": 30, "commandTimeout": 300, "maxParallelism": 4 }, { "name": "prod", "host": "prod-db.company.com", "port": 5432, "username": "readonly", "password": "secret", "fetchAllDatabases": true, "excludePatterns": ["template*", "postgres"], "sslMode": "Require" } ], // Default settings "defaults": { "outputFormat": "csv", "outputDirectory": "./results", "fetchAllDatabases": false, "requireConfirmation": true, "maxParallelism": 4 } }