agentic-home-cli 0.1.0 → 0.1.2

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.
Files changed (2) hide show
  1. package/README.md +35 -125
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -1,161 +1,71 @@
1
1
  # agentic-home-cli
2
2
 
3
- One command to gather global agent skills and shared instructions into a managed home, then connect installed agents with symlinks.
3
+ All your skills should live in one place.
4
4
 
5
- **Requirements:** macOS or Linux, Python 3.11+, and Git for three-way text merges. No runtime Python dependencies, embedded LLM, network requests, or background service.
5
+ Coding harnesses scatter skills across `~/.claude`, `~/.cursor`, and other directories. This CLI brings them together in one shared folder and links each harness to it.
6
6
 
7
- ## Install and preview
7
+ ## Get started
8
8
 
9
- With npm (Node.js 18+):
9
+ Requires macOS or Linux, Node.js 18+, Python 3.11+, and Git for merges.
10
10
 
11
11
  ```sh
12
12
  npm install -g agentic-home-cli
13
- agentic sync --dry-run
13
+ agentic sync --dry-run # preview without changing files
14
+ agentic sync # import and link
14
15
  ```
15
16
 
16
- Or run `npx agentic-home-cli sync --dry-run`. Python 3.11+ must already be installed; npm does not install Python or Git. The launcher searches common Python executable names. Set `AGENTIC_PYTHON=/absolute/path/to/python3.12` to select an interpreter explicitly. Git is needed for three-way merges.
17
+ Or preview with `npx agentic-home-cli sync --dry-run`.
17
18
 
18
- From this checkout with pipx:
19
+ Files live in `~/.agentic/skills/` and `~/.agentic/AGENTS.md`. Choose another folder with `agentic sync --root PATH`; later commands remember it. Switching folders retains the old content.
19
20
 
20
- ```sh
21
- pipx install .
22
- agentic sync --dry-run
23
- agentic sync
24
- ```
25
-
26
- The distribution is `agentic-home-cli`; the command is `agentic`. Check `command -v agentic` if you already have a command with that name.
27
-
28
- Without installing:
29
-
30
- ```sh
31
- python3.12 -m agentic_cli.cli sync --dry-run --json
32
- ```
33
-
34
- Only existing agent setups are detected. Project files, credentials, sessions, caches, plugin installations, and unrelated settings are not managed. Skills can contain executable scripts and instructions: review their contents before sharing them with more agents. The CLI never executes skill content.
35
-
36
- ## Choose a directory
21
+ Run `agentic sync` again to import new skills, merge changes, and repair missing links. Reload your coding tools afterward.
37
22
 
38
- ```sh
39
- agentic sync --root "$HOME/my shared agent files"
40
- agentic sync # remembers the selected directory
41
- agentic status
42
- ```
43
-
44
- The default is `~/.agentic`. The saved selection lives in `$XDG_CONFIG_HOME/agentic/config.json`, or `~/.config/agentic/config.json` when XDG_CONFIG_HOME is unset. `--root` overrides that selection. Relative paths become absolute; spaces are supported. Dry runs do not save a selection or modify the home.
45
-
46
- A root can already contain `skills/<name>/SKILL.md` and `AGENTS.md`. Other files in that root are left alone, including an existing `index.json`.
23
+ ## Supported tools
47
24
 
48
- To switch roots later, run `sync --root NEW_PATH`. The previous root becomes another import source, not an automatically preferred version. Old content is retained. Conflicts are resolved normally. A pending-root pointer routes `status`, `resolve`, and `continue` to the new workspace; the saved active root switches only once the transition is complete. Finish pending work before selecting another root. Nested/overlapping roots and roots within agent/configuration directories are rejected.
25
+ Only existing setups are linked.
49
26
 
50
- ## Supported discovery locations
51
-
52
- | Agent detected | Skills destination | Shared instructions |
27
+ | Tool | Skills | Shared instructions |
53
28
  | --- | --- | --- |
54
- | `~/.claude` | `~/.claude/skills/<name>` | `~/.claude/CLAUDE.md` |
55
- | `~/.codex` | `~/.agents/skills/<name>` | `~/.codex/AGENTS.md` |
56
- | `~/.cursor` | `~/.cursor/skills/<name>` | Unsupported global file integration; reported explicitly |
57
- | `~/.pi/agent` | `~/.pi/agent/skills/<name>` | `~/.pi/agent/AGENTS.md` |
58
-
59
- Existing legacy `~/.codex/skills` entries are imported and linked too. Existing shared `~/.agents/skills` entries are imported when Codex or Pi is detected. Hidden catalogs such as `.system` are left untouched. Custom agent-home environment variables/settings are not interpreted in this first version.
60
-
61
- Portable skills are directories containing a regular `SKILL.md` file (a directory with that name is invalid). Pi-only standalone Markdown skills are reported and left untouched, rather than made undiscoverable by other agents. Instructions have one shared body, without agent-specific additions.
62
-
63
- Cursor's documented global User Rules are configured in Settings, not discovered from a documented global file path. The CLI therefore does **not** create a misleading `~/.cursor/rules` wrapper or modify Cursor's database. A thin wrapper/reference is permitted if a supported global hook becomes available; it must reference the selected root rather than hardcode `~/.agentic`.
64
-
65
- `AGENTS.override.md` in Codex or Pi blocks instruction publication and is reported for explicit reconciliation. It does not stop unrelated skills. Additional custom instruction settings and project-local instructions remain outside this tool's scope.
29
+ | Claude Code | `~/.claude/skills` | `~/.claude/CLAUDE.md` |
30
+ | Codex | `~/.agents/skills` | `~/.codex/AGENTS.md` |
31
+ | Cursor | `~/.cursor/skills` | Not supported |
32
+ | Pi | `~/.pi/agent/skills` | `~/.pi/agent/AGENTS.md` |
66
33
 
67
- ### Discovery evidence
34
+ Existing `~/.codex/skills` entries are imported too. Skills need a regular `SKILL.md` file. Hidden catalogs, standalone Markdown skills, custom agent locations, and Cowork aren't managed. Cursor's global instructions stay in Settings.
68
35
 
69
- Checked against primary documentation during implementation:
36
+ ## Resolve conflicts
70
37
 
71
- - [Claude Code skills](https://code.claude.com/docs/en/skills): personal `~/.claude/skills/<name>/SKILL.md`.
72
- - [Claude Code memory](https://code.claude.com/docs/en/memory): user `~/.claude/CLAUDE.md`. Cowork has additional symlink/import restrictions and is **not** a supported target.
73
- - [Codex skills](https://developers.openai.com/codex/skills/): user `~/.agents/skills`; symlinked skill folders explicitly supported.
74
- - [Codex instructions](https://developers.openai.com/codex/guides/agents-md/): global `~/.codex/AGENTS.md`, with `AGENTS.override.md` taking precedence.
75
- - [Cursor skills](https://cursor.com/docs/context/skills): global `~/.cursor/skills` and compatibility discovery locations.
76
- - [Cursor rules](https://cursor.com/docs/context/rules): `.cursor/rules` is project-scoped; global User Rules live in Settings.
77
- - [Pi README](https://github.com/badlogic/pi-mono/blob/main/packages/coding-agent/README.md#context-files) and [skills documentation](https://github.com/badlogic/pi-mono/blob/main/packages/coding-agent/docs/skills.md): global `~/.pi/agent/AGENTS.md`, skill catalogs, and override behavior. Also verified against the locally installed Pi documentation.
78
-
79
- These are documented discovery contracts, not a claim of live end-to-end validation in each agent application. Restart/reload your agents and inspect their loaded skills/instructions after setup.
80
-
81
- ## Conflicts, like Git
38
+ Matching content combines. Conflicting content needs your choice; no tool takes priority. Unaffected skills sync while conflicting originals stay in place.
82
39
 
83
40
  ```sh
84
- agentic sync
85
- agentic status --json
41
+ agentic status
86
42
  agentic resolve CONFLICT_ID --take claude
87
43
  agentic continue
88
44
  ```
89
45
 
90
- There is **no source precedence**. Identical content deduplicates; unique files combine. First-import differences without a recorded common ancestor become conflicts. Subsequent text changes use `git merge-file` when a baseline exists. Multiple distinct variants, binary differences, and type collisions are never guessed away.
91
-
92
- Non-conflicting skills are organized immediately. An entire conflicting skill remains inactive in the new home until its files are resolved; the agents keep their original files. Shared instructions are a separate activation unit. Conflict-marked files live only in private working copies, never in active discovery locations.
93
-
94
- In a terminal, the CLI offers a source label, an edited file/directory, or deferral. For manual or LLM editing:
95
-
96
- ```sh
97
- agentic sync --json
98
- # Inspect conflicts[].variants and conflicts[].working_copy.
99
- # Edit the working copy; for a skill, preserve the entire directory tree.
100
- agentic resolve CONFLICT_ID --file '/reported/working/copy'
101
- agentic continue --json
102
- ```
103
-
104
- `resolve` stages a snapshot, so edit first and stage afterward. `continue` validates the resolved node type and rediscovers sources, including agents and legacy catalogs added since staging. New or changed sources invalidate the staged result and refresh the conflict workspace; previously unseen content is never silently selected against. An instruction override that appears meanwhile also blocks publication. Repeated `sync` calls retain unfinished working copies.
105
-
106
- Conflict markers beginning with `<<<<<<<`, `=======`, or `>>>>>>>` are rejected anywhere in staged text. Binary files require explicit source selection or replacement content. If documentation intentionally contains lines with these prefixes, rewrite/indent those lines before staging.
46
+ Or edit the reported working copy, then use `--file PATH` instead of `--take claude`. Stage edits before continuing. New or changed sources require another review. Remove conflict markers before staging.
107
47
 
108
- **LLM contract:** use `--json` to avoid prompts; stable conflict IDs, labeled live source paths, snapshot locations, relative conflicting paths, and resolution commands are returned. No PTY is required. Exit codes: `0` success, `1` operational failure, `2` unresolved conflicts or blocked units. JSON goes to stdout; normal human diagnostics go to stderr. `--dry-run` uses the publication validation path and reports prospective conflicts, invalid units, and catalog normalization without creating workspaces.
48
+ Add `--json` for scripts or agents: no prompts; exit codes are `0` for success, `1` for errors, and `2` for conflicts or blocked files.
109
49
 
110
- ## Repeated runs and symlinks
50
+ ## Before you sync
111
51
 
112
- - New skills and regular files that replace managed links are imported through the same workflow.
113
- - Missing discovery links are repaired when the canonical content exists.
114
- - Absence is not a deletion instruction. Missing children retained in a baseline are restored; missing whole units with no live source are reported instead of silently recreated. Deletion propagation is intentionally unsupported.
115
- - Valid external source links are retained when the selected content matches. Their targets are not moved or modified. When a merge requires a local copy, content is materialized; nested source links are followed into that copy, not rewritten in the external source.
116
- - Whole-catalog links to the selected canonical catalog can remain as-is. Other whole-catalog links are backed up and replaced by a local catalog of child links before individual skills are adopted. External targets remain untouched.
117
- - Broken links, cycles, special files, and unsafe directory-link writes are reported. A missing/invalid unit does not normally block independent units.
118
- - An unchanged successful rerun does not rewrite content, links, configuration, or backups.
52
+ - Review skills before sharing them. The CLI doesn't execute their contents.
53
+ - Project files, credentials, and unrelated settings stay untouched.
54
+ - Deletions don't propagate. Missing files may be restored from the saved baseline.
55
+ - `AGENTS.override.md` in Codex or Pi blocks shared instructions until you reconcile it.
56
+ - Backups and conflict copies stay in `<root>/.agentic/`. Backups preserve content, ordinary permissions, and symlink text, but not extended metadata. Restoration is manual; there is no undo command or automatic pruning.
57
+ - Interrupted writes resume on the next mutating command. Recovery refuses newer edits; changes across directories aren't one atomic operation.
119
58
 
120
- ## Backups and recovery
59
+ ## Troubleshooting and development
121
60
 
122
- Private state lives under `<root>/.agentic/`:
61
+ If Python isn't found, set `AGENTIC_PYTHON` to a Python 3.11+ executable. Check `command -v agentic` if another CLI uses that name.
123
62
 
124
- ```text
125
- state.json ownership, baselines, pending resolutions/publication
126
- journal.json one interrupted filesystem replacement (when present)
127
- conflicts/<id>/... retained source variants and editable working copies
128
- backups/<uuid>.json original path plus lossless snapshot before replacement
129
- ```
130
-
131
- Snapshots preserve bytes (base64), ordinary POSIX permissions, directory entries, and original symlink text. They do not preserve ACLs, extended attributes, ownership, timestamps, or hard-link relationships. Full snapshots favor simplicity over storage efficiency; backups are never automatically pruned.
132
-
133
- A process lock prevents concurrent writers through the same configuration directory. Journaled publication resumes on the next mutating command. File/link replacement is atomic where POSIX allows it. Replacing nonempty directories or changing between directory and non-directory types has a brief recoverable gap; the tool does not claim a cross-directory filesystem transaction. Recovery refuses to overwrite newer changes.
134
-
135
- Manual restore: inspect a backup's `path` first, then reconstruct it into a **new scratch path**, not over live files:
136
-
137
- ```sh
138
- python3.12 - /absolute/backup.json /absolute/new-scratch-path <<'PY'
139
- import json, sys
140
- from pathlib import Path
141
- from agentic_cli.storage import exists, materialize
142
- record = json.loads(Path(sys.argv[1]).read_text())
143
- target = Path(sys.argv[2])
144
- assert not exists(target), 'Choose a new scratch path'
145
- assert record['original'] is not None, 'There was no original at this path'
146
- materialize(target, record['original'])
147
- print('Original location:', record['path'])
148
- print('Restored snapshot:', target)
149
- PY
150
- ```
151
-
152
- Run this from the checkout with a compatible Python, or from an environment with the package installed. Review the result before manually replacing the live path. A restored relative symlink keeps its original text and may only resolve correctly at its original location. The CLI intentionally has no undo/delete-backups command. Its private state is trusted local data; do not edit journals or accept them from untrusted sources.
153
-
154
- ## Development checks
63
+ From a checkout:
155
64
 
156
65
  ```sh
66
+ pipx install .
67
+ npm test
157
68
  python3.12 -m unittest discover -s tests -v
158
- python3.12 -m pip wheel --no-deps . --wheel-dir /tmp/agentic-wheels
159
69
  ```
160
70
 
161
- Tests use temporary homes, including subprocess CLI tests. They never run `sync` against the developer's real home. CI is configured to run the suite and package installation on macOS/Linux with Python 3.11 and 3.12. No test framework dependency is needed.
71
+ Tests use temporary homes. Discovery paths follow tool documentation; loading in each application hasn't been tested end to end.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "agentic-home-cli",
3
- "version": "0.1.0",
4
- "description": "Consolidate global agent skills and instructions with safe, resumable conflicts",
3
+ "version": "0.1.2",
4
+ "description": "All your skills should live in one place. Coding harnesses scatter skills across ~/.claude, ~/.cursor, and other directories. This CLI brings them together in one shared folder and links each harness to it.",
5
5
  "license": "UNLICENSED",
6
6
  "bin": { "agentic": "bin/agentic.cjs" },
7
7
  "files": ["bin/agentic.cjs", "agentic_cli/*.py", "README.md"],