site init (barrett)

This commit is contained in:
Harivansh Rathi 2026-03-25 15:44:35 -04:00 committed by Hari
parent f05f441dee
commit 50c9594780
15 changed files with 5862 additions and 0 deletions

View file

@ -0,0 +1,19 @@
---
layout: ../layouts/DocLayout.astro
title: Architecture
toc: true
---
# Architecture
## Client-daemon model
deskctl uses a client-daemon architecture over Unix sockets with an NDJSON wire protocol. The daemon starts automatically on the first command and keeps the X11 connection alive for fast repeated calls.
## Backend design
The backend is trait-based, making it straightforward to add support for different display servers. The current implementation targets X11 via `x11rb`.
## Wayland support
Coming soon. The trait-based backend design means adding Hyprland/Wayland support is a single trait implementation with zero refactoring of the core.

View file

@ -0,0 +1,35 @@
---
import DocLayout from "../layouts/DocLayout.astro";
---
<DocLayout title="" description="desktop control for AI agents">
<header>
<h1>deskctl</h1>
<code>desktop control CLI for AI agents</code>
</header>
<p>
X11 desktop control CLI for AI agents on Linux. Snapshot, click, type, and
focus windows through a simple command-line interface with a client-daemon
architecture over Unix sockets.
</p>
<h2>Documentation</h2>
<ul>
<li><a href="/installation">Installation</a></li>
<li><a href="/usage">Usage</a></li>
<li><a href="/architecture">Architecture</a></li>
</ul>
<h2>Links</h2>
<ul>
<li>
<a href="https://github.com/harivansh-afk/deskctl">GitHub</a>
</li>
<li>
<a href="https://crates.io/crates/deskctl">crates.io</a>
</li>
</ul>
</DocLayout>

View file

@ -0,0 +1,45 @@
---
layout: ../layouts/DocLayout.astro
title: Installation
---
# Installation
## Cargo
```sh
cargo install deskctl
```
## Docker build
Build a Linux binary with Docker:
```sh
docker compose -f docker/docker-compose.yml run --rm build
```
This writes `dist/deskctl-linux-x86_64`.
## From source
```sh
git clone https://github.com/harivansh-afk/deskctl
cd deskctl
cargo build
```
## Deploy to a remote machine
Copy the binary to an SSH machine:
```sh
ssh -p 443 deskctl@ssh.agentcomputer.ai 'cat > ~/deskctl && chmod +x ~/deskctl' < dist/deskctl-linux-x86_64
```
## Runtime requirements
- Linux with X11 session
- `DISPLAY` environment variable set
- `XDG_SESSION_TYPE=x11`
- A window manager exposing standard EWMH properties

53
site/src/pages/usage.mdx Normal file
View file

@ -0,0 +1,53 @@
---
layout: ../layouts/DocLayout.astro
title: Usage
toc: true
---
# Usage
## Snapshot
Capture the current desktop state:
```sh
deskctl snapshot
```
With annotations overlaid on windows:
```sh
deskctl --json snapshot --annotate
```
## Click
Click a window by its annotation handle:
```sh
deskctl click @w1
```
## Type
Type text into the focused window:
```sh
deskctl type "hello world"
```
## Focus
Focus a window by name:
```sh
deskctl focus "firefox"
```
## JSON output
Pass `--json` for machine-readable output, useful for agent integrations:
```sh
deskctl --json snapshot
```