arbella 0.1.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Fabio Schmickl
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,203 @@
1
+ <div align="center">
2
+
3
+ <img src="https://raw.githubusercontent.com/Fafoooo/arbella/main/assets/arbella.png" alt="The Arbella, flagship of the 1630 Winthrop Fleet" width="480">
4
+
5
+ # ⛵ Arbella
6
+
7
+ **Set up your AI coding tools once. Rebuild that setup on any machine.**
8
+
9
+ Backup and migration for your Claude Code and Codex setup — skills, subagents,
10
+ plugins, hooks, settings, memories — into a private Git repo you own.
11
+
12
+ [![License](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE)
13
+ &nbsp;![Node](https://img.shields.io/badge/node-%E2%89%A518-43853d?logo=node.js&logoColor=white)
14
+ &nbsp;![Platforms](https://img.shields.io/badge/platform-Linux%20%C2%B7%20macOS%20%C2%B7%20Windows-555)
15
+ &nbsp;![Status](https://img.shields.io/badge/status-v0.1-orange)
16
+
17
+ [Quick start](#quick-start) · [Commands](#commands) · [How sign-in works](#how-sign-in-works) · [Secrets](#secrets)
18
+
19
+ </div>
20
+
21
+ ---
22
+
23
+ ## The problem
24
+
25
+ You've spent months tuning Claude Code or Codex — custom skills, a stack of subagents, plugins, hooks, your `CLAUDE.md`. Then you get a new laptop and do it all again from scratch.
26
+
27
+ Arbella saves that whole setup into a private Git repo and puts it back on another machine with one command. Linux, macOS, Windows.
28
+
29
+ ## Quick start
30
+
31
+ ```sh
32
+ arbella setup # install what arbella leans on (git, gh, the tool CLIs)
33
+ arbella init # point it at a private repo, pick your options
34
+ arbella push # snapshot your setup and push it
35
+
36
+ # later, on another machine:
37
+ arbella pull https://github.com/you/your-setup
38
+ ```
39
+
40
+ ## Install
41
+
42
+ Needs Node 18+.
43
+
44
+ ```sh
45
+ npm install -g arbella
46
+ arbella --help
47
+ ```
48
+
49
+ ## What it does
50
+
51
+ ```text
52
+ push ~/.claude · ~/.codex ──▶ strip · template ──▶ private repo
53
+ pull private repo ──▶ install · place ──▶ ~/.claude · ~/.codex
54
+ ```
55
+
56
+ `push` reads the parts of your setup that matter, strips anything secret, swaps machine-specific paths for placeholders, and pushes the result to your repo. `pull` does the reverse: installs the CLIs you don't have, drops files back with this machine's paths, reinstalls plugins and skills, and wires your shared instructions into both Claude and Codex.
57
+
58
+ Two things it deliberately won't do:
59
+
60
+ - **Never commits secrets.** API keys, OAuth tokens, `auth.json`, `.credentials.json` — all excluded, no exceptions. You sign back in after a pull, or carry them yourself with [`arbella secrets`](#arbella-secrets).
61
+ - **Doesn't copy what it can reinstall.** Plugins and registry skills are saved as a list and pulled fresh, so the repo stays small and never goes stale.
62
+
63
+ Supported today: **Claude Code** and **Codex**, plus a **Cursor** adapter that quietly does nothing when Cursor isn't installed.
64
+
65
+ ## Commands
66
+
67
+ | Command | What it does |
68
+ | --- | --- |
69
+ | [`arbella setup`](#arbella-setup) | Install git, the provider CLIs, and the AI tool CLIs |
70
+ | [`arbella init`](#arbella-init) | One-time wiring: pick a repo and your options |
71
+ | [`arbella push`](#arbella-push) | Snapshot your setup and push it — the everyday one |
72
+ | [`arbella pull <url>`](#arbella-pull) | Rebuild your setup on a fresh machine |
73
+ | [`arbella status`](#arbella-status) | Show what a push would change — read-only |
74
+ | [`arbella auth`](#arbella-auth) | Sign in to your repo host |
75
+ | [`arbella secrets`](#arbella-secrets) | Move credentials between machines, off Git |
76
+
77
+ Every prompt has a flag, so anything interactive can be scripted. `--dry-run` works wherever it makes sense.
78
+
79
+ ### `arbella setup`
80
+
81
+ Checks what's installed and offers to fill the gaps — a checklist, so you tick what you actually use.
82
+
83
+ ```sh
84
+ arbella setup # interactive checklist
85
+ arbella setup --all # everything, no prompts
86
+ arbella setup --deps git,gh -y # just these
87
+ ```
88
+
89
+ - Covers **git** (required), **gh** / **glab** (handle sign-in for you), and the AI CLIs (**claude**, **codex**, **cursor**).
90
+ - Installs through your system's package manager: apt, dnf, or pacman on Linux, Homebrew on macOS, winget on Windows.
91
+ - `init` and `pull` also install on demand — if something's missing when you run them, Arbella stops and asks first.
92
+
93
+ ### `arbella init`
94
+
95
+ The one-time wiring. Pick a host (GitHub, GitLab, or a plain Git URL); if the repo doesn't exist yet, Arbella creates it private for you.
96
+
97
+ ```sh
98
+ arbella init
99
+ arbella init --provider github --repo you/your-setup --auto-push daily -y
100
+ ```
101
+
102
+ Saves your preferences:
103
+
104
+ - which tools Arbella should manage
105
+ - who wins a conflict — your machine or the repo
106
+ - auto-push cadence — off, once per session, or daily
107
+ - whether secrets are allowed into the repo (off by default), and whether to include memories (also off)
108
+
109
+ ### `arbella push`
110
+
111
+ The one you'll run most. Captures your current setup, sanitizes it, commits, and pushes. Run it whenever you've changed something worth keeping, or let the auto-push hook do it in the background.
112
+
113
+ ```sh
114
+ arbella push
115
+ arbella push --dry-run # show exactly what goes in (and what's skipped), write nothing
116
+ ```
117
+
118
+ Worth a `--dry-run` before your first real push, so there are no surprises.
119
+
120
+ ### `arbella pull`
121
+
122
+ The reason the whole thing exists.
123
+
124
+ ```sh
125
+ arbella pull https://github.com/you/your-setup
126
+ arbella pull <url> --dry-run
127
+ ```
128
+
129
+ - First copies your current `~/.claude` and `~/.codex` to a timestamped safety folder, so a pull can't quietly wreck what's already there.
130
+ - Installs any missing CLIs — reaching for `sudo` only when the global npm folder actually needs root.
131
+ - Writes files with this machine's paths, then reinstalls your plugins and skills from the manifest.
132
+ - Deploys your shared instructions to `CLAUDE.md` and `AGENTS.md`.
133
+ - Reminds you to sign back in at the end, since no credentials came along for the ride.
134
+
135
+ ### `arbella status`
136
+
137
+ Read-only. It answers one question: if you ran `push` right now, what would change?
138
+
139
+ ```sh
140
+ arbella status
141
+ arbella status --json # pipe it somewhere
142
+ ```
143
+
144
+ New and modified files, plugin drift, the secrets it would skip. Writes nothing, installs nothing.
145
+
146
+ ### `arbella auth`
147
+
148
+ Handles sign-in to your repo host. You rarely call it yourself — `push` and `pull` sign in on their own when they hit a private repo. It's here for when you'd rather log in ahead of time, or check where you stand.
149
+
150
+ ```sh
151
+ arbella auth login
152
+ arbella auth status
153
+ arbella auth login --provider gitlab
154
+ arbella auth login --device-flow # skip gh/glab, use Arbella's own flow
155
+ ```
156
+
157
+ ### `arbella secrets`
158
+
159
+ For the credentials that never belong in the repo. Git is never involved — you carry the blob between your own machines yourself.
160
+
161
+ ```sh
162
+ arbella secrets export # encrypted, passphrase-protected blob (AES-256-GCM)
163
+ arbella secrets import # unpack it on the other machine
164
+ ```
165
+
166
+ ## How sign-in works
167
+
168
+ Short version: **gh and glab are preferred, not required.** They're the smoothest route, and the one I'd point you to — but Arbella works without them.
169
+
170
+ | Situation | What Arbella does |
171
+ | --- | --- |
172
+ | CLI installed and signed in | Uses it directly. gh/glab already do OAuth properly and configure Git's credentials, so nothing sensitive passes through Arbella. |
173
+ | CLI installed, signed out | Runs its `auth login` for you — prints a URL and a code you type into your browser. |
174
+ | CLI missing | Offers to install it, or falls back to its own path: an OAuth device flow, or a pasted token kept in a local `0600` file. |
175
+
176
+ For the device flow, point Arbella at your own registered OAuth app with `ARBELLA_GITHUB_CLIENT_ID` (or `ARBELLA_GITLAB_CLIENT_ID`). There's no sensible default to ship — the client ID is public but tied to your account — so with none set, Arbella skips the device flow and asks for a token instead. SSH and `file://` remotes are left alone, so those keep working however your Git already has them.
177
+
178
+ ## Secrets
179
+
180
+ This is the part I most wanted to get right.
181
+
182
+ - Whole credential files (`auth.json`, `.credentials.json`, and the like) sit on a hard denylist and are never read into the repo.
183
+ - Everything that *does* get committed runs through a sanitizer that redacts token-shaped values.
184
+ - Any token Arbella holds for itself lives in one local file with `0600` permissions — not in the repo, not in a logged command, not baked into a Git remote.
185
+ - A test fails the build if a credential can reach the repo. This isn't on the honor system.
186
+
187
+ Putting secrets in the repo is opt-in, and the default is off. It's your private repo and your call — but I'd leave it there.
188
+
189
+ ## Cross-platform notes
190
+
191
+ Paths get templated, so a setup captured on a Mac under `/Users/you` restores correctly on Linux under `/home/you`, or on Windows. The one place the machine matters is global npm installs: on a system Node the folder is root-owned, so Arbella elevates with `sudo` and tells you it's doing so; on nvm, Homebrew, or Windows it's already yours, so it skips sudo. It checks first instead of guessing.
192
+
193
+ ## Why "Arbella"
194
+
195
+ The Arbella was the flagship of the 1630 Winthrop Fleet — a few hundred settlers, their livestock, and the colony's founding charter, carried across the Atlantic to start over somewhere new. That's the idea here: pack up the things that make your environment yours, carry them across, and unpack on the other side.
196
+
197
+ ## Status
198
+
199
+ v0.1 — early, but it builds clean, the full test suite passes, and I use it daily. Issues and pull requests welcome.
200
+
201
+ ## License
202
+
203
+ MIT — see [LICENSE](./LICENSE).