Metadata-Version: 2.4
Name: inc
Version: 0.1.21
Summary: install new computer
Keywords: python
Author-email: joamatab <4514346+joamatab@users.noreply.github.com>
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Operating System :: OS Independent
License-File: LICENSE
Requires-Dist: tomli; python_version < '3.11'
Requires-Dist: typer
Requires-Dist: mypy ; extra == "dev"
Requires-Dist: pre-commit ; extra == "dev"
Requires-Dist: pytest ; extra == "dev"
Requires-Dist: pytest-cov ; extra == "dev"
Requires-Dist: pytest_regressions ; extra == "dev"
Requires-Dist: ruff ; extra == "dev"
Requires-Dist: autodoc_pydantic ; extra == "docs"
Requires-Dist: jupyter-book>=0.15.1,<2 ; extra == "docs"
Requires-Dist: tbump ; extra == "maintainer"
Requires-Dist: towncrier ; extra == "maintainer"
Requires-Dist: ruff ; extra == "maintainer"
Provides-Extra: dev
Provides-Extra: docs
Provides-Extra: maintainer

# Install new computer (inc) 0.1.21

Install basic software for different operating systems:

[See documentation](https://install-new-computer.readthedocs.io/en/latest/)

## Installation for users

First install [uv](https://docs.astral.sh/uv/):

```
curl -LsSf https://astral.sh/uv/install.sh | sh
```

Then install `inc`:

```
uv tool install inc --python 3.12
```

## Usage

```
inc --help
```

### Update inc

When installed with `uv tool install`, update to the latest release with:

```bash
inc self update
```

### List available scripts

```
inc ls
```

Example output:
```
Available bash scripts:
  conda_python311
  conda_python312
  dotfiles
  gmsh
  new_mac
```

### Run a script

```
inc run <script_name>
```

For example, to install gmsh:
```
inc run gmsh
```

To see what a script would do without running it:
```
inc run gmsh --dry-run
```

### Install applications

Install an individual application with the native package manager:

```bash
inc apps install gh
```

For the same short workflow used by the script runner, catalog applications are
also available through `inc run` and appear in its completion list:

```bash
inc run gh
```

App and profile names support shell completion after running
`inc --install-completion`. For example, type `inc apps install g` and press Tab.

Preview the command without installing anything:

```bash
inc apps install gh --dry-run
```

Install a predefined group of applications without confirmation:

```bash
inc apps install --profile core --yes
inc apps install --profile dev --yes
```

Inspect the catalog and current installation state:

```bash
inc apps list
inc apps status
inc doctor
```

Applications and platform package mappings are declared in `inc/apps.toml`.
The supported package families are Arch/Manjaro, Debian/Ubuntu, Fedora/RHEL,
openSUSE, macOS/Homebrew, and Windows/WinGet.

### View script contents

```
inc cat <script_name>
```
## Installation for developers

```
git clone https://github.com/joamatab/install_new_computer.git ~/install_new_computer
cd ~/install_new_computer
uv sync
```

Install the local checkout as an editable command that works from any directory:

```bash
just tool-install
just tool-check
```

For MacOs type this into a terminal first:

```
xcode-select --install
```

## Testing the Mac setup flow

```bash
uv sync --extra dev
uv run pytest
```

`tests/test_mac_setup.py` runs the setup scripts with temporary home directories,
local Git repositories, and substitutes for system-changing commands. It covers
sudo authorization, Fish returning to setup, dotfiles cloning and updates,
package failures, and paths with spaces. When Fish is installed, it also checks
the installer arguments with the real executable. CI installs Fish for this check.

These tests do not install the full application list or change macOS settings.
Before relying on a release for a fresh computer, also run `inc run new_mac` on a
disposable Mac or macOS VM and confirm the dotfiles links and applications work.

## References

- [my dotfiles wiki](https://github.com/joamatab/dotfiles/wiki)
- [my dotfiles](https://github.com/joamatab/dotfiles)
- [mac CLI](https://github.com/guarinogabriel/mac-cli)
- https://github.com/jaywcjlove/awesome-mac.git
- https://www.stuartellis.name/articles/mac-setup/
- https://dotfiles.github.io/
- https://github.com/atomantic/dotfiles
- https://sourabhbajaj.com/mac-setup/
- https://github.com/gotbletu
- https://lukesmith.xyz/
- http://www.openvim.com/tutorial.html

