Metadata-Version: 2.4
Name: imprint-cli
Version: 1.0.0
Summary: Stamp your developer environment on any machine
Project-URL: Homepage, https://github.com/yourname/imprint
Project-URL: Repository, https://github.com/yourname/imprint
Project-URL: Bug Tracker, https://github.com/yourname/imprint/issues
License: MIT
Keywords: cli,developer,devtools,dotfiles,environment,portable
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Utilities
Requires-Python: >=3.11
Requires-Dist: click>=8.1.7
Requires-Dist: gitpython>=3.1.43
Requires-Dist: platformdirs>=4.2.0
Requires-Dist: rich>=13.7.0
Requires-Dist: tomli-w>=1.0.0
Provides-Extra: dev
Requires-Dist: pytest-cov>=5.0.0; extra == 'dev'
Requires-Dist: pytest>=8.0.0; extra == 'dev'
Requires-Dist: ruff>=0.4.0; extra == 'dev'
Description-Content-Type: text/markdown

# 🔏 Imprint

**Stamp your developer environment on any machine.**

One command to snapshot everything — dotfiles, VS Code extensions, packages, shell config, custom scripts.  
One command to restore on any new machine.

```bash
# Clone the repository and install locally
git clone https://github.com/Hina/imprint.git
cd imprint
pip install .
```

## The Problem

You have your machine perfectly set up. VS Code with 30 extensions. Your `.zshrc` with 50 aliases. Python, Node, custom scripts, fonts. Then you sit at a new machine and spend **3–6 hours** rebuilding everything from memory.

**Imprint fixes this in two commands:**

```bash
imp snapshot    # Captures EVERYTHING on this machine
imp restore     # Restores EVERYTHING on the new machine
```

## Quick Start

### On Your Current Machine

```bash
# In the Imprint source directory
pip install .
imp snapshot
```

This captures your complete environment into `~/.imprint/` and optionally pushes to your private GitHub repo.

### On a New Machine

```bash
git clone https://github.com/Hina/imprint.git
cd imprint
pip install .
imp restore https://github.com/yourname/imprint-config
```

Done. Everything restored.

### Day-to-Day

```bash
imp diff      # See what's changed since last snapshot
imp update    # Save changes and push
imp status    # Quick overview of what's tracked
```

## What Gets Captured

| Category | Details |
|---|---|
| **Dotfiles** | `.zshrc`, `.bashrc`, `.gitconfig`, `.vimrc`, `.tmux.conf`, `.editorconfig`, PowerShell profiles |
| **VS Code** | All extensions list + `settings.json` |
| **Packages** | pip (global), npm (global), apt / brew / winget |
| **Shell** | Type, version, framework (oh-my-zsh), theme, plugins, alias count |
| **Git** | `user.name`, `user.email`, editor, default branch |
| **Scripts** | Everything in `~/bin/` |
| **System** | Python version, Node version, Git version, OS info |

## Tech Stack

| Layer | Technology |
|---|---|
| CLI | Click 8.x |
| Terminal UI | Rich (spinners, tables, colors) |
| Config | TOML (tomllib + tomli_w) |
| Git | GitPython |
| Platform | Linux, macOS, Windows, WSL |

## Architecture

```
imprint/
├── cli.py              ← Click CLI — snapshot, restore, diff, update, status
├── config.py           ← ImprintConfig — manages ~/.imprint/
├── manifest.py         ← environment.toml read/write
├── snapshot.py         ← Orchestrates all collectors
├── restore.py          ← Orchestrates all installers
├── diff.py             ← Compare current vs saved
├── collectors/
│   ├── system.py       ← Python/Node/Git versions
│   ├── dotfiles.py     ← Find dotfiles in $HOME
│   ├── vscode.py       ← Extensions + settings.json
│   ├── shell.py        ← Shell type, framework, plugins
│   ├── packages.py     ← pip/npm/apt/brew/winget
│   ├── git_config.py   ← Git config values
│   └── scripts.py      ← ~/bin/ scripts
├── installers/
│   ├── dotfiles.py     ← Symlink dotfiles
│   ├── vscode.py       ← Install extensions
│   ├── packages.py     ← Install packages
│   ├── shell.py        ← Shell setup guidance
│   └── scripts.py      ← Restore ~/bin/
└── utils/
    ├── platform.py     ← OS detection (Linux/macOS/Windows/WSL)
    ├── safety.py       ← .imprintignore filtering
    ├── display.py      ← Rich console helpers
    └── git.py          ← GitPython wrapper
```

## Security

Imprint **never** captures sensitive files. The `.imprintignore` system blocks:

- SSH keys (`.ssh/id_*`, `*.pem`, `*.key`)
- Tokens and secrets (`*.token`, `*secret*`, `*api_key*`)
- Environment files (`.env`, `.env.*`)
- Cloud credentials (`.aws/credentials`, `.gcloud/`, `.kube/`)
- Shell history (`.bash_history`, `.zsh_history`)
- GPG keys (`.gnupg/`)

These patterns are **hard-coded** and cannot be overridden.

## Testing

```bash
pip install -e ".[dev]"
python -m pytest tests/ -v
```

## License

MIT
