@heylatch/cli 0.1.1 → 0.2.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.
Files changed (3) hide show
  1. package/README.md +34 -5
  2. package/dist/latch.js +71 -46
  3. package/package.json +40 -40
package/README.md CHANGED
@@ -4,7 +4,7 @@ Publish protected scripts, manage versions and grant access on [Latch](https://h
4
4
 
5
5
  ## Setup
6
6
 
7
- Create an API key on your workspace's **API** page on heylatch.app, then:
7
+ Create an API key on your workspace's **API** page on heylatch.app, then set it in your environment, or in a git-ignored `.env` file in your project:
8
8
 
9
9
  ```sh
10
10
  export LATCH_API_KEY=ltk_your_key
@@ -21,8 +21,27 @@ npx @heylatch/cli preview ./my-resource
21
21
  npx @heylatch/cli publish ./my-resource --script my-script --version 1.2.0 --changelog "Fixed spawn bug"
22
22
  ```
23
23
 
24
- `<path>` can be a resource folder, a `.zip` or a `.jar`. Folders are zipped without `.git` and `.env` files.
25
- The first publish of a new script also needs `--name`, `--description` and `--ecosystem hogwartsmp|kcdc|hytale`.
24
+ `<path>` can be a resource folder, a `.zip` or a `.jar` (default: the current folder). Folders are zipped without `.git` and `.env` files.
25
+ The script's slug, version, name and description come from the manifest unless you pass `--script`, `--version`, `--name` or `--description`.
26
+ The first publish of a new script also needs `--ecosystem hogwartsmp|kcdc|hytale` (or `"latch": { "ecosystem": "hogwartsmp" }` in `package.json`).
27
+
28
+ ## Publish a whole project
29
+
30
+ ```sh
31
+ npx @heylatch/cli publish-all ./resources --ecosystem hogwartsmp --dry-run # changes nothing
32
+ npx @heylatch/cli publish-all ./resources --ecosystem hogwartsmp
33
+ ```
34
+
35
+ Safe to rerun: published versions are skipped, resources with no server code are left out, and one failure doesn't stop the others.
36
+
37
+ ## Install on your own server
38
+
39
+ ```sh
40
+ npx @heylatch/cli pull my-script --to /path/to/server/resources
41
+ npx @heylatch/cli pull --all --to /path/to/server/resources
42
+ ```
43
+
44
+ `pull` won't write through a symlink or junction, or over a folder that isn't a Latch package (unless you pass `--force`), so linked source folders stay safe. Use `--keep config.json` for files that shouldn't be replaced. The server still needs a license key.
26
45
 
27
46
  ## Manage access
28
47
 
@@ -35,7 +54,17 @@ npx @heylatch/cli access my-script
35
54
 
36
55
  Add `--json` to any command for machine-readable output. Commands exit with code 1 on failure.
37
56
 
38
- ## Use it from an AI agent (MCP)
57
+ ## Use it from an AI agent
58
+
59
+ Tell your agent to read the guide. It covers the whole setup, from preparing packages to installing on a server:
60
+
61
+ ```
62
+ Read https://heylatch.app/agents.md and use it to set up Latch for this project.
63
+ ```
64
+
65
+ The same guide ships with the package: `latch guide`, or the MCP tool `get_guide`.
66
+
67
+ ### MCP
39
68
 
40
69
  Claude Code:
41
70
 
@@ -57,7 +86,7 @@ Cursor, Claude Desktop and other MCP clients:
57
86
  }
58
87
  ```
59
88
 
60
- Tools: `whoami`, `list_scripts`, `get_script`, `preview_package`, `publish_version`, `get_version_status`, `withdraw_version`, `list_access`, `grant_access`, `revoke_access`, `list_activations`, `list_flags`, `resolve_flag`.
89
+ Tools: `get_guide`, `whoami`, `list_scripts`, `get_script`, `preview_package`, `publish_version`, `publish_all`, `pull_version`, `get_version_status`, `withdraw_version`, `list_access`, `grant_access`, `revoke_access`, `list_activations`, `list_flags`, `resolve_flag`.
61
90
 
62
91
  ## GitHub Actions
63
92