Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2026 Nexvyn

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
141 changes: 89 additions & 52 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,70 +1,107 @@
# OneClick Kit

One-click maintenance for Windows and Linux. The scripts are grouped by job:

| Folder | What it does | Runs in the one-click |
|---|---|---|
| `cleanup/` | Browser caches, system junk, developer caches (prunes pnpm and npm, clears yarn, bun, pip) | Yes, first |
| `update/` | The whole system: OS, drivers and firmware, store apps, all other apps | Yes, second |
| `install/` | Fresh PC: reinstall your apps, then set up the shared dev cache | No, run `first_install` on a new PC |

```
windows/ OneClickKit.exe (after build), build.bat, cleanup/, update/, install/, src/
linux/ oneclick.sh, cleanup/, update/, install/, lib/
docs/ shared-cache.md, convert-project-prompt.md
A Windows and Linux development-machine toolkit for fresh installation, shared caches, project cleanup and routine maintenance. Designed for small SSDs and reproducible project environments.

## Quick start

**One entry point:** `windows\oneclick.bat` or `bash linux/oneclick.sh`. Running without arguments is a read-only preview. Select `install`, `update`, `clean`, `cache`, or `all`; add `--apply` and explicitly confirm to execute. The `all` operation installs the approved profile, configures shared caches, updates managed software and offers a separate confirmation for eligible idle outputs. It never silently clears browsers, Trash, system files or shared download stores.

| Workflow | Windows | Linux |
| --- | --- | --- |
| Preview everything (safe default) | `windows\oneclick.bat` | `bash linux/oneclick.sh` |
| All operations | `windows\oneclick.bat all --apply` | `bash linux/oneclick.sh all --apply` |
| Install approved tools | `windows\oneclick.bat install --apply` | `bash linux/oneclick.sh install --apply` |
| Configure shared caches | `windows\oneclick.bat cache --apply` | `bash linux/oneclick.sh cache --apply` |
| Preview idle cleanup | `windows\oneclick.bat clean` | `bash linux/oneclick.sh clean` |
| Apply idle cleanup | `windows\oneclick.bat clean --apply` | `bash linux/oneclick.sh clean --apply` |
| Update only | `windows\oneclick.bat update --apply` | `bash linux/oneclick.sh update --apply` |

Run from a checked-out repository. On a fresh machine, the confirmed install operation can bootstrap Node.js through a supported package manager; otherwise install it from its official source. Project cache commands require Node.js. On Windows, update and all operations require an elevated terminal; the launcher refuses to proceed without it. No restart is initiated by the unified launcher.

## Approved tools

These are the 25 approved tools in [profiles/development.json](profiles/development.json). The installer never adds other standalone applications.

| Tool | Selection ID | Type |
| --- | --- | --- |
| [Traycer](https://traycer.ai/download) | `traycer` | Desktop app |
| [Cursor](https://cursor.com/) | `cursor` | Desktop app |
| [Moon](https://moonrepo.dev/moon) | `moon` | CLI |
| [GitHub CLI](https://cli.github.com/) | `github-cli` | CLI |
| [Biome](https://biomejs.dev/) | `biome` | Project dependency |
| [Vitest](https://vitest.dev/) | `vitest` | Project dependency |
| [Testing Library](https://testing-library.com/) | `testing-library` | Project dependency |
| [Playwright](https://playwright.dev/) | `playwright` | Project dependency |
| [Lighthouse](https://developer.chrome.com/docs/lighthouse/) | `lighthouse` | On demand |
| [Tauri](https://tauri.app/) | `tauri` | Project dependency |
| [Swift](https://swift.org/) | `swift` | Toolchain |
| [Kotlin](https://kotlinlang.org/) | `kotlin` | Toolchain |
| [Maestro](https://docs.maestro.dev/) | `maestro` | CLI |
| [Helium Browser](https://helium.computer/) | `helium` | Desktop app |
| [Cloudflare Kitesurf](https://developers.cloudflare.com/browser-run/kitesurf/) | `kitesurf` | Remote service |
| [Node.js](https://nodejs.org/en/download) | `nodejs` | Toolchain |
| [Notion](https://www.notion.so/desktop) | `notion` | Desktop app (Windows desktop; web on Linux) |
| [Discord](https://discord.com/download) | `discord` | Desktop app |
| [VLC](https://www.videolan.org/vlc/) | `vlc` | Desktop app |
| [7-Zip](https://www.7-zip.org/download.html) | `7zip` | Desktop app |
| [LocalSend](https://localsend.org/) | `localsend` | Desktop app |
| [FFmpeg](https://ffmpeg.org/download.html) | `ffmpeg` | CLI |
| [Figma](https://www.figma.com/downloads/) | `figma` | Desktop app (Windows desktop; web on Linux) |
| [WizTree](https://diskanalyzer.com/) | `wiztree` | Desktop app (Windows desktop only) |
| [Syncthing](https://syncthing.net/downloads/) | `syncthing` | Desktop app |

Install adapters currently cover selected WinGet packages on Windows and supported apt packages on Linux. Tools without an adapter are reported with official links; project dependencies remain project-pinned, and remote services require separate setup. The all-tools option installs only supported adapters, not every item in the catalog. Required compiler/runtime prerequisites are documented separately by each tool. The old exported application setup is still available through the separate `save_my_apps` and `install_apps` scripts; it is not part of the curated profile.

## Shared development cache

Shared package downloads (npm, pnpm, Yarn, Bun, pip and uv), eligible Rust compiler artifacts (sccache), and supported Gradle and browser downloads are configured centrally. Project-specific Rust build outputs are isolated by workspace/worktree. The project runner sets the appropriate target directory; normal Cargo invocations retain their existing configuration.

| Budget | Target |
| --- | --- |
| Aggregate disposable development data | 35 GiB (warning at 25 GiB) |
| Cargo target per project | 5 GiB (warning at 4 GiB) |
| Shared sccache | 5 GiB |
| Recommended free space | 40 GiB |
| Idle dependencies | 24 hours before eligible for review |
| Idle build outputs | 48 hours before eligible for review |

Budgets are retention targets, not hard quotas; active builds must be allowed to complete.

```sh
node tools/devcache.mjs activate /path/to/project
node tools/devcache.mjs run /path/to/project -- cargo build
node tools/devcache.mjs status
node tools/devcache.mjs deactivate /path/to/project
node tools/devcache.mjs plan
```

## Windows
Activation restores missing dependencies from the project's existing lockfile. Pin active or important projects to keep their generated files. Use [shared-cache.md](docs/shared-cache.md) for details and [convert-project-prompt.md](docs/convert-project-prompt.md) for existing projects.

**One click**
## One-click idle cleanup

1. Run `windows\build.bat` once. It creates `windows\OneClickKit.exe` with the C# compiler that ships with Windows, so nothing needs to be installed.
2. Double-click `OneClickKit.exe` and accept the admin prompt.
3. A 10-second countdown starts. Press any key to start now, or Esc to cancel.
4. It runs browser cleanup, Windows cleanup, developer cache cleanup, then updates. At the end it shows a summary and asks before restarting.
The clean-idle launchers preview registered inactive projects and their eligible generated dependency and build directories. With `--apply` they show the exact paths and ask for explicit interactive confirmation. Close editors, dev servers, tests and watches; preserve release artifacts and custom files before confirming. Active, pinned, recently used or unsafe paths are skipped. Shared package download stores are preserved to make restores faster. No unattended bulk deletion.

**What it touches**
## Update only

- Browser cleanup closes Chrome, Edge, Brave and Firefox and clears their cache for every profile. It never deletes history, cookies, passwords, logins or bookmarks.
- Windows cleanup clears your temp folder, Windows temp, old Windows Update downloads, the Delivery Optimization cache, crash reports and dumps, Windows logs older than 7 days, and the Recycle Bin. It reports how much space it freed. It does not clear Prefetch, because Windows uses Prefetch to start apps faster.
- Developer cleanup runs `pnpm store prune` (removes only packages no project uses), `npm cache verify` (removes only broken or unused entries), `yarn cache clean`, `bun pm cache rm` and `pip cache purge` for the tools you have. The npm cache and pnpm store can be your [shared cache](docs/shared-cache.md), so they are only pruned, never wiped.
- Updates cover Microsoft Defender definitions, Windows Update (including drivers and other Microsoft products, through PSWindowsUpdate, which is installed automatically), Microsoft Store apps and every winget app. It never restarts by itself.
Run the update-only launcher with `--apply` to update without invoking cleanup.

**Fresh PC**
- Windows: Windows Update and supported drivers, Defender definitions, Microsoft Store update requests and WinGet-managed applications.
- Linux: the detected apt, dnf, pacman or zypper package manager, Flatpak, Snap and supported firmware through fwupd.

1. On your old PC, run `windows\install\save_my_apps.bat`. It writes `apps.json` next to the script. Commit that file if you want it in the repo.
2. On the new PC, clone the repo and run `windows\install\first_install.bat`. It installs the apps from `apps.json`, then runs `setup_shared_cache.bat`. That creates the [shared dev cache](docs/shared-cache.md), installs `sccache` and `pnpm` if they are missing, and points pnpm, npm, Cargo, sccache, Gradle and Puppeteer at it.
3. Restart the PC, then run `pnpm install` in each project. To move an existing project onto the shared cache, paste [convert-project-prompt.md](docs/convert-project-prompt.md) into that project's AI.
Coverage depends on installed package managers and supported devices; independently installed apps may require their own updater. Restart is never automatic without user confirmation.

Each part also runs on its own: `install_apps.bat`, `setup_shared_cache.bat`.
## Optional legacy system cleanup

## Linux
The existing browser/system maintenance helpers remain separate from the unified launcher. They can close browser processes and clear system junk including Trash or Recycle Bin, so use their dry-run options and explicitly review them. The legacy Windows executable, built with `windows\build.bat`, makes no changes when opened without arguments and requires explicit confirmation with `--apply` for its combined maintenance workflow.

Supports apt (Ubuntu, Debian, Mint, Pop!_OS), dnf (Fedora), pacman (Arch, Manjaro) and zypper (openSUSE), plus Flatpak, Snap and fwupd firmware updates.
## Development and tests

```bash
git clone https://github.com/Nexvyn/OneClick-Kit.git
cd OneClick-Kit
bash linux/oneclick.sh
```sh
node --test tests/development.test.mjs
```

Run it as your normal user, not with `sudo`. It asks for your password once. It runs the same four steps as on Windows, using your distro's tools, then shows a summary and asks before restarting.

**Fresh PC:** run `bash linux/install/save_my_apps.sh` on the old machine and commit the `packages-*.txt`, `flatpak.txt` and `snap.txt` files if you want them in the repo. On the new machine run `bash linux/install/first_install.sh`. It installs the apps, then sets up the [shared dev cache](docs/shared-cache.md) (settings go in a marked block in `~/.profile`).

## Preview first

Every script has a preview mode that changes nothing and prints what it would do:

- Windows: `OneClickKit.exe --dry-run`, or any script with `/dryrun`, for example `windows\cleanup\clean_windows_junk.bat /dryrun`
- Linux: `bash linux/oneclick.sh --dry-run`, or any script with `--dry-run`

## Run one step

Every script also works on its own. Double-click a `.bat` file, or run `bash linux/<folder>/<script>.sh`.
See [development-profile.md](docs/development-profile.md) for tool selection and [shared-cache.md](docs/shared-cache.md) for project lifecycle controls. The executables are not signed; use the source and retain your normal security protections. Never publish private app exports or secrets.

## Notes
## License

- The Windows scripts are packed inside the exe, so run `build.bat` again after you edit one.
- The exe is unsigned. Windows SmartScreen or antivirus may warn about it if it is downloaded or shared. Building it yourself avoids that.
- This repo is public. If you commit your app lists, anyone can see which apps you use.
[MIT](LICENSE)
22 changes: 12 additions & 10 deletions docs/convert-project-prompt.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
# Convert a project to the shared cache

Paste this into the AI of each project. Set up the shared cache first (see [shared-cache.md](shared-cache.md)).
Paste into the AI for the project:

```
Convert this project to the shared cache. Use pnpm only.

1. Tell me the size of node_modules and of any local target, build and .gradle folders, then wait for my yes.
2. If package-lock.json or yarn.lock exists, run `pnpm import` first.
3. After my yes, delete only: node_modules, local target folders, the old lockfile (package-lock.json or yarn.lock). Nothing else.
4. Run `pnpm install`.
5. Run the project's build and tests.
6. Confirm to me in 3 lines: new node_modules size, build result, test result.
```text
Inspect the project root, current package manager, lockfile, Cargo workspace
and existing build/cache paths. Report sizes without deleting anything.
Preserve the existing lockfile, package manager, source, local patches and
configuration. Use the OneClick Kit devcache activate and run commands
from the documented workspace root. Use a unique Cargo target directory
and shared sccache; never share a mutable target across projects.
Run the existing build and tests, then report the results and disk usage.
Do not clean active workspaces. Plan cleanup for inactive generated outputs
only after the documented grace period and get explicit owner approval.
Do not change toolchains or migrate package managers without approval.
```
21 changes: 21 additions & 0 deletions docs/development-profile.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Development profile

[profiles/development.json](../profiles/development.json) contains the 25 approved tools and retention settings.

With Node.js installed:

```sh
node tools/plan-development.mjs
node tools/install-development.mjs
node tools/install-development.mjs --apply cursor github-cli
```

The first two commands preview available choices without installing anything. Installation requires explicit tool IDs and --apply. The installer uses exact approved WinGet IDs or available distribution packages through apt; existing matching installs are skipped. Tools lacking verified adapters are listed with their official links for manual installation. Project-specific packages, toolchains needing additional prerequisites, and remote services are not installed globally. No extra standalone applications are added to the manifest.

For cache setup and project commands, see [shared-cache.md](shared-cache.md).

The existing exported-app restore remains a separate opt-in workflow. Do not use it if you want only the curated profile.

The first-install scripts now use the curated profile by default. With no arguments they preview; pass --apply plus specific tool IDs to apply and configure the shared cache. Install Node.js from its official source first if it is missing. To restore an exported app list, use the existing install_apps script explicitly.

To preview all approved tools, run the installer with no arguments. To install all supported adapters explicitly, use `node tools/install-development.mjs --apply --all`, or pass `--apply --all` to the first-install launcher. Manual and project-specific entries are still reported, not force-installed.
Loading