https://github.com/alexandretrotel/mntn
A command-line tool to manage your dotfiles.
https://github.com/alexandretrotel/mntn
backup cli dotfiles linux macos windows
Last synced: 4 days ago
JSON representation
A command-line tool to manage your dotfiles.
- Host: GitHub
- URL: https://github.com/alexandretrotel/mntn
- Owner: alexandretrotel
- License: gpl-3.0
- Created: 2025-05-22T17:46:23.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2026-05-31T10:21:05.000Z (about 1 month ago)
- Last Synced: 2026-05-31T11:23:22.937Z (about 1 month ago)
- Topics: backup, cli, dotfiles, linux, macos, windows
- Language: Rust
- Homepage: https://crates.io/crates/mntn
- Size: 11.2 MB
- Stars: 12
- Watchers: 1
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- awesome-ccamel - alexandretrotel/mntn - A command-line tool to manage your dotfiles. (Rust)
README
# mntn
mntn is built to keep your dotfiles organized, safe, and consistent across machines using profiles.
A profile is a named set of configuration choices that represents a context, like work, personal, or minimal. With profiles, you can keep multiple setups and switch between them so the right settings are active for the situation.
At a high level, mntn helps you manage these configurations, keep them in sync, and recover them when needed.

## Quick Start
```bash
mntn backup
mntn restore
mntn doctor
```
Switch profiles:
```bash
mntn profile create work --description "Work setup"
mntn use work
```
## Core Commands
- `backup` - copy tracked configs into `~/.mntn/backup/`
- `restore` - restore configs from backup
- `doctor` - check registry files and config drift; `doctor fix` reformats valid JSON configs with serde_json's pretty printer (it cannot repair true syntax errors, only normalize formatting)
- `secret` - store (`secret set`) or remove (`secret delete`) the encryption passphrase in the OS keychain so `backup` / `restore` / `doctor` can reuse it without prompting
- `profile` - list/create/delete profiles
- `use` - switch active profile
- `git` - run any git command inside `~/.mntn`
- `sync` - run `git add .`, commit with default message `chore: sync mntn (YYYY-MM-DD HH:MM:SS UTC)` (use `--message` to override), then `git push` inside `~/.mntn`
Encrypted configs: run `mntn secret set` after you know your passphrase to persist it. Use `--ask-password` on `backup`, `restore`, or `doctor` if you want to type it for that run only.
## Directory Layout
```text
~/.mntn/
├── backup/
│ ├── common/
│ │ └── encrypted/ # optional: encrypted bundle + legacy per-file .age
│ └── profiles/
│ └── /
│ └── encrypted/
├── profiles.json
├── .active-profile
├── config.registry.json
├── package.registry.json
└── encrypted.registry.json
```
Registry notes:
- `config.registry.json` tracks regular dotfiles and their targets.
- `package.registry.json` tracks package managers and how to export package lists.
- `encrypted.registry.json` tracks sensitive files that are stored encrypted.
## License
GNU General Public License v3.0 or later (GPL-3.0-or-later), published by the Free Software Foundation.