diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e95b27a..b7a4d6f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 329f151..c4b1ecf 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -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' diff --git a/.gitignore b/.gitignore index db552f7..40542a9 100644 --- a/.gitignore +++ b/.gitignore @@ -5,5 +5,5 @@ secret/ .claude/ .codex/ openspec/ -npm/deskctl-cli/vendor/ -npm/deskctl-cli/*.tgz +npm/deskctl/vendor/ +npm/deskctl/*.tgz diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 926c58a..97e8c7c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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` diff --git a/Makefile b/Makefile index 97857e3..7e1f852 100644 --- a/Makefile +++ b/Makefile @@ -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 \ diff --git a/README.md b/README.md index 32144f0..4b42b5f 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/docs/releasing.md b/docs/releasing.md index 7271b83..8f39d3f 100644 --- a/docs/releasing.md +++ b/docs/releasing.md @@ -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` diff --git a/docs/runtime-contract.md b/docs/runtime-contract.md index 0316c06..ee4727b 100644 --- a/docs/runtime-contract.md +++ b/docs/runtime-contract.md @@ -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`. diff --git a/npm/deskctl-cli/README.md b/npm/deskctl/README.md similarity index 67% rename from npm/deskctl-cli/README.md rename to npm/deskctl/README.md index fd6f610..7bb42a9 100644 --- a/npm/deskctl-cli/README.md +++ b/npm/deskctl/README.md @@ -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: diff --git a/npm/deskctl-cli/bin/deskctl.js b/npm/deskctl/bin/deskctl.js similarity index 91% rename from npm/deskctl-cli/bin/deskctl.js rename to npm/deskctl/bin/deskctl.js index 9f9b480..b8514cf 100644 --- a/npm/deskctl-cli/bin/deskctl.js +++ b/npm/deskctl/bin/deskctl.js @@ -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); diff --git a/npm/deskctl-cli/package.json b/npm/deskctl/package.json similarity index 86% rename from npm/deskctl-cli/package.json rename to npm/deskctl/package.json index 84f27ee..4dbaba6 100644 --- a/npm/deskctl-cli/package.json +++ b/npm/deskctl/package.json @@ -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": { diff --git a/npm/deskctl-cli/scripts/postinstall.js b/npm/deskctl/scripts/postinstall.js similarity index 94% rename from npm/deskctl-cli/scripts/postinstall.js rename to npm/deskctl/scripts/postinstall.js index de1b1d0..1f43ad0 100644 --- a/npm/deskctl-cli/scripts/postinstall.js +++ b/npm/deskctl/scripts/postinstall.js @@ -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); }); diff --git a/npm/deskctl-cli/scripts/support.js b/npm/deskctl/scripts/support.js similarity index 97% rename from npm/deskctl-cli/scripts/support.js rename to npm/deskctl/scripts/support.js index 8d41520..1fd0d47 100644 --- a/npm/deskctl-cli/scripts/support.js +++ b/npm/deskctl/scripts/support.js @@ -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}.` ); } diff --git a/npm/deskctl-cli/scripts/validate-package.js b/npm/deskctl/scripts/validate-package.js similarity index 87% rename from npm/deskctl-cli/scripts/validate-package.js rename to npm/deskctl/scripts/validate-package.js index 46d3e87..450fd6c 100644 --- a/npm/deskctl-cli/scripts/validate-package.js +++ b/npm/deskctl/scripts/validate-package.js @@ -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."); } } diff --git a/site/src/pages/index.astro b/site/src/pages/index.astro index b8bf92b..8b8d4b4 100644 --- a/site/src/pages/index.astro +++ b/site/src/pages/index.astro @@ -16,10 +16,6 @@ import DocLayout from "../layouts/DocLayout.astro"; then verify.

-
npm install -g deskctl-cli
-deskctl doctor
-deskctl snapshot --annotate
-

Start here