* align docs and contract

* clean

* rename from deskctl-cli to deskctl

* runtime
This commit is contained in:
Hari 2026-03-26 08:44:10 -04:00 committed by Harivansh Rathi
parent 88f9ff85a3
commit eac3a61ceb
18 changed files with 41 additions and 47 deletions

View file

@ -189,7 +189,7 @@ jobs:
NEW="${{ needs.changes.outputs.version }}"
if [ "$CURRENT" != "$NEW" ]; then
sed -i "0,/^version = \"${CURRENT}\"/s//version = \"${NEW}\"/" Cargo.toml
node -e 'const fs=require("node:fs"); const path="npm/deskctl-cli/package.json"; const pkg=JSON.parse(fs.readFileSync(path,"utf8")); pkg.version=process.argv[1]; fs.writeFileSync(path, JSON.stringify(pkg, null, 2)+"\n");' "$NEW"
node -e 'const fs=require("node:fs"); const path="npm/deskctl/package.json"; const pkg=JSON.parse(fs.readFileSync(path,"utf8")); pkg.version=process.argv[1]; fs.writeFileSync(path, JSON.stringify(pkg, null, 2)+"\n");' "$NEW"
cargo generate-lockfile
fi
@ -199,7 +199,7 @@ jobs:
git config user.email "github-actions[bot]@users.noreply.github.com"
if ! git diff --quiet; then
git add Cargo.toml Cargo.lock npm/deskctl-cli/package.json
git add Cargo.toml Cargo.lock npm/deskctl/package.json
git commit -m "release: ${{ needs.changes.outputs.tag }} [skip ci]"
fi

View file

@ -8,7 +8,7 @@ on:
required: true
type: string
publish_npm:
description: Publish deskctl-cli to npm
description: Publish deskctl to npm
required: true
type: boolean
default: false
@ -51,7 +51,7 @@ jobs:
TAG="${{ inputs.tag }}"
VERSION="${TAG#v}"
CARGO_VERSION=$(grep '^version' Cargo.toml | head -1 | sed 's/.*"\(.*\)"/\1/')
NPM_VERSION=$(node -p 'require("./npm/deskctl-cli/package.json").version')
NPM_VERSION=$(node -p 'require("./npm/deskctl/package.json").version')
test "$VERSION" = "$CARGO_VERSION"
test "$VERSION" = "$NPM_VERSION"
@ -62,7 +62,7 @@ jobs:
VERSION="${{ inputs.tag }}"
VERSION="${VERSION#v}"
if npm view "deskctl-cli@${VERSION}" version >/dev/null 2>&1; then
if npm view "deskctl@${VERSION}" version >/dev/null 2>&1; then
echo "npm=true" >> "$GITHUB_OUTPUT"
else
echo "npm=false" >> "$GITHUB_OUTPUT"
@ -77,8 +77,8 @@ jobs:
- name: Validate npm package
run: |
mkdir -p ./tmp/npm-pack
node npm/deskctl-cli/scripts/validate-package.js
npm pack ./npm/deskctl-cli --pack-destination ./tmp/npm-pack >/dev/null
node npm/deskctl/scripts/validate-package.js
npm pack ./npm/deskctl --pack-destination ./tmp/npm-pack >/dev/null
- name: Validate crate publish path
run: cargo publish --dry-run --locked
@ -87,7 +87,7 @@ jobs:
if: inputs.publish_npm && steps.published.outputs.npm != 'true'
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm publish ./npm/deskctl-cli --access public
run: npm publish ./npm/deskctl --access public
- name: Publish crates.io
if: inputs.publish_crates && steps.published.outputs.crates != 'true'

4
.gitignore vendored
View file

@ -5,5 +5,5 @@ secret/
.claude/
.codex/
openspec/
npm/deskctl-cli/vendor/
npm/deskctl-cli/*.tgz
npm/deskctl/vendor/
npm/deskctl/*.tgz

View file

@ -70,7 +70,7 @@ The hook config intentionally stays small:
Distribution support currently ships through:
- crate: `deskctl`
- npm package: `deskctl-cli`
- npm package: `deskctl`
- repo flake: `flake.nix`
- command name on every channel: `deskctl`

View file

@ -38,10 +38,10 @@ npm-package-check:
echo "npm is required for npm packaging validation."; \
exit 1; \
fi
node npm/deskctl-cli/scripts/validate-package.js
node npm/deskctl/scripts/validate-package.js
rm -rf tmp/npm-pack tmp/npm-install
mkdir -p tmp/npm-pack tmp/npm-install/bin
npm pack ./npm/deskctl-cli --pack-destination ./tmp/npm-pack >/dev/null
npm pack ./npm/deskctl --pack-destination ./tmp/npm-pack >/dev/null
@if [ "$$(uname -s)" != "Linux" ]; then \
echo "Skipping npm package runtime smoke test on non-Linux host."; \
else \

View file

@ -1,6 +1,6 @@
# deskctl
[![npm](https://img.shields.io/npm/v/deskctl-cli?label=npm)](https://www.npmjs.com/package/deskctl-cli)
[![npm](https://img.shields.io/npm/v/deskctl?label=npm)](https://www.npmjs.com/package/deskctl)
[![release](https://img.shields.io/github/v/release/harivansh-afk/deskctl?label=release)](https://github.com/harivansh-afk/deskctl/releases)
[![runtime](https://img.shields.io/badge/runtime-linux--x11-111827)](#support-boundary)
[![skill](https://img.shields.io/badge/skills.sh-deskctl-111827)](skills/deskctl)
@ -10,7 +10,7 @@ Non-interactive desktop control for AI agents on Linux X11.
## Install
```bash
npm install -g deskctl-cli
npm install -g deskctl
deskctl doctor
deskctl snapshot --annotate
```
@ -18,10 +18,11 @@ deskctl snapshot --annotate
One-shot execution also works:
```bash
npx deskctl-cli --help
npx deskctl --help
```
`deskctl-cli` installs the `deskctl` command by downloading the matching GitHub Release asset for the supported runtime target.
`deskctl` installs the command by downloading the matching GitHub Release asset for the supported runtime target.
## Installable skill

View file

@ -12,14 +12,14 @@ GitHub Releases are the canonical binary source. The npm package consumes those
## Package Names
- crate: `deskctl`
- npm package: `deskctl-cli`
- npm package: `deskctl`
- installed command: `deskctl`
## Prerequisites
Before the first live publish on each registry:
- npm ownership for `deskctl-cli`
- npm ownership for `deskctl`
- crates.io ownership for `deskctl`
- repository secrets:
- `NPM_TOKEN`

View file

@ -68,5 +68,3 @@ Treat these as useful but non-contractual:
- incidental text formatting in non-JSON mode
- default screenshot file names when no explicit path was provided
- environment-dependent ordering details from the window manager
For the full repo copy, see `docs/runtime-contract.md`.

View file

@ -1,11 +1,11 @@
# deskctl-cli
# deskctl
`deskctl-cli` installs the `deskctl` command for Linux X11 systems.
`deskctl` installs the command for Linux X11 systems.
## Install
```bash
npm install -g deskctl-cli
npm install -g deskctl
```
After install, run:
@ -17,7 +17,7 @@ deskctl --help
One-shot usage is also supported:
```bash
npx deskctl-cli --help
npx deskctl --help
```
## Runtime Support
@ -26,7 +26,7 @@ npx deskctl-cli --help
- X11 session
- currently packaged release asset: `linux-x64`
`deskctl-cli` downloads the matching GitHub Release binary during install.
`deskctl` downloads the matching GitHub Release binary during install.
Unsupported targets fail during install with a clear runtime support error instead of installing a broken command.
If you want the Rust source-install path instead, use:

View file

@ -17,7 +17,7 @@ function main() {
`Expected: ${binaryPath}`,
`Package version: ${pkg.version}`,
`Release tag: ${releaseTag(pkg)}`,
"Try reinstalling deskctl-cli or check that your target is supported."
"Try reinstalling deskctl or check that your target is supported."
].join("\n")
);
process.exit(1);

View file

@ -1,7 +1,7 @@
{
"name": "deskctl-cli",
"name": "deskctl",
"version": "0.1.6",
"description": "Installable deskctl CLI package for Linux X11 agents",
"description": "Installable deskctl package for Linux X11 agents",
"license": "MIT",
"homepage": "https://github.com/harivansh-afk/deskctl",
"repository": {

View file

@ -44,6 +44,6 @@ async function main() {
}
main().catch((error) => {
console.error(`deskctl-cli install failed: ${error.message}`);
console.error(`deskctl install failed: ${error.message}`);
process.exit(1);
});

View file

@ -26,7 +26,7 @@ function supportedTarget(platform = process.platform, arch = process.arch) {
}
throw new Error(
`deskctl-cli currently supports linux-x64 only. Received ${platform}-${arch}.`
`deskctl currently supports linux-x64 only. Received ${platform}-${arch}.`
);
}

View file

@ -26,13 +26,13 @@ function main() {
}
if (pkg.bin?.deskctl !== "bin/deskctl.js") {
throw new Error("deskctl-cli must expose the deskctl bin entrypoint.");
throw new Error("deskctl must expose the deskctl bin entrypoint.");
}
const target = supportedTarget("linux", "x64");
const targetPath = vendorBinaryPath(target);
const vendorDir = path.dirname(targetPath);
if (!vendorDir.endsWith(path.join("deskctl-cli", "vendor"))) {
if (!vendorDir.endsWith(path.join("deskctl", "vendor"))) {
throw new Error("Vendor binary directory resolved unexpectedly.");
}
}

View file

@ -16,10 +16,6 @@ import DocLayout from "../layouts/DocLayout.astro";
then verify.
</p>
<pre><code>npm install -g deskctl-cli
deskctl doctor
deskctl snapshot --annotate</code></pre>
<h2>Start here</h2>
<ul>
@ -33,6 +29,7 @@ deskctl snapshot --annotate</code></pre>
<ul>
<li><a href="/commands">Commands</a></li>
<li><a href="/architecture">Architecture</a></li>
<li><a href="/runtime-contract">Runtime contract</a></li>
</ul>
<h2>Agent skill</h2>
@ -47,15 +44,13 @@ deskctl snapshot --annotate</code></pre>
<ul>
<li>
<a href="https://www.npmjs.com/package/deskctl-cli">npm package</a>
<a href="https://www.npmjs.com/package/deskctl">npm package</a>
</li>
<li>
<a href="https://github.com/harivansh-afk/deskctl">GitHub</a>
</li>
<li>
<a href="https://github.com/harivansh-afk/deskctl/releases">
GitHub releases
</a>
<a href="https://github.com/harivansh-afk/deskctl/releases"> Releases </a>
</li>
</ul>
</DocLayout>

View file

@ -9,17 +9,17 @@ toc: true
## Default install
```sh
npm install -g deskctl-cli
npm install -g deskctl
deskctl --help
```
`deskctl-cli` is the default install path. It installs the `deskctl` command by
`deskctl` is the default install path. It installs the command by
downloading the matching GitHub Release asset for the supported runtime target.
## One-shot usage
```sh
npx deskctl-cli --help
npx deskctl --help
```
## Agent skill

View file

@ -9,7 +9,7 @@ toc: true
## Install and diagnose
```sh
npm install -g deskctl-cli
npm install -g deskctl
deskctl doctor
```

View file

@ -1,7 +1,7 @@
---
name: deskctl
description: Non-interactive X11 desktop control for AI agents. Use when the task involves controlling a Linux desktop - clicking, typing, reading windows, waiting for UI state, or taking screenshots inside a sandbox or VM.
allowed-tools: Bash(deskctl:*), Bash(npx deskctl-cli:*), Bash(npm:*), Bash(which:*), Bash(printenv:*), Bash(echo:*)
allowed-tools: Bash(deskctl:*), Bash(npx deskctl:*), Bash(npm:*), Bash(which:*), Bash(printenv:*), Bash(echo:*)
---
# deskctl
@ -13,7 +13,7 @@ All output follows the runtime contract defined in [references/runtime-contract.
## Quick start
```bash
npm install -g deskctl-cli
npm install -g deskctl
deskctl doctor
deskctl snapshot --annotate
```