All notable changes to SlimStack will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
0.1.0 - 2026-01-23
Initial release of SlimStack - Dependency hygiene and waste elimination CLI tool.
-
Python Analysis
- AST-based import detection for Python source files
- pip freeze parsing for installed package detection
- Package classification (used, unused, transitive-only)
- Import-to-package mapping for common packages (PIL, cv2, sklearn, etc.)
- Virtual environment detection and protection
-
Node.js Analysis
- package.json parsing for declared dependencies
- Regex-based require() and import detection
- Support for ESM imports and dynamic imports
- node_modules size estimation
- devDependencies tracking
-
Disk Usage Analysis
- Ecosystem-based disk usage visualization
- Project-based grouping option
- Python virtual environment detection
- Node.js node_modules detection
- Docker image size reporting (read-only)
- ASCII bar chart rendering
-
CLI Commands
slim version- Display versionslim help- Show usage helpslim man- Display detailed manualslim scan -py- Scan Python dependenciesslim scan -node- Scan Node.js dependenciesslim prune -py- Remove unused Python packagesslim prune -node- Remove unused Node packagesslim disk- Disk usage analysisslim docker- Dockerfile security and optimization analysis
-
Dockerfile Analysis (NEW)
- Security anti-pattern detection (secrets in ENV, running as root, etc.)
- Hardened image recommendations (Chainguard, Alpine, distroless)
- Multi-stage build detection
- Best practice suggestions (HEALTHCHECK, COPY vs ADD, etc.)
- Severity filtering and security-only mode
- JSON output for CI/CD pipelines
-
Safety Features
- Read-only scan operations by default
- Dry-run mode for prune commands (default)
- Confirmation prompts for destructive actions
- Virtual environment requirement for Python pruning
- Protected packages (pip, setuptools, wheel)
-
Output Formats
- Human-readable ASCII tables and charts
- JSON output (
--jsonflag) for CI/CD integration - ANSI color support with automatic TTY detection
-
Documentation
- Comprehensive README with usage examples
- Unix man page (
man slim) - Built-in manual (
slim man)
0.2.0 - 2026-03-08
Major release with bug fixes, new features, performance improvements, and 205 unit tests.
- Broken
slim dockercommand —is_already_optimizedimport was missing fromdocker_images.py - Hardened image detection —
is_hardened_image()never matched Chainguard/distroless registries due to prefix comparison bug
-
Configuration file support (
.slimrc.toml)- Exclude packages, set default flags, per-ecosystem settings
- Walks up directory tree, falls back to home directory
[python],[node],[docker],[defaults]sections
-
CI integration
--fail-on-unusedflag returns exit code 1 when unused packages found- Configurable via
.slimrc.toml:fail_on_unused = true - GitHub Actions workflow template (
.github/workflows/slimstack.yml) - Pre-commit hooks (
.pre-commit-hooks.yaml)
-
Cache cleanup command (
slim clean)- Scans for
__pycache__,.pytest_cache,.mypy_cache,.ruff_cache,.next,node_modules/.cache - Dry-run by default,
--forceto delete,-ifor interactive selection --include-buildsfor dist/build/out directories
- Scans for
-
Declared dependency parsing
requirements.txtparsing with version spec supportpyproject.tomlparsing (PEP 621 + Poetry format)- Warns about "declared but not installed" packages
- Shows "installed but not declared" in verbose mode
-
Transitive dependency analysis
- Builds reverse dependency graph via
importlib.metadata - Classifies packages as directly-used, transitive-only, or truly unused
- Builds reverse dependency graph via
-
CLI enhancements
--verbose/--quietglobal flags--exclude PKG ...for scan and prune commands- Animated progress spinner for long operations
.dockerignore-aware COPY . . warning (downgraded to info when present)
-
Test suite — 205 unit tests across 8 test files
- Tests for utils, docker_images, python_scanner, node_scanner, docker_scanner, config_loader, deps_parser, cache_scanner
- Python scanning uses
importlib.metadatainstead ofpip freezesubprocess — instant, no 30s timeout - Import-to-package mappings expanded from 15 to 55+ entries (ML, web, database, crypto, DevOps, utilities)
- Node.js scanner uses
bisect-based line offset index — O(log n) lookups instead of O(n×m) IMPORT_TO_PACKAGEmoved from function-local to module-level constant- Added
pytestto optional dev dependencies inpyproject.toml
- Monorepo support (pnpm-workspace, lerna)
- Interactive prune mode with arrow-key selection
- Yarn/pnpm package manager support