@mkrz/cocon 0.0.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,74 @@
1
+ # Cocon
2
+
3
+ `cocon` is a Bun + TypeScript tool that fetches npm package source code repositories into project storage to give agentic coding tools better context.
4
+
5
+ It has two runtime surfaces:
6
+
7
+ - A terminal CLI (`cocon`)
8
+ - An MCP server binary (`cocon-mcp`)
9
+
10
+ Storage location can be configured with a `global` boolean:
11
+
12
+ - `global: false` (default) stores in `./.cocon/packages` for the provided/current working directory
13
+ - `global: true` stores in `~/.cocon/packages`
14
+
15
+ ## CLI commands
16
+
17
+ ### `pull`
18
+
19
+ Pull and cache package repository source.
20
+
21
+ ```bash
22
+ cocon pull [--global|-g] <packages...>
23
+ ```
24
+
25
+ ### `sync`
26
+
27
+ Prefetch and cache repository sources for all dependencies in `package.json` in parallel.
28
+ Uses resolved project versions (installed version when available).
29
+
30
+ ```bash
31
+ cocon sync [--global|-g]
32
+ ```
33
+
34
+ ### `status`
35
+
36
+ Show installed vs cached versions, missing targets, and the version each package should pull.
37
+
38
+ ```bash
39
+ cocon status [--global|-g]
40
+ ```
41
+
42
+ ### `prune`
43
+
44
+ Remove old/unused cached versions while honoring keep rules.
45
+
46
+ ```bash
47
+ cocon prune [--global|-g] [--keep-latest <count>] [--no-keep-project-dependencies] [--keep <package@version...>] [--dry-run]
48
+ ```
49
+
50
+ ### `list`
51
+
52
+ List all cached package versions in the selected scope.
53
+
54
+ ```bash
55
+ cocon list [--global|-g]
56
+ ```
57
+
58
+ ### `get`
59
+
60
+ Get cached source info for one package in the selected scope (without downloading).
61
+ If multiple versions are cached, all matches are returned unless `--version` is supplied.
62
+
63
+ ```bash
64
+ cocon get [--global|-g] [--version <version>] <packageName>
65
+ ```
66
+
67
+ ## MCP tools
68
+
69
+ - `get_package_source`: resolve installed version from a project and fetch source if needed
70
+ - `sync_project_dependencies`: prefetch cache for all project dependencies in parallel
71
+ - `get_cache_status`: show installed vs cached versions and missing target cache entries
72
+ - `prune_cache`: prune old/unused cache versions with keep rules
73
+ - `list_cached_package_sources`: list all package cache entries in selected scope
74
+ - `get_cached_package_source`: inspect existing cached package entries in selected scope