@prnv/tuck 1.6.0 → 1.8.0
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.
- package/README.md +96 -16
- package/dist/index.js +8185 -3289
- package/dist/index.js.map +1 -1
- package/package.json +6 -1
package/README.md
CHANGED
|
@@ -13,33 +13,40 @@
|
|
|
13
13
|
|
|
14
14
|
[Website](https://tuck.sh) · [Install](#installation) · [Quick Start](#quick-start) · [Commands](#commands)
|
|
15
15
|
|
|
16
|
+
<img src="public/tuck_preview.png" alt="tuck preview" width="650">
|
|
17
|
+
|
|
16
18
|
</div>
|
|
17
19
|
|
|
18
20
|
---
|
|
19
21
|
|
|
20
22
|
## Why tuck?
|
|
21
23
|
|
|
22
|
-
- **One command to rule them all** — `tuck init` scans your system, lets you pick what to track, and syncs to
|
|
24
|
+
- **One command to rule them all** — `tuck init` scans your system, lets you pick what to track, and syncs to your remote
|
|
25
|
+
- **Multi-provider support** — GitHub, GitLab (including self-hosted), local-only, or any custom git remote
|
|
23
26
|
- **Smart detection** — Auto-categorizes dotfiles (shell, git, editors, terminal, ssh, etc.)
|
|
24
27
|
- **Beautiful CLI** — Gorgeous prompts, spinners, and progress bars powered by @clack/prompts
|
|
25
28
|
- **Safe by default** — Creates backups before every operation, never overwrites without asking
|
|
26
29
|
- **Git-native** — Uses Git under the hood but hides the complexity
|
|
27
|
-
- **Cross-platform** — Works on macOS and
|
|
30
|
+
- **Cross-platform** — Works on macOS, Linux, and Windows
|
|
28
31
|
|
|
29
32
|
## Installation
|
|
30
33
|
|
|
31
34
|
```bash
|
|
32
|
-
# npm
|
|
35
|
+
# npm (all platforms)
|
|
33
36
|
npm install -g @prnv/tuck
|
|
34
37
|
|
|
35
|
-
# Homebrew (macOS/Linux)
|
|
36
|
-
brew install
|
|
38
|
+
# Homebrew (macOS/Linux) - coming soon
|
|
39
|
+
brew install pranav-karra-3301/tap/tuck
|
|
37
40
|
|
|
38
|
-
# pnpm
|
|
41
|
+
# pnpm (all platforms)
|
|
39
42
|
pnpm add -g @prnv/tuck
|
|
40
43
|
|
|
41
|
-
# yarn
|
|
44
|
+
# yarn (all platforms)
|
|
42
45
|
yarn global add @prnv/tuck
|
|
46
|
+
|
|
47
|
+
# Windows (PowerShell)
|
|
48
|
+
npm install -g @prnv/tuck
|
|
49
|
+
# Or download the binary from GitHub Releases
|
|
43
50
|
```
|
|
44
51
|
|
|
45
52
|
## Quick Start
|
|
@@ -53,11 +60,12 @@ tuck init
|
|
|
53
60
|
|
|
54
61
|
That's it! `tuck init` does everything:
|
|
55
62
|
|
|
56
|
-
1.
|
|
57
|
-
2.
|
|
58
|
-
3.
|
|
59
|
-
4.
|
|
60
|
-
5.
|
|
63
|
+
1. **Asks where to store** — GitHub, GitLab, local-only, or custom remote
|
|
64
|
+
2. Creates `~/.tuck` repository
|
|
65
|
+
3. Scans your system for dotfiles
|
|
66
|
+
4. Lets you select which to track
|
|
67
|
+
5. Creates a remote repo (if using GitHub/GitLab)
|
|
68
|
+
6. Commits and pushes
|
|
61
69
|
|
|
62
70
|
### Ongoing workflow
|
|
63
71
|
|
|
@@ -114,10 +122,11 @@ tuck restore --all
|
|
|
114
122
|
|
|
115
123
|
### Configuration
|
|
116
124
|
|
|
117
|
-
| Command | Description
|
|
118
|
-
| -------------------- |
|
|
119
|
-
| `tuck config` | View/edit configuration
|
|
120
|
-
| `tuck config
|
|
125
|
+
| Command | Description |
|
|
126
|
+
| -------------------- | -------------------------------------------- |
|
|
127
|
+
| `tuck config` | View/edit configuration |
|
|
128
|
+
| `tuck config remote` | Configure git provider (GitHub/GitLab/local) |
|
|
129
|
+
| `tuck config wizard` | Interactive configuration setup |
|
|
121
130
|
|
|
122
131
|
## How It Works
|
|
123
132
|
|
|
@@ -146,6 +155,39 @@ tuck stores your dotfiles in `~/.tuck`, organized by category:
|
|
|
146
155
|
|
|
147
156
|
Run `tuck sync` anytime to detect changes and push. On a new machine, run `tuck apply username` to grab anyone's dotfiles.
|
|
148
157
|
|
|
158
|
+
## Git Providers
|
|
159
|
+
|
|
160
|
+
tuck supports multiple git hosting providers, detected automatically during setup:
|
|
161
|
+
|
|
162
|
+
| Provider | CLI Required | Features |
|
|
163
|
+
|----------|--------------|----------|
|
|
164
|
+
| **GitHub** | `gh` | Auto-create repos, full integration |
|
|
165
|
+
| **GitLab** | `glab` | Auto-create repos, self-hosted support |
|
|
166
|
+
| **Local** | None | No remote sync, local git only |
|
|
167
|
+
| **Custom** | None | Any git URL (Bitbucket, Gitea, etc.) |
|
|
168
|
+
|
|
169
|
+
### Switching Providers
|
|
170
|
+
|
|
171
|
+
```bash
|
|
172
|
+
# Change provider anytime
|
|
173
|
+
tuck config remote
|
|
174
|
+
|
|
175
|
+
# Or via interactive config menu
|
|
176
|
+
tuck config
|
|
177
|
+
# → Select "Configure remote"
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
### Self-Hosted GitLab
|
|
181
|
+
|
|
182
|
+
tuck supports self-hosted GitLab instances:
|
|
183
|
+
|
|
184
|
+
```bash
|
|
185
|
+
tuck init
|
|
186
|
+
# → Select GitLab
|
|
187
|
+
# → Select "Self-hosted"
|
|
188
|
+
# → Enter your GitLab host (e.g., gitlab.company.com)
|
|
189
|
+
```
|
|
190
|
+
|
|
149
191
|
## Configuration
|
|
150
192
|
|
|
151
193
|
Configure tuck via `~/.tuck/.tuckrc.json` or `tuck config wizard`:
|
|
@@ -159,6 +201,10 @@ Configure tuck via `~/.tuck/.tuckrc.json` or `tuck config wizard`:
|
|
|
159
201
|
"files": {
|
|
160
202
|
"strategy": "copy",
|
|
161
203
|
"backupOnRestore": true
|
|
204
|
+
},
|
|
205
|
+
"remote": {
|
|
206
|
+
"mode": "github",
|
|
207
|
+
"username": "your-username"
|
|
162
208
|
}
|
|
163
209
|
}
|
|
164
210
|
```
|
|
@@ -168,6 +214,40 @@ Configure tuck via `~/.tuck/.tuckrc.json` or `tuck config wizard`:
|
|
|
168
214
|
- **copy** (default) — Files are copied. Run `tuck sync` to update the repo.
|
|
169
215
|
- **symlink** — Files are symlinked. Changes are instant but require more care.
|
|
170
216
|
|
|
217
|
+
## Windows Support
|
|
218
|
+
|
|
219
|
+
tuck fully supports Windows with platform-specific handling:
|
|
220
|
+
|
|
221
|
+
### Detected Windows Dotfiles
|
|
222
|
+
|
|
223
|
+
| Category | Files |
|
|
224
|
+
|----------|-------|
|
|
225
|
+
| **Shell** | PowerShell profiles (`Microsoft.PowerShell_profile.ps1`) |
|
|
226
|
+
| **Terminal** | Windows Terminal settings, ConEmu/Cmder configs |
|
|
227
|
+
| **Editors** | VS Code, Cursor, Neovim (in `%LOCALAPPDATA%`) |
|
|
228
|
+
| **Git** | `.gitconfig`, `.gitignore_global` |
|
|
229
|
+
| **SSH** | SSH config in `%USERPROFILE%\.ssh` |
|
|
230
|
+
| **Misc** | WSL config (`.wslconfig`), Docker, Kubernetes |
|
|
231
|
+
|
|
232
|
+
### Windows-Specific Behavior
|
|
233
|
+
|
|
234
|
+
- **Symlinks**: On Windows, tuck uses directory junctions (don't require admin privileges) or falls back to copying files
|
|
235
|
+
- **Permissions**: Unix-style file permissions (chmod) don't apply on Windows; tuck handles this gracefully
|
|
236
|
+
- **Paths**: Windows environment variables (`%APPDATA%`, `%LOCALAPPDATA%`, `%USERPROFILE%`) are automatically expanded
|
|
237
|
+
- **Hooks**: tuck uses PowerShell Core (`pwsh`) or Windows PowerShell for hook execution
|
|
238
|
+
|
|
239
|
+
### PowerShell Profile Merging
|
|
240
|
+
|
|
241
|
+
tuck supports smart merging for PowerShell profiles with preserve markers:
|
|
242
|
+
|
|
243
|
+
```powershell
|
|
244
|
+
# In your PowerShell profile, mark local-only sections:
|
|
245
|
+
<# tuck:preserve #>
|
|
246
|
+
# Machine-specific aliases
|
|
247
|
+
Set-Alias code "C:\Program Files\Microsoft VS Code\Code.exe"
|
|
248
|
+
<# /tuck:preserve #>
|
|
249
|
+
```
|
|
250
|
+
|
|
171
251
|
## Security
|
|
172
252
|
|
|
173
253
|
tuck is designed with security in mind:
|