@dotformat/cli 0.1.1

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 ADDED
@@ -0,0 +1,11 @@
1
+ # @dotformat/cli
2
+
3
+ Personal dotfiles CLI — collect, sync, and manage configs across machines.
4
+
5
+ ## Usage
6
+
7
+ ```bash
8
+ bunx @dotformat/cli
9
+ ```
10
+
11
+ Generates a report of all installed AI skills, MCP servers, plugins, shell config, git config, and editor settings.
package/README.md.bak ADDED
@@ -0,0 +1,228 @@
1
+ # dotfiles
2
+
3
+ Personal configuration files and custom AI skills synced across machines. Optimized for fast setup on new/replacement machines.
4
+
5
+ > **The big picture:** This repo syncs configs, but the real goal is a curated **superskill** — a single skill that encodes my preferred development workflow (web, mobile, animations, email, etc.) by composing the best community skills. One update here propagates to every AI tool on every machine via `skills.sh`.
6
+
7
+ ## Machines
8
+
9
+ | Machine | OS | Shell | Primary Use |
10
+ |---|---|---|---|
11
+ | Home Mac | macOS | zsh (oh-my-zsh + p10k) | Primary dev machine |
12
+ | Work Mac | macOS | zsh (oh-my-zsh + p10k) | Dev — mostly synced with personal, few extras |
13
+ | Home Windows | Windows | — | Non-dev (Stable Diffusion, etc.) |
14
+
15
+ ## Structure
16
+
17
+ ```
18
+ dotfiles/
19
+ ├── ai/ # AI tools — first-class configs
20
+ │ ├── claude/
21
+ │ │ ├── CLAUDE.md # Global Claude Code instructions/rules
22
+ │ │ └── settings.json # Enabled plugins & preferences
23
+ │ ├── cursor/
24
+ │ │ ├── mcp.json # MCP server configs
25
+ │ │ └── rules/ # Cursor rules (if any)
26
+ │ ├── gemini/
27
+ │ │ ├── GEMINI.md # Gemini CLI rules/directives
28
+ │ │ └── settings.json # Gemini preferences
29
+ │ ├── windsurf/
30
+ │ │ └── mcp_config.json # MCP server configs
31
+ │ └── shared/
32
+ │ ├── ai-tools.md # Full skills/plugins/MCP inventory (superskill blueprint)
33
+ │ └── mcp-servers.md # Canonical MCP server list & setup notes
34
+ ├── shell/
35
+ │ ├── .zshrc # Main zsh config (shared)
36
+ │ ├── aliases.zsh # Shared aliases
37
+ │ └── exports.zsh # Shared exports & PATH
38
+ ├── git/
39
+ │ ├── .gitconfig # Global git config
40
+ │ └── .gitignore_global # Global gitignore
41
+ ├── editor/
42
+ │ ├── cursor/
43
+ │ │ └── settings.json # Cursor editor settings
44
+ │ ├── vscode/
45
+ │ │ └── settings.json # VS Code editor settings
46
+ │ └── zed/
47
+ │ └── settings.json # Zed editor settings
48
+ ├── terminal/
49
+ │ └── .p10k.zsh # Powerlevel10k theme config
50
+ ├── skills/ # Custom AI skills (the main event)
51
+ │ ├── superskill/
52
+ │ │ ├── skill.md # The superskill — composable dev workflow
53
+ │ │ └── README.md # What it does, which sub-skills, boundaries
54
+ │ ├── web-dev/ # Web app development skill
55
+ │ │ └── skill.md
56
+ │ ├── mobile-dev/ # Mobile app development skill
57
+ │ │ └── skill.md
58
+ │ └── skills.sh # Installer — symlinks skills to all AI tools
59
+ ├── apps/
60
+ │ ├── Brewfile # Homebrew formulae & casks
61
+ │ └── apps.md # Full app list with install sources
62
+ ├── macos/
63
+ │ └── defaults.sh # macOS system preferences
64
+ ├── setup/
65
+ │ └── install.sh # macOS installer
66
+ ├── CLAUDE.md # Project-level Claude instructions
67
+ └── README.md
68
+ ```
69
+
70
+ > **Note:** `ai/cursor/` holds MCP/rules configs (from `~/.cursor/`), while `editor/cursor/` holds editor settings (from `~/Library/Application Support/Cursor/`). Same tool, different config scopes.
71
+
72
+ ## Collect Machine Config
73
+
74
+ Generate a report of all AI tools, skills, MCPs, shell, git, and editor configs on any machine. No clone needed.
75
+
76
+ ```bash
77
+ bunx @doguyilmaz/dotfiles
78
+ ```
79
+
80
+ Or if the repo is already cloned:
81
+
82
+ ```bash
83
+ bash ~/dotfiles/setup/collect-machine-config.sh
84
+ ```
85
+
86
+ Report is saved to `reports/` (in repo) or `~/` (standalone).
87
+
88
+ ## Quick Start
89
+
90
+ > TODO: Will be implemented in Phase 4
91
+
92
+ ```bash
93
+ git clone https://github.com/doguyilmaz/dotfiles.git ~/dotfiles
94
+ cd ~/dotfiles
95
+ ./setup/install.sh
96
+ ```
97
+
98
+ ## Roadmap
99
+
100
+ ### Phase 1 — Organize & Sync Configs
101
+
102
+ Get all config files into the repo with a clean structure. AI configs are top priority.
103
+
104
+ **AI Tools:**
105
+ - [ ] Add Claude Code configs (`ai/claude/CLAUDE.md`, `ai/claude/settings.json`)
106
+ - [ ] Add Cursor MCP config (`ai/cursor/mcp.json`)
107
+ - [ ] Add Gemini CLI configs (`ai/gemini/GEMINI.md`, `ai/gemini/settings.json`)
108
+ - [ ] Add Windsurf MCP config (`ai/windsurf/mcp_config.json`)
109
+ - [ ] Create shared MCP servers reference (`ai/shared/mcp-servers.md`)
110
+
111
+ **Shell & Git:**
112
+ - [ ] Move `.zshrc` to `shell/.zshrc`
113
+ - [ ] Add `.gitconfig` and `.gitignore_global` to `git/`
114
+
115
+ **Editors & Terminal:**
116
+ - [ ] Add Zed settings to `editor/zed/`
117
+ - [ ] Add `.p10k.zsh` to `terminal/`
118
+
119
+ **Repo Hygiene:**
120
+ - [ ] Add `.gitignore` to exclude secrets, caches, API keys
121
+ - [ ] Update symlink reference in README
122
+
123
+ ### Phase 2 — Clean Up & Cross-Machine Support
124
+
125
+ Make configs portable across machines and usernames.
126
+
127
+ - [ ] Replace hardcoded `/Users/dogukyilmaz/` with `$HOME` in all configs
128
+ - [ ] Remove duplicate blocks in `.zshrc` (bun, fnm are duplicated)
129
+ - [ ] Remove stale/placeholder paths (e.g. `~/path/to/zig`)
130
+ - [ ] Split `.zshrc` into shared + platform-specific files (source conditionally)
131
+ - [ ] Add OS detection for platform-specific blocks
132
+
133
+ ### Phase 3 — Superskill (Core Vision)
134
+
135
+ A curated, composable skill that encodes the preferred dev workflow. Shared across all AI tools via `skills.sh`.
136
+
137
+ **Research & Design** (using `ai/shared/ai-tools.md` as blueprint)**:**
138
+ - [ ] Audit all currently installed skills across Claude, Cursor, Windsurf, Gemini
139
+ - [ ] Compare with work Mac report — merge skill inventories
140
+ - [ ] Categorize: which skills for web, mobile, animations, email, infra, etc.
141
+ - [ ] Define boundaries: when each skill applies, in what context, why
142
+ - [ ] Use `find-skills` to discover additional community skills worth including
143
+ - [ ] Map skill references (Software Mansion animations, Resend react-email, Vercel, Callstack RN, Expo)
144
+
145
+ **Build:**
146
+ - [ ] Design superskill structure (directives + sub-skill references)
147
+ - [ ] Create `skills/superskill/skill.md` — the main composable skill
148
+ - [ ] Create domain-specific sub-skills if needed (`web-dev/`, `mobile-dev/`)
149
+ - [ ] Create `skills/skills.sh` — installer that symlinks to `~/.claude/skills/`, `~/.cursor/skills/`, `~/.gemini/skills/`, `~/.codeium/windsurf/skills/`
150
+ - [ ] Test across Claude Code, Cursor, Windsurf, Gemini CLI
151
+ - [ ] Document skill boundaries and usage in `skills/superskill/README.md`
152
+
153
+ ### Phase 4 — Installer Script
154
+
155
+ One command to set up a new machine. Critical for work Mac migrations.
156
+
157
+ - [ ] Create `setup/install.sh` for macOS
158
+ - [ ] Detect OS and architecture
159
+ - [ ] Backup existing configs before overwriting
160
+ - [ ] Copy configs to their destinations (backup originals first)
161
+ - [ ] Install Homebrew + Brewfile (formulae, casks, Mac App Store apps)
162
+ - [ ] Install oh-my-zsh + plugins (zsh-autosuggestions, zsh-syntax-highlighting)
163
+ - [ ] Install dev tools (bun, fnm, etc.)
164
+ - [ ] Create `apps/Brewfile` with all Homebrew dependencies
165
+ - [ ] Symlink shared skills across AI tools (Claude/Cursor/Windsurf/Gemini point to one copy)
166
+ - [ ] Add uninstall/restore script (restore backups)
167
+
168
+ ### Phase 5 — Work vs Personal Separation
169
+
170
+ Keep work-specific configs separate without leaking into personal.
171
+
172
+ - [ ] Define strategy: profiles directory vs conditional sourcing
173
+ - [ ] Add `shell/.zshrc.work` for work-specific aliases, paths, env vars
174
+ - [ ] Add work `.gitconfig` overrides (different email, signing key)
175
+ - [ ] Document how to activate work profile on work machine
176
+ - [ ] Ensure no work secrets end up in the repo
177
+
178
+ ### Phase 6 — App Installation & macOS Setup
179
+
180
+ Full machine provisioning: install apps, set system preferences.
181
+
182
+ - [ ] Create `apps/Brewfile` with all apps (formulae + casks + MAS)
183
+ - [ ] Create `apps/apps.md` listing all apps with install sources
184
+ - [ ] Add `macos/defaults.sh` for system preferences (Dock, Finder, keyboard, etc.)
185
+ - [ ] Add Raycast config/preferences export
186
+ - [ ] Add AltTab preferences export
187
+ - [ ] Add SSH config template (without keys)
188
+
189
+ ### Phase 7 — Nice to Have
190
+
191
+ - [ ] Evaluate chezmoi if templating needs grow
192
+ - [ ] Add GitHub CLI config (`gh/`)
193
+ - [ ] Windows setup script (`setup/install.ps1`) if needed
194
+ - [ ] Add Homebrew bundle dump automation (keep Brewfile in sync)
195
+
196
+ ## Config Sync Strategy
197
+
198
+ **Copy-based** — the repo is the source of truth. The installer copies configs to their destinations (with backup). No symlinks for primary configs.
199
+
200
+ **Symlinks only for shared references** — when multiple tools need the same file (e.g. skills shared across Claude/Cursor/Windsurf/Gemini), the primary copy lives in one location and other tools symlink to it. One source on disk, no drift.
201
+
202
+ ### Install Reference
203
+
204
+ ```bash
205
+ # --- AI Tools (copy to home) ---
206
+ cp ~/dotfiles/ai/claude/CLAUDE.md ~/.claude/CLAUDE.md
207
+ cp ~/dotfiles/ai/claude/settings.json ~/.claude/settings.json
208
+ cp ~/dotfiles/ai/cursor/mcp.json ~/.cursor/mcp.json
209
+ cp ~/dotfiles/ai/gemini/GEMINI.md ~/.gemini/GEMINI.md
210
+ cp ~/dotfiles/ai/gemini/settings.json ~/.gemini/settings.json
211
+ cp ~/dotfiles/ai/windsurf/mcp_config.json ~/.codeium/windsurf/mcp_config.json
212
+
213
+ # --- Shell ---
214
+ cp ~/dotfiles/shell/.zshrc ~/.zshrc
215
+
216
+ # --- Git ---
217
+ cp ~/dotfiles/git/.gitconfig ~/.gitconfig
218
+ cp ~/dotfiles/git/.gitignore_global ~/.gitignore_global
219
+
220
+ # --- Editors ---
221
+ cp ~/dotfiles/editor/zed/settings.json ~/.config/zed/settings.json
222
+
223
+ # --- Terminal ---
224
+ cp ~/dotfiles/terminal/.p10k.zsh ~/.p10k.zsh
225
+
226
+ # --- Skills (symlink — shared across tools) ---
227
+ # e.g. ~/.cursor/skills/superskill -> ~/.claude/skills/superskill
228
+ ```
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env node
2
+ const { execFileSync } = require("child_process");
3
+ const { join } = require("path");
4
+
5
+ execFileSync("bash", [join(__dirname, "..", "setup", "collect-machine-config.sh")], { stdio: "inherit" });
package/package.json ADDED
@@ -0,0 +1,27 @@
1
+ {
2
+ "name": "@dotformat/cli",
3
+ "version": "0.1.1",
4
+ "description": "Collect, compare, and sync machine configs across machines",
5
+ "type": "module",
6
+ "bin": {
7
+ "dotfiles": "./bin/dotfiles.js"
8
+ },
9
+ "files": [
10
+ "bin/dotfiles.js",
11
+ "setup/collect-machine-config.sh"
12
+ ],
13
+ "keywords": [
14
+ "dotfiles",
15
+ "dotf",
16
+ "cli",
17
+ "config",
18
+ "machine-state",
19
+ "sync"
20
+ ],
21
+ "license": "UNLICENSED",
22
+ "repository": {
23
+ "type": "git",
24
+ "url": "git+https://github.com/doguyilmaz/dotfiles.git"
25
+ },
26
+ "homepage": "https://github.com/doguyilmaz/dotfiles#readme"
27
+ }
@@ -0,0 +1,188 @@
1
+ #!/bin/bash
2
+ # Collects AI tool configs and system info from any machine.
3
+ # Run on work Mac, then copy the output file back to compare.
4
+ #
5
+ # Usage:
6
+ # bash collect-machine-config.sh # outputs to ./reports/ if in repo, else ~/
7
+ # bash collect-machine-config.sh -o /path # custom output directory
8
+
9
+ SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
10
+ REPO_ROOT="$(dirname "$SCRIPT_DIR")"
11
+ HOSTNAME="$(hostname -s)"
12
+ FILENAME="dotfiles-report-${HOSTNAME}.md"
13
+
14
+ OUTPUT_DIR=""
15
+ while getopts "o:" opt; do
16
+ case $opt in
17
+ o) OUTPUT_DIR="$OPTARG" ;;
18
+ *) ;;
19
+ esac
20
+ done
21
+
22
+ if [ -n "$OUTPUT_DIR" ]; then
23
+ mkdir -p "$OUTPUT_DIR"
24
+ elif [ -d "$REPO_ROOT/reports" ] || [ -d "$REPO_ROOT/.git" ]; then
25
+ OUTPUT_DIR="$REPO_ROOT/reports"
26
+ mkdir -p "$OUTPUT_DIR"
27
+ else
28
+ OUTPUT_DIR="$HOME"
29
+ fi
30
+
31
+ REPORT="$OUTPUT_DIR/$FILENAME"
32
+
33
+ {
34
+ echo "# Machine Config Report"
35
+ echo "- **Host:** $HOSTNAME"
36
+ echo "- **OS:** $(uname -s) $(uname -m)"
37
+ echo "- **Date:** $(date +%Y-%m-%d)"
38
+ echo ""
39
+
40
+ echo "## Claude Code"
41
+ echo "### settings.json"
42
+ echo '```json'
43
+ cat ~/.claude/settings.json 2>/dev/null || echo "(not found)"
44
+ echo '```'
45
+ echo "### CLAUDE.md"
46
+ echo '```markdown'
47
+ cat ~/.claude/CLAUDE.md 2>/dev/null || echo "(not found)"
48
+ echo '```'
49
+ echo ""
50
+
51
+ echo "## Cursor"
52
+ echo "### mcp.json"
53
+ echo '```json'
54
+ cat ~/.cursor/mcp.json 2>/dev/null || echo "(not found)"
55
+ echo '```'
56
+ echo "### Skills"
57
+ echo '```'
58
+ ls ~/.cursor/skills/ 2>/dev/null || echo "(not found)"
59
+ echo '```'
60
+ echo ""
61
+
62
+ echo "## Gemini CLI"
63
+ echo "### settings.json"
64
+ echo '```json'
65
+ cat ~/.gemini/settings.json 2>/dev/null || echo "(not found)"
66
+ echo '```'
67
+ echo "### GEMINI.md"
68
+ echo '```markdown'
69
+ cat ~/.gemini/GEMINI.md 2>/dev/null || echo "(not found)"
70
+ echo '```'
71
+ echo "### Skills"
72
+ echo '```'
73
+ ls ~/.gemini/skills/ 2>/dev/null || echo "(not found)"
74
+ echo '```'
75
+ echo ""
76
+
77
+ echo "## Windsurf"
78
+ echo "### mcp_config.json"
79
+ echo '```json'
80
+ cat ~/.codeium/windsurf/mcp_config.json 2>/dev/null || echo "(not found)"
81
+ echo '```'
82
+ echo "### Skills"
83
+ echo '```'
84
+ ls ~/.codeium/windsurf/skills/ 2>/dev/null || echo "(not found)"
85
+ echo '```'
86
+ echo ""
87
+
88
+ echo "## Shell"
89
+ echo "### .zshrc"
90
+ echo '```bash'
91
+ cat ~/.zshrc 2>/dev/null || echo "(not found)"
92
+ echo '```'
93
+ echo ""
94
+
95
+ echo "## Git"
96
+ echo "### .gitconfig"
97
+ echo '```ini'
98
+ cat ~/.gitconfig 2>/dev/null || echo "(not found)"
99
+ echo '```'
100
+ echo ""
101
+
102
+ echo "## Editors"
103
+ echo "### Zed settings.json"
104
+ echo '```json'
105
+ cat ~/.config/zed/settings.json 2>/dev/null || echo "(not found)"
106
+ echo '```'
107
+ echo "### Cursor editor settings"
108
+ echo '```json'
109
+ cat ~/Library/Application\ Support/Cursor/User/settings.json 2>/dev/null || echo "(not found)"
110
+ echo '```'
111
+ echo ""
112
+
113
+ echo "## Terminal"
114
+ echo "### p10k theme"
115
+ echo '```'
116
+ [ -f ~/.p10k.zsh ] && echo "(exists, $(wc -l < ~/.p10k.zsh) lines)" || echo "(not found)"
117
+ echo '```'
118
+ echo ""
119
+
120
+ echo "## SSH Config"
121
+ echo '```'
122
+ if [ -f ~/.ssh/config ]; then
123
+ # Redact IP addresses and key paths for safety
124
+ sed 's/HostName .*/HostName [REDACTED]/; s/IdentityFile .*/IdentityFile [REDACTED]/' ~/.ssh/config
125
+ else
126
+ echo "(not found)"
127
+ fi
128
+ echo '```'
129
+ echo ""
130
+
131
+ echo "## GitHub CLI"
132
+ echo '```yaml'
133
+ cat ~/.config/gh/config.yml 2>/dev/null || echo "(not found)"
134
+ echo '```'
135
+ echo ""
136
+
137
+ echo "## npm config (.npmrc)"
138
+ echo '```'
139
+ if [ -f ~/.npmrc ]; then
140
+ # Redact auth tokens
141
+ sed 's/_authToken=.*/_authToken=[REDACTED]/' ~/.npmrc
142
+ else
143
+ echo "(not found)"
144
+ fi
145
+ echo '```'
146
+ echo ""
147
+
148
+ echo "## Bun config (bunfig.toml)"
149
+ echo '```toml'
150
+ cat ~/.bunfig.toml 2>/dev/null || echo "(not found)"
151
+ echo '```'
152
+ echo ""
153
+
154
+ echo "## Raycast"
155
+ echo '```'
156
+ [ -d "/Applications/Raycast.app" ] && echo "(installed)" || echo "(not installed)"
157
+ echo '```'
158
+ echo ""
159
+
160
+ echo "## AltTab"
161
+ echo '```'
162
+ if [ -d "/Applications/AltTab.app" ]; then
163
+ echo "(installed)"
164
+ defaults read com.lwouis.alt-tab-macos 2>/dev/null | head -30 || echo "(no preferences found)"
165
+ else
166
+ echo "(not installed)"
167
+ fi
168
+ echo '```'
169
+ echo ""
170
+
171
+ echo "## macOS Apps (/Applications)"
172
+ echo '```'
173
+ ls /Applications/ 2>/dev/null | sort || echo "(unable to list)"
174
+ echo '```'
175
+ echo ""
176
+
177
+ echo "## Homebrew"
178
+ echo '```'
179
+ brew list --formula 2>/dev/null | sort || echo "(brew not found)"
180
+ echo '```'
181
+ echo "### Casks"
182
+ echo '```'
183
+ brew list --cask 2>/dev/null | sort || echo "(brew not found)"
184
+ echo '```'
185
+
186
+ } > "$REPORT"
187
+
188
+ echo "Report saved to: $REPORT"