Metadata-Version: 2.4
Name: net-install-manager
Version: 0.1.1
Summary: Simple tool for managing installations of .NET console applications
License-Expression: MIT
License-File: LICENSE
Keywords: dotnet,installation,package-management,cli
Author: Thomas C. Flanagan
Author-email: t@tcflanagan.net
Requires-Python: >=3.12
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: System Administrators
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Operating System :: OS Independent
Classifier: Development Status :: 3 - Alpha
Requires-Dist: pyyaml (>=6.0.3,<7.0.0)
Requires-Dist: requests (>=2.34.2,<3.0.0)
Requires-Dist: semver (>=3.1.0,<4.0.0)
Project-URL: Homepage, https://github.com/tcfoss/net-install-manager
Project-URL: Repository, https://github.com/tcfoss/net-install-manager.git
Description-Content-Type: text/markdown

# Net Install Manager (`ninman`)

A CLI tool (installable via `pipx`) for managing installations, rollbacks, versioning, and uninstallation of .NET console applications across Linux, macOS, and Windows.

## Features

- **Source, Pre-compiled & Git Support**: Install directly from `.csproj` source, pre-compiled binaries (DLLs/EXEs), or remote Git/GitHub repositories.
- **Cross-Platform**:
  - **Linux / macOS**: Installs to `~/.local/lib/<app>/<version>` (or `/usr/local/lib` for system), atomic `current` symlinks, and launchers in `~/.local/bin`.
  - **Windows**: Installs to `%LOCALAPPDATA%\<app>\versions\<version>` (or `Program Files` for system), `current` directory junctions, and `.cmd` + bash launchers in `bin/`.
- **Version Management & Rollback**: Automatic version detection (csproj, git tags, binary `--version`), version regression checks, rollback to previous versions, and version pruning (`--versions-to-keep`).
- **Application Registry & Upgrades**: Track installed applications and upgrade them directly (`ninman upgrade <app>` or `ninman upgrade --all`), including fetching the latest Git commits/tags.

## Installation

```bash
pipx install net-install-manager
```

## CLI Usage

### Installing an Application

```bash
# Install a prebuilt asset from a GitHub release
ninman install-release owner repo --asset-pattern "{rid}-{version}"

# Install from a local .csproj file or current directory
ninman install
ninman install ./src/MyApp/MyApp.csproj
ninman install ./dist/MyApp-v1.2.0

# Install directly from GitHub / Git repository
ninman install https://github.com/owner/repo.git
ninman install owner/repo
ninman install owner/repo@v1.2.0

# Multi-project repositories: select a specific project via subpath or --project
ninman install https://github.com/owner/repo.git --project src/CliApp/CliApp.csproj
ninman install https://github.com/owner/repo/tree/main/src/CliApp
ninman install owner/repo#src/CliApp

# Install as self-contained with version pruning
ninman install --self-contained --versions-to-keep 3

# Force installation / reinstallation of older version
ninman install --force --app-version 1.0.0
```

### Application Maintenance

```bash
# Upgrade an application or all tracked applications
ninman upgrade myapp
ninman upgrade --all

# Rollback to the previous version
ninman rollback --previous myapp

# Rollback to a specific version
ninman rollback --target-version 1.1.0 myapp

# Uninstall a specific version or everything
ninman uninstall --target-version 1.0.0 myapp
ninman uninstall --all
```

### Installation Status

```bash
# List all tracked applications managed by ninman
ninman list-apps

# Describe the installation details of a given application
ninman app-details myapp

# List installed versions of a given application
ninman list-versions myapp
```

GitHub release installations discover `ninman.yml`, `ninman.yaml`, or a `.csproj` from the
unpacked release asset. Private repositories can use `NINMAN_GITHUB_TOKEN`, `GITHUB_TOKEN`, or
`GH_TOKEN`; tokens are used for requests only and are not stored in the application registry.

## Configuration (`ninman.yaml`)

```yaml
app_directory: my-app
binary_name: myapp
source_binary_name: MyApp.dll # or MyApp.exe
csproj_path: src/MyApp/MyApp.csproj # optional
```

