A cross-platform CLI tool for installing development and cybersecurity tools
Project description
Blacksmith ๐จ
A cross-platform CLI tool that automates the installation of development and cybersecurity tools after a fresh OS install.
โจ Features
- ๐ฏ Pre-made tool sets - Choose from curated sets of development or cybersecurity tools
- ๐ ๏ธ Custom configurations - Create your own sets or use custom config files
- ๐ Unified package search - Search across all selected managers simultaneously with multi-select support
- ๐ Cross-platform sets - Define sets that work on Windows, Linux, or both with OS-specific manager preferences
- ๐ฆ Multiple package managers - Supports apt, yum, pacman, winget, chocolatey, scoop, snap, and flatpak
- ๐ฏ Smart manager selection - Automatically uses preferred package managers with intelligent fallback
- โจ Beautiful CLI - Clean, intuitive interface with progress indicators and helpful feedback
- ๐จ Custom color scheme - Elegant purple and cyan theme
- โก Fast installation - Automatically detects and uses the best package manager for each tool
- โ Package validation - Verify package names before installation
- ๐ค Export functionality - Export sets to native package manager formats (Winget JSON, Chocolatey XML, etc.)
- ๐ Update support - Check for installed packages and update them when available
- ๐ Set information - View detailed information about sets including OS compatibility and manager preferences
๐ Prerequisites
- Python 3.8 or higher
- One or more supported package managers installed on your system
- Administrator/sudo privileges (for system-wide installations)
๐ Quick Start
Linux - One-Line Install
# User installation (recommended, no sudo required)
curl -fsSL https://raw.githubusercontent.com/jimididit/blacksmith/main/install.sh | bash
# Global installation (requires sudo)
curl -fsSL https://raw.githubusercontent.com/jimididit/blacksmith/main/install.sh | sudo bash
Windows
# PowerShell one-liner
irm https://raw.githubusercontent.com/jimididit/blacksmith/main/install.ps1 | iex
Install from PyPI
# Global installation
pip install jdi-blacksmith
# Or for current user only (no admin required)
pip install --user jdi-blacksmith
Manual Installation (from source)
- Clone the repository:
git clone https://github.com/jimididit/blacksmith.git
cd blacksmith
- Install using pip:
# Global installation (recommended)
pip install -e .
# Or for current user only (no admin required)
pip install --user -e .
- Verify installation:
blacksmith --version
๐ Usage
Quick Command Reference
# Interactive mode (shows menu)
blacksmith
# List available sets with OS compatibility
blacksmith list
# View detailed set information
blacksmith info <set_name>
# Install a set
blacksmith install <set_name>
# Create a custom set
blacksmith create
# Search for packages
blacksmith search <query> [--manager <name>]
# Export set to native format
blacksmith export <set_name> --format <format>
# Validate a config file
blacksmith validate <path>
# Uninstall Blacksmith
blacksmith uninstall
Interactive Mode
The easiest way to use Blacksmith is through the interactive menu:
blacksmith
This will display a beautiful banner and an interactive menu to select and install tool sets.
List Available Sets
View all available sets with OS compatibility indicators:
blacksmith list
The list shows:
- Set name and description
- OS compatibility badges (๐ช Windows, ๐ง Linux, ๐ macOS)
- Preferred package managers
- Package count
- Compatibility status with your current OS
Install Pre-made Sets
# List available sets
blacksmith list
# Install a specific set
blacksmith install development
blacksmith install cybersecurity
blacksmith install minimal
Install from Custom Config
blacksmith install --file path/to/your-config.yaml
Create Your Own Set
# Standard mode (cross-platform, multi-manager)
blacksmith create
# Advanced mode (single-OS, single-manager sets)
blacksmith create --advanced
This launches an interactive wizard to create a custom tool set configuration. The wizard includes:
- OS selection: Choose Windows, Linux, or both for cross-platform sets
- Manager selection: Select which package managers to target for each OS
- Unified search: Search across all selected managers simultaneously - see results from all managers at once
- Multi-select: Select packages from multiple managers in one go using checkboxes
- Smart grouping: Automatically groups the same package from different managers
- Real-time validation: Verify package names before adding them
- Export ready: Sets are saved with OS compatibility and manager preferences for optimal installation
Search for Packages
Search for packages across all available package managers:
# Search across all managers
blacksmith search docker
# Search in a specific package manager (supports aliases)
blacksmith search git --manager winget
blacksmith search git --manager choco # Alias for chocolatey
# Limit results
blacksmith search python --limit 5
Features:
- Real-time results: Queries each package manager directly for up-to-date results
- Manager aliases: Use
chocoforchocolatey,dnfforyum, etc. - OS-aware errors: Clear messages when requesting OS-specific managers (e.g.,
apton Windows) - Unified display: Results grouped by manager with descriptions
This is especially useful when creating custom sets, as it ensures you use the correct package names for each package manager.
View Set Information
Get detailed information about a set, including OS compatibility and manager preferences:
# View info about a pre-made set
blacksmith info development
blacksmith info cybersecurity
# View info about a custom config file
blacksmith info --file path/to/config.yaml
Export Sets
Export sets to native package manager formats for use outside of Blacksmith:
# Export to Winget JSON format
blacksmith export development --format winget
# Export to Chocolatey packages.config
blacksmith export development --format chocolatey
# Export to Apt text list
blacksmith export development --format apt
# Export with custom output file
blacksmith export development --format winget --output my-packages.json
Supported formats:
winget- JSON array of package IDschocolatey/choco- XML packages.config formatapt- Plain text listpacman- Plain text listscoop- JSON array
Validate Configuration Files
blacksmith validate path/to/config.yaml
Installation Options
# Skip already installed packages
blacksmith install development --skip-installed
# Prefer a specific package manager (overrides set preferences)
blacksmith install development --prefer winget
# Force installation even if OS doesn't match set's target_os
blacksmith install development --force
Uninstall Blacksmith
# Using the CLI
blacksmith uninstall
# Or using the uninstall script
# Linux:
curl -fsSL https://raw.githubusercontent.com/jimididit/blacksmith/main/uninstall.sh | bash
# Windows:
irm https://raw.githubusercontent.com/jimididit/blacksmith/main/uninstall.ps1 | iex
๐ Configuration Format
Blacksmith uses YAML configuration files with support for cross-platform sets. Here's an example:
Basic Format (Backward Compatible)
name: "My Custom Set"
description: "My favorite development tools"
packages:
- name: git
managers:
apt: git
pacman: git
winget: Git.Git
chocolatey: git
scoop: git
- name: docker
managers:
apt: docker.io
pacman: docker
yum: docker
winget: Docker.DockerDesktop
Advanced Format (Cross-Platform)
name: "Cross-Platform Dev Tools"
description: "Development tools for Windows and Linux"
target_os: ["windows", "linux"] # OS compatibility
preferred_managers: # Manager preferences per OS
windows: ["winget", "chocolatey"]
linux: ["apt", "flatpak"]
managers_supported: # Limit to specific managers
- winget
- chocolatey
- apt
- flatpak
packages:
- name: git
managers:
winget: Git.Git
chocolatey: git
apt: git
flatpak: org.gnome.gitg
Configuration Fields:
name(required) - Set namedescription(optional) - Set descriptiontarget_os(optional) - List of target OSes:["windows"],["linux"], or["windows", "linux"]preferred_managers(optional) - Dictionary mapping OS to preferred manager ordermanagers_supported(optional) - List of managers to limit installation topackages(required) - List of packages with manager-specific IDs
๐ฆ Supported Package Managers
Linux
- apt - Debian/Ubuntu
- yum/dnf - RHEL/Fedora
- pacman - Arch Linux
- snap - Universal Linux packages
- flatpak - Application sandboxing
Windows
- winget - Windows Package Manager
- chocolatey - Windows package manager
- scoop - Command-line installer
Smart Manager Selection:
Blacksmith automatically detects which package managers are available on your system and uses intelligent selection:
- Preference-based: Uses
preferred_managersfrom the set configuration if specified - OS-specific defaults: Falls back to sensible defaults (e.g.,
winget>chocolatey>scoopon Windows) - Fallback logic: If preferred manager isn't available, tries the next one in order
- OS compatibility: Checks if the set is compatible with your OS (can be overridden with
--force) - Manager filtering: Respects
managers_supportedto limit which managers are considered
๐ macOS Support (Future)
macOS support is planned for a future release. While the codebase includes some macOS compatibility (OS detection, install scripts), full support is not yet available.
Planned features for macOS:
- Homebrew package manager integration
- MacPorts support (optional)
- Native macOS package installation workflows
- Full compatibility with macOS-specific tool installations
If you're interested in contributing macOS support, please check out our Contributing section or open an issue to discuss!
๐จ Pre-made Sets
Development
Essential development tools including Git, Docker, VS Code, Python, Node.js, and more.
Cybersecurity
Security and penetration testing tools including Nmap, Wireshark, Metasploit, Burp Suite, and more.
Minimal
Lightweight setup with just the essentials: Git, curl, and Vim.
๐ ๏ธ Development
Setup Development Environment
# Clone the repository
git clone https://github.com/jimididit/blacksmith.git
cd blacksmith
# Create a virtual environment
python -m venv venv
# Activate it
# On Linux/Mac:
source venv/bin/activate
# On Windows:
venv\Scripts\activate
# Install in development mode
pip install -e .
# Install development dependencies (for testing and code quality)
pip install pytest pytest-cov pytest-mock ruff black mypy yamllint
Project Structure
blacksmith/
โโโ blacksmith/
โ โโโ cli.py # Main CLI interface
โ โโโ config/ # Configuration system
โ โ โโโ loader.py # Config file loading
โ โ โโโ parser.py # YAML parsing
โ โ โโโ preferences.py # Manager preference system
โ โ โโโ validator.py # Config validation
โ โโโ export/ # Export functionality
โ โ โโโ base.py # Base exporter class
โ โ โโโ winget.py # Winget JSON exporter
โ โ โโโ chocolatey.py # Chocolatey XML exporter
โ โ โโโ apt.py # Apt list exporter
โ โ โโโ pacman.py # Pacman list exporter
โ โ โโโ scoop.py # Scoop JSON exporter
โ โโโ package_managers/ # Package manager implementations
โ โโโ sets/ # Pre-made tool sets
โ โโโ utils/ # Utility modules
โ โโโ os_detector.py # OS detection
โ โโโ ui.py # UI helpers (Rich)
โโโ tests/ # Test suite
โโโ scripts/ # Helper scripts
โ โโโ bump_version.py # Version bumping script
โโโ install.sh # Installation script
โโโ uninstall.sh # Uninstallation script
โโโ README.md
Version Management
Blacksmith uses Semantic Versioning (SemVer): MAJOR.MINOR.PATCH
- PATCH (0.1.0 โ 0.1.1): Bug fixes, security patches
- MINOR (0.1.0 โ 0.2.0): New features (backward compatible)
- MAJOR (0.2.0 โ 1.0.0): Breaking changes, first stable release
Quick version bump:
# Bump patch version (0.1.0 -> 0.1.1)
python scripts/bump_version.py --patch
# Bump minor version (0.1.0 -> 0.2.0)
python scripts/bump_version.py --minor
# Bump major version (0.1.0 -> 1.0.0)
python scripts/bump_version.py --major
# Or set a specific version
python scripts/bump_version.py 0.1.1
Manual version update:
Update the version in both pyproject.toml and blacksmith/__init__.py, then:
git tag -a v0.1.1 -m "Release version 0.1.1"
git push origin v0.1.1
๐ค Contributing
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
Getting Started
- Fork the repository
- Clone your fork:
git clone https://github.com/your-username/blacksmith.git - Create a feature branch:
git checkout -b feature/AmazingFeature - Set up your development environment (see the Development section above)
Development Workflow
- Make your changes
- Run tests locally (see Testing below)
- Ensure code quality checks pass (see Code Quality below)
- Commit your changes:
git commit -m 'Add some AmazingFeature' - Push to your fork:
git push origin feature/AmazingFeature - Open a Pull Request
Testing
Before submitting a PR, please ensure all tests pass:
# Install test dependencies
pip install pytest pytest-cov pytest-mock
# Run all tests
pytest tests/ -v
# Run with coverage
pytest tests/ -v --cov=blacksmith --cov-report=term
# Run specific test file
pytest tests/test_cli.py -v
Code Quality
We use several tools to maintain code quality. Please ensure your code passes these checks:
# Install development dependencies
pip install ruff black mypy yamllint
# Linting (check for errors)
ruff check blacksmith/
# Formatting (check if code is formatted)
ruff format --check blacksmith/
# Auto-fix linting issues
ruff check --fix blacksmith/
# Auto-format code
ruff format blacksmith/
# Type checking
mypy blacksmith/ --ignore-missing-imports
# YAML linting
yamllint blacksmith/sets/*.yaml
Adding New Package Managers
To add support for a new package manager:
- Create a new file in
blacksmith/package_managers/(e.g.,brew.py) - Inherit from
PackageManagerbase class inblacksmith/package_managers/base.py - Implement required methods:
is_available()- Check if the package manager is installedinstall(packages)- Install packagesis_installed(package)- Check if a package is installedsearch(query)- Search for packagesupdate_package(package)- Update a single package (optional but recommended)
- Register it in
blacksmith/package_managers/detector.py - Add it to the default preferences in
blacksmith/config/preferences.pyif applicable - Add tests in
tests/test_package_managers.py
Adding New Tool Sets
To add a new pre-made tool set:
- Create a new YAML file in
blacksmith/sets/(e.g.,gaming.yaml) - Follow the existing format (see
blacksmith/sets/development.yamlfor reference) - Include package names for all supported package managers
- Optionally add cross-platform fields:
target_os- List of target OSes (e.g.,["windows", "linux"])preferred_managers- OS-specific manager preferencesmanagers_supported- Limit to specific managers
- Ensure YAML syntax is valid:
yamllint blacksmith/sets/gaming.yaml - Test loading the set:
blacksmith listshould show your new set - Test the
infocommand:blacksmith info gamingshould display correctly
Reporting Bugs
When reporting bugs, please include:
- Operating system and version
- Python version
- Blacksmith version (
blacksmith --version) - Steps to reproduce
- Expected vs actual behavior
- Error messages or logs (if applicable)
Feature Requests
For feature requests, please:
- Open an issue describing the feature
- Explain the use case and benefits
- Discuss implementation approach (if you have ideas)
- Consider contributing the feature yourself!
Code Style Guidelines
- Follow PEP 8 style guide
- Use type hints where possible
- Write docstrings for all functions and classes
- Keep functions focused and small
- Add comments for complex logic
- Use meaningful variable and function names
๐ License
This project is licensed under the Apache 2.0 License - see the LICENSE file for details.
๐ค Author
jimididit
- GitHub: @jimididit
- Instagram: @jimididit
- YouTube: @jimididit
- TikTok: @jimididit
- Website: www.jimididit.com
- Discord: NรKTURNAL COMMUNITY
๐ Acknowledgments
- Built with Click for CLI framework
- Beautiful terminal output powered by Rich
- Interactive prompts with Questionary
๐ Additional Resources
โญ If you find this project helpful, please consider giving it a star on GitHub!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file jdi_blacksmith-0.2.1.tar.gz.
File metadata
- Download URL: jdi_blacksmith-0.2.1.tar.gz
- Upload date:
- Size: 40.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
915e97f8ec3cff811798026f332592f2d232d93ad59a2e3986b836eac3aa9601
|
|
| MD5 |
8ba9d0c21ccd21fd74122317b2be4260
|
|
| BLAKE2b-256 |
0828570ae9eea463b3bc97c756167bd77d8a103cdf63563cfa89db66f07280f1
|
File details
Details for the file jdi_blacksmith-0.2.1-py3-none-any.whl.
File metadata
- Download URL: jdi_blacksmith-0.2.1-py3-none-any.whl
- Upload date:
- Size: 29.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b2288bacdeb00a2e74d92aacc799820decfc313a9d311455d7b175b8e07a9778
|
|
| MD5 |
6e73162d7e99d79343b5d0f206415ebe
|
|
| BLAKE2b-256 |
e1b43b0b5bdf0e971dd11bae2435fda9c712f63ef6daa8003510f6919b113d26
|