Package Installer
Install third-party open-source projects (a GitHub URL or a local git
directory the user provides) as external packages. The project is cloned
verbatim into the per-user packages directory — never edit, normalize, or
reorganize its files.
Run the Orkas CLI command below through the command execution tool; Orkas
handles this runner form directly on Windows:
"$ORKAS_NODE" "$ORKAS_PC_DIR/bin/orkas-pkg.cjs" <command> [args]
Commands: install <git-url> [--name <name>] [--consent-deps],
consent-deps <name>, update <name>, remove <name>, list,
info <name>.
Every command prints a JSON result; non-zero exit prints {ok:false,error}.
Install flow
- Run
install <git-url>. Use --name <name> when the user, marketplace
prompt, or install request explicitly gives a package name, or when the repo
basename is not a valid package name (the error message will say so).
Never pass --consent-deps on the first attempt — dependency installs need
the user's explicit approval first.
- Read the JSON result:
deps_pending_consent non-empty → the package is installed but its
dependencies are not. Show the user the exact commands listed there
and ask for approval; after they agree, run consent-deps <name>.
If they decline, leave it as is — skills that need no deps still work.
error mentioning "not installable" → tell the user the project has
neither skills (SKILL.md) nor CLI entry points and is not supported
(agent-driven-only projects cannot be installed).
- Report what was installed, from the result fields:
skill_roots non-empty → its skills become available in new turns.
shims non-empty → those commands are directly callable from the host
shell/PATH in the next turn (e.g. hyperframes --help). On Windows the
installer creates .cmd shims for CLI entries.
Author a usage skill for CLI-only installs
When the install result is kind: "cli" (empty skill_roots, non-empty
bin_entries), author a companion usage skill so future turns get curated
instructions instead of a bare command list. Do this automatically right after
a successful CLI install — the user already approved installing it. Skip for
kind: "skill" and kind: "both" (they already ship their own SKILL.md).
Probe usage: run the package's main binary with --help (and one level of
subcommand help if cheap). Cap output; if --help blocks or is empty, keep
the skill minimal and point the reader at <bin> --help.
Write the skill via stdin (the file lands outside the package tree):
"$ORKAS_NODE" "$ORKAS_PC_DIR/bin/orkas-pkg.cjs" skill-write <name> <<'SKILL'
---
name: <human name>
description: <one line: what it does + when to use it>
---
# <name>
When to use, the common commands (from --help, with real examples), and any
gotchas (e.g. a one-time setup command). End with an "External dependencies"
line naming the package's binaries.
SKILL
Frontmatter is ONLY name + description; everything else is body prose.
Re-running skill-write <name> overwrites the companion (use it to fix or
refresh after an update).
Updates and removal
update <name> pulls the latest version. Dependency installs re-run
automatically only if the user already consented during install.
remove <name> deletes the package and its shims.
list shows installed packages with kind, enabled state, and commit.
Rules
- Ask before installing anything the user did not explicitly request.
- Do not start OAuth/login flows that require the user to paste a verification
code back into chat later (for example
gcloud auth login --no-launch-browser).
Chat messages are not stdin for background processes. Use interactive_cli with action:"start"
for commands that genuinely need live user input, use an auth flow with a
browser callback that completes on its own, or stop and tell the user the
one-time terminal/app authorization step.
- Never run
npm install / pip install yourself inside a package — the
CLI owns dependency installs and the consent record.
- Do not modify files under the packages directory; treat it as read-only.
- Public GitHub repos install without git (the CLI downloads a tarball when git
is absent). Git is only needed for private repos and non-GitHub git URLs; if
the CLI reports git is required for such a source, relay that to the user.
1---2name: package-installer3description: Package Installer4---56# Package Installer78Install third-party open-source projects (a GitHub URL or a local git9directory the user provides) as external packages. The project is cloned10verbatim into the per-user packages directory — never edit, normalize, or11reorganize its files.1213Run the Orkas CLI command below through the command execution tool; Orkas14handles this runner form directly on Windows:1516```text17"$ORKAS_NODE" "$ORKAS_PC_DIR/bin/orkas-pkg.cjs" <command> [args]18```1920Commands: `install <git-url> [--name <name>] [--consent-deps]`,21`consent-deps <name>`, `update <name>`, `remove <name>`, `list`,22`info <name>`.23Every command prints a JSON result; non-zero exit prints `{ok:false,error}`.2425## Install flow26271. Run `install <git-url>`. Use `--name <name>` when the user, marketplace28 prompt, or install request explicitly gives a package name, or when the repo29 basename is not a valid package name (the error message will say so).30 Never pass `--consent-deps` on the first attempt — dependency installs need31 the user's explicit approval first.322. Read the JSON result:33 - `deps_pending_consent` non-empty → the package is installed but its34 dependencies are not. Show the user the exact commands listed there35 and ask for approval; after they agree, run `consent-deps <name>`.36 If they decline, leave it as is — skills that need no deps still work.37 - `error` mentioning "not installable" → tell the user the project has38 neither skills (SKILL.md) nor CLI entry points and is not supported39 (agent-driven-only projects cannot be installed).403. Report what was installed, from the result fields:41 - `skill_roots` non-empty → its skills become available in new turns.42 - `shims` non-empty → those commands are directly callable from the host43 shell/PATH in the next turn (e.g. `hyperframes --help`). On Windows the44 installer creates `.cmd` shims for CLI entries.4546## Author a usage skill for CLI-only installs4748When the install result is `kind: "cli"` (empty `skill_roots`, non-empty49`bin_entries`), author a companion usage skill so future turns get curated50instructions instead of a bare command list. Do this automatically right after51a successful CLI install — the user already approved installing it. Skip for52`kind: "skill"` and `kind: "both"` (they already ship their own SKILL.md).53541. Probe usage: run the package's main binary with `--help` (and one level of55 subcommand help if cheap). Cap output; if `--help` blocks or is empty, keep56 the skill minimal and point the reader at `<bin> --help`.572. Write the skill via stdin (the file lands outside the package tree):5859 ```bash60 "$ORKAS_NODE" "$ORKAS_PC_DIR/bin/orkas-pkg.cjs" skill-write <name> <<'SKILL'61 ---62 name: <human name>63 description: <one line: what it does + when to use it>64 ---6566 # <name>6768 When to use, the common commands (from --help, with real examples), and any69 gotchas (e.g. a one-time setup command). End with an "External dependencies"70 line naming the package's binaries.71 SKILL72 ```7374 Frontmatter is ONLY `name` + `description`; everything else is body prose.753. Re-running `skill-write <name>` overwrites the companion (use it to fix or76 refresh after an `update`).7778## Updates and removal7980- `update <name>` pulls the latest version. Dependency installs re-run81 automatically only if the user already consented during install.82- `remove <name>` deletes the package and its shims.83- `list` shows installed packages with kind, enabled state, and commit.8485## Rules8687- Ask before installing anything the user did not explicitly request.88- Do not start OAuth/login flows that require the user to paste a verification89 code back into chat later (for example `gcloud auth login --no-launch-browser`).90 Chat messages are not stdin for background processes. Use `interactive_cli` with `action:"start"`91 for commands that genuinely need live user input, use an auth flow with a92 browser callback that completes on its own, or stop and tell the user the93 one-time terminal/app authorization step.94- Never run `npm install` / `pip install` yourself inside a package — the95 CLI owns dependency installs and the consent record.96- Do not modify files under the packages directory; treat it as read-only.97- Public GitHub repos install without git (the CLI downloads a tarball when git98 is absent). Git is only needed for private repos and non-GitHub git URLs; if99 the CLI reports git is required for such a source, relay that to the user.