dotfiles-cli 0.2.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- dotfiles_cli-0.2.4/.gitignore +11 -0
- dotfiles_cli-0.2.4/CLAUDE.md +37 -0
- dotfiles_cli-0.2.4/PKG-INFO +135 -0
- dotfiles_cli-0.2.4/README.md +107 -0
- dotfiles_cli-0.2.4/pyproject.toml +54 -0
- dotfiles_cli-0.2.4/src/dotfiles_cli/__init__.py +5 -0
- dotfiles_cli-0.2.4/src/dotfiles_cli/cli.py +935 -0
- dotfiles_cli-0.2.4/uv.lock +237 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# CLAUDE.md
|
|
2
|
+
|
|
3
|
+
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
|
4
|
+
|
|
5
|
+
## Build and Development
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
# install dependencies (dev)
|
|
9
|
+
uv sync --dev
|
|
10
|
+
|
|
11
|
+
# run the cli locally
|
|
12
|
+
uv run dotfiles --help
|
|
13
|
+
|
|
14
|
+
# lint
|
|
15
|
+
uv run ruff check src/
|
|
16
|
+
uv run ruff format src/
|
|
17
|
+
|
|
18
|
+
# run tests (no tests exist yet)
|
|
19
|
+
uv run pytest
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Architecture
|
|
23
|
+
|
|
24
|
+
Single-file CLI tool (`src/dotfiles_cli/cli.py`) built with click and rich. Commands wrap git operations for managing dotfiles with dotbot.
|
|
25
|
+
|
|
26
|
+
**Key functions:**
|
|
27
|
+
- `get_dotfiles_dir()` - resolves dotfiles location from `DOTFILES_DIR` env or defaults to `~/repos/.dotfiles`
|
|
28
|
+
- `run_cmd()` - subprocess wrapper with rich output formatting
|
|
29
|
+
- `get_config_file()` - returns platform-specific dotbot config (windows vs linux/mac)
|
|
30
|
+
|
|
31
|
+
**Commands:** install, sync, status, update, push, edit
|
|
32
|
+
|
|
33
|
+
## Configuration
|
|
34
|
+
|
|
35
|
+
- Default dotfiles location: `~/repos/.dotfiles`
|
|
36
|
+
- Override via `DOTFILES_DIR` environment variable
|
|
37
|
+
- Platform detection chooses `install-windows.conf.yaml` vs `install.conf.yaml` for dotbot
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: dotfiles-cli
|
|
3
|
+
Version: 0.2.4
|
|
4
|
+
Summary: CLI tool to sync and manage dotfiles across machines
|
|
5
|
+
Project-URL: Homepage, https://github.com/FlynnOConnell/dotfiles-cli
|
|
6
|
+
Project-URL: Repository, https://github.com/FlynnOConnell/dotfiles-cli
|
|
7
|
+
Author-email: Flynn OConnell <flynnoconnell@gmail.com>
|
|
8
|
+
License-Expression: MIT
|
|
9
|
+
Keywords: cli,configuration,dotfiles,sync
|
|
10
|
+
Classifier: Development Status :: 4 - Beta
|
|
11
|
+
Classifier: Environment :: Console
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
14
|
+
Classifier: Operating System :: OS Independent
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Classifier: Topic :: System :: Systems Administration
|
|
20
|
+
Classifier: Topic :: Utilities
|
|
21
|
+
Requires-Python: >=3.10
|
|
22
|
+
Requires-Dist: click>=8.0
|
|
23
|
+
Requires-Dist: rich>=13.0
|
|
24
|
+
Provides-Extra: dev
|
|
25
|
+
Requires-Dist: pytest>=7.0; extra == 'dev'
|
|
26
|
+
Requires-Dist: ruff>=0.1; extra == 'dev'
|
|
27
|
+
Description-Content-Type: text/markdown
|
|
28
|
+
|
|
29
|
+
# dotfiles-cli
|
|
30
|
+
|
|
31
|
+
CLI tool to sync and manage dotfiles across machines. Works with [dotbot](https://github.com/anishathalye/dotbot).
|
|
32
|
+
|
|
33
|
+
## Installation
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
# with uv (recommended)
|
|
37
|
+
uvx dotfiles-cli
|
|
38
|
+
|
|
39
|
+
# or install globally
|
|
40
|
+
uv tool install dotfiles-cli
|
|
41
|
+
|
|
42
|
+
# or with pip
|
|
43
|
+
pip install dotfiles-cli
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Usage
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
# first time setup - clone and install dotfiles
|
|
50
|
+
dotfiles install
|
|
51
|
+
|
|
52
|
+
# sync: pull latest and run dotbot
|
|
53
|
+
dotfiles sync
|
|
54
|
+
|
|
55
|
+
# check status
|
|
56
|
+
dotfiles status
|
|
57
|
+
|
|
58
|
+
# update submodules only
|
|
59
|
+
dotfiles update
|
|
60
|
+
dotfiles update --remote # fetch latest from remotes
|
|
61
|
+
|
|
62
|
+
# push changes (handles submodules)
|
|
63
|
+
dotfiles push # push main repo
|
|
64
|
+
dotfiles push kickstart.nvim # push submodule first
|
|
65
|
+
|
|
66
|
+
# open in editor
|
|
67
|
+
dotfiles edit
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### Notes Sync
|
|
71
|
+
|
|
72
|
+
Sync notes/docs across machines with GitHub as source of truth:
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
# clone notes repo (first time)
|
|
76
|
+
dotfiles notes clone
|
|
77
|
+
|
|
78
|
+
# check status
|
|
79
|
+
dotfiles notes status
|
|
80
|
+
|
|
81
|
+
# two-way sync (recommended)
|
|
82
|
+
dotfiles notes sync
|
|
83
|
+
|
|
84
|
+
# pull only (with optional hard reset)
|
|
85
|
+
dotfiles notes pull
|
|
86
|
+
dotfiles notes pull --hard # discard local, reset to GitHub
|
|
87
|
+
|
|
88
|
+
# push local changes
|
|
89
|
+
dotfiles notes push -a -m "update notes"
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## Configuration
|
|
93
|
+
|
|
94
|
+
By default, dotfiles-cli expects:
|
|
95
|
+
- dotfiles at `~/repos/.dotfiles`
|
|
96
|
+
- notes at `~/repos/docs`
|
|
97
|
+
|
|
98
|
+
Override with environment variables:
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
export DOTFILES_DIR=~/my-dotfiles
|
|
102
|
+
export NOTES_DIR=~/my-notes
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
## Commands
|
|
106
|
+
|
|
107
|
+
### Dotfiles
|
|
108
|
+
|
|
109
|
+
| Command | Description |
|
|
110
|
+
|---------|-------------|
|
|
111
|
+
| `install` | Clone and setup dotfiles from scratch |
|
|
112
|
+
| `sync` | Pull latest changes and run dotbot |
|
|
113
|
+
| `status` | Show git status and submodule versions |
|
|
114
|
+
| `update` | Update submodules |
|
|
115
|
+
| `push` | Commit and push changes |
|
|
116
|
+
| `edit` | Open dotfiles in $EDITOR |
|
|
117
|
+
|
|
118
|
+
### Notes
|
|
119
|
+
|
|
120
|
+
| Command | Description |
|
|
121
|
+
|---------|-------------|
|
|
122
|
+
| `notes clone` | Clone notes repository |
|
|
123
|
+
| `notes status` | Show notes repo status |
|
|
124
|
+
| `notes sync` | Two-way sync (stash, pull, push) |
|
|
125
|
+
| `notes pull` | Pull from GitHub (--hard to reset) |
|
|
126
|
+
| `notes push` | Commit and push to GitHub |
|
|
127
|
+
|
|
128
|
+
## Platform Support
|
|
129
|
+
|
|
130
|
+
- **Windows**: Uses `install-windows.conf.yaml`
|
|
131
|
+
- **Linux/Mac**: Uses `install.conf.yaml`
|
|
132
|
+
|
|
133
|
+
## License
|
|
134
|
+
|
|
135
|
+
MIT
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
# dotfiles-cli
|
|
2
|
+
|
|
3
|
+
CLI tool to sync and manage dotfiles across machines. Works with [dotbot](https://github.com/anishathalye/dotbot).
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
# with uv (recommended)
|
|
9
|
+
uvx dotfiles-cli
|
|
10
|
+
|
|
11
|
+
# or install globally
|
|
12
|
+
uv tool install dotfiles-cli
|
|
13
|
+
|
|
14
|
+
# or with pip
|
|
15
|
+
pip install dotfiles-cli
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Usage
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
# first time setup - clone and install dotfiles
|
|
22
|
+
dotfiles install
|
|
23
|
+
|
|
24
|
+
# sync: pull latest and run dotbot
|
|
25
|
+
dotfiles sync
|
|
26
|
+
|
|
27
|
+
# check status
|
|
28
|
+
dotfiles status
|
|
29
|
+
|
|
30
|
+
# update submodules only
|
|
31
|
+
dotfiles update
|
|
32
|
+
dotfiles update --remote # fetch latest from remotes
|
|
33
|
+
|
|
34
|
+
# push changes (handles submodules)
|
|
35
|
+
dotfiles push # push main repo
|
|
36
|
+
dotfiles push kickstart.nvim # push submodule first
|
|
37
|
+
|
|
38
|
+
# open in editor
|
|
39
|
+
dotfiles edit
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### Notes Sync
|
|
43
|
+
|
|
44
|
+
Sync notes/docs across machines with GitHub as source of truth:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
# clone notes repo (first time)
|
|
48
|
+
dotfiles notes clone
|
|
49
|
+
|
|
50
|
+
# check status
|
|
51
|
+
dotfiles notes status
|
|
52
|
+
|
|
53
|
+
# two-way sync (recommended)
|
|
54
|
+
dotfiles notes sync
|
|
55
|
+
|
|
56
|
+
# pull only (with optional hard reset)
|
|
57
|
+
dotfiles notes pull
|
|
58
|
+
dotfiles notes pull --hard # discard local, reset to GitHub
|
|
59
|
+
|
|
60
|
+
# push local changes
|
|
61
|
+
dotfiles notes push -a -m "update notes"
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Configuration
|
|
65
|
+
|
|
66
|
+
By default, dotfiles-cli expects:
|
|
67
|
+
- dotfiles at `~/repos/.dotfiles`
|
|
68
|
+
- notes at `~/repos/docs`
|
|
69
|
+
|
|
70
|
+
Override with environment variables:
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
export DOTFILES_DIR=~/my-dotfiles
|
|
74
|
+
export NOTES_DIR=~/my-notes
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Commands
|
|
78
|
+
|
|
79
|
+
### Dotfiles
|
|
80
|
+
|
|
81
|
+
| Command | Description |
|
|
82
|
+
|---------|-------------|
|
|
83
|
+
| `install` | Clone and setup dotfiles from scratch |
|
|
84
|
+
| `sync` | Pull latest changes and run dotbot |
|
|
85
|
+
| `status` | Show git status and submodule versions |
|
|
86
|
+
| `update` | Update submodules |
|
|
87
|
+
| `push` | Commit and push changes |
|
|
88
|
+
| `edit` | Open dotfiles in $EDITOR |
|
|
89
|
+
|
|
90
|
+
### Notes
|
|
91
|
+
|
|
92
|
+
| Command | Description |
|
|
93
|
+
|---------|-------------|
|
|
94
|
+
| `notes clone` | Clone notes repository |
|
|
95
|
+
| `notes status` | Show notes repo status |
|
|
96
|
+
| `notes sync` | Two-way sync (stash, pull, push) |
|
|
97
|
+
| `notes pull` | Pull from GitHub (--hard to reset) |
|
|
98
|
+
| `notes push` | Commit and push to GitHub |
|
|
99
|
+
|
|
100
|
+
## Platform Support
|
|
101
|
+
|
|
102
|
+
- **Windows**: Uses `install-windows.conf.yaml`
|
|
103
|
+
- **Linux/Mac**: Uses `install.conf.yaml`
|
|
104
|
+
|
|
105
|
+
## License
|
|
106
|
+
|
|
107
|
+
MIT
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["hatchling"]
|
|
3
|
+
build-backend = "hatchling.build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "dotfiles-cli"
|
|
7
|
+
version = "0.2.4"
|
|
8
|
+
description = "CLI tool to sync and manage dotfiles across machines"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
license = "MIT"
|
|
11
|
+
authors = [{ name = "Flynn OConnell", email = "flynnoconnell@gmail.com" }]
|
|
12
|
+
requires-python = ">=3.10"
|
|
13
|
+
classifiers = [
|
|
14
|
+
"Development Status :: 4 - Beta",
|
|
15
|
+
"Environment :: Console",
|
|
16
|
+
"Intended Audience :: Developers",
|
|
17
|
+
"License :: OSI Approved :: MIT License",
|
|
18
|
+
"Operating System :: OS Independent",
|
|
19
|
+
"Programming Language :: Python :: 3",
|
|
20
|
+
"Programming Language :: Python :: 3.10",
|
|
21
|
+
"Programming Language :: Python :: 3.11",
|
|
22
|
+
"Programming Language :: Python :: 3.12",
|
|
23
|
+
"Topic :: System :: Systems Administration",
|
|
24
|
+
"Topic :: Utilities",
|
|
25
|
+
]
|
|
26
|
+
keywords = ["dotfiles", "configuration", "sync", "cli"]
|
|
27
|
+
dependencies = [
|
|
28
|
+
"click>=8.0",
|
|
29
|
+
"rich>=13.0",
|
|
30
|
+
]
|
|
31
|
+
|
|
32
|
+
[project.optional-dependencies]
|
|
33
|
+
dev = [
|
|
34
|
+
"pytest>=7.0",
|
|
35
|
+
"ruff>=0.1",
|
|
36
|
+
]
|
|
37
|
+
|
|
38
|
+
[project.scripts]
|
|
39
|
+
dotfiles = "dotfiles_cli.cli:main"
|
|
40
|
+
dotfiles-cli = "dotfiles_cli.cli:main"
|
|
41
|
+
|
|
42
|
+
[project.urls]
|
|
43
|
+
Homepage = "https://github.com/FlynnOConnell/dotfiles-cli"
|
|
44
|
+
Repository = "https://github.com/FlynnOConnell/dotfiles-cli"
|
|
45
|
+
|
|
46
|
+
[tool.hatch.build.targets.wheel]
|
|
47
|
+
packages = ["src/dotfiles_cli"]
|
|
48
|
+
|
|
49
|
+
[tool.ruff]
|
|
50
|
+
line-length = 100
|
|
51
|
+
target-version = "py310"
|
|
52
|
+
|
|
53
|
+
[tool.ruff.lint]
|
|
54
|
+
select = ["E", "F", "I", "W"]
|