Wicket runs development commands under macOS Seatbelt. Use it when installing an unfamiliar Node dependency, running a test suite, or starting a dev server that only needs one local port. The command and its children get a private home directory, a clean environment, and access to the project you selected. Outbound networking starts off by default.
wicket --npm-registry-only -- npm install
wicket --offline -- npm testThe first command lets npm and its install scripts reach the public npm registry. For a project with a compatible lockfile, strict npm mode can download the pinned archives first and then run every install script offline.
On macOS, install the universal Apple Silicon and Intel binary from Techery's Homebrew tap:
brew install techery/formulae/wicket
wicket --checkIf Homebrew asks you to trust the formula, run brew trust --formula techery/formulae/wicket and repeat the install. To update, run brew update and brew upgrade wicket. Shell wrapping is opt-in through wicket setup.
To build from source, you need macOS with /usr/bin/sandbox-exec, Rust 1.85 or newer, and the Apple Command Line Tools:
git clone https://github.com/techery/wicket.git
cd wicket
cargo install --locked --path . --root "$HOME/.local"
"$HOME/.local/bin/wicket" --checkThe check creates disposable files and verifies that a process can write to its project and fails to read a file outside it. For a source install, add ~/.local/bin to your PATH. Run them from the directory of the project you want to protect, separate from the Wicket executable.
Wicket discovers Node and npm from active mise and nvm installations, with a fallback to the global mise Node installation. For another layout or a different language, pass an installation prefix containing bin/ (for example, wicket --toolchain /absolute/path/to/sdk -- my-tool --version). The entire explicit prefix becomes readable. System tools such as /bin/sh work without a Node installation.
wicket explain --install
wicket --trial --strict-npm --npm-registry-only -- npm ciThe preview selects the installer from the lockfile and checks its inputs without running it. The trial installs into a disposable copy, prints the changed paths, and returns the command's exit status. To install the same public archives into your actual project afterward:
wicket --strict-npm --offline -- npm ci| Install mode | Fetch phase | Access for the installer and its children |
|---|---|---|
--npm-registry-only -- npm install |
npm fetches through a local broker limited to HTTPS at registry.npmjs.org:443. |
The same registry remains reachable during scripts. |
--strict-npm --npm-registry-only -- npm ci |
Wicket prepares SHA-512-pinned public tarballs from npm lockfile v2/v3. | Offline, with a private npm cache. |
--pnpm-cache --npm-registry-only -- pnpm install |
Wicket prepares a public store for standalone pnpm 12 from mise and a supported v9 lockfile. | Offline, with an independent copy of the store. |
--yarn-cache --npm-registry-only -- yarn install |
Wicket prepares public npm packages for Yarn 4 from a local Corepack installation and checks the locked ZIP digests. | Offline, with a private cache and an immutable install. |
On APFS, Wicket uses copy-on-write clones where available. Each project can modify its copy independently. A cold cache requires an approved fetch. Use wicket cache info to inspect the shared caches and wicket cache prune to clear them. Strict npm expects a registry-backed lockfile at the project root. Git dependencies, local workspace links, and npm shrinkwrap are unsupported in that mode. For a private npm registry, configure a named registry profile with its HTTPS origin, allowed scopes, and optional CA and token variable. The host-side fetcher receives the token and verifies each archive before the offline install.
wicket setup # Bash and Zsh
# Or select one shell:
wicket setup --shell zshOpen a new interactive terminal and run command -v npm. With the default setup it resolves to ~/.local/share/wicket/shims/npm. Fresh setups wrap node, npm, and npx. An existing [shell].wrap list takes precedence, including an empty list. Re-running setup keeps one managed line per startup file. For symlink-managed dotfiles, run wicket shell sync and add source <(wicket shell init) yourself in Bash or Zsh.
To make npm install work against the public registry in your shell, add this trusted rule to ~/.config/wicket/config.toml:
[commands."npm install"]
network = "npm-registry-only"To turn off automatic wrapping, set wrap = [] in the existing [shell] section and run wicket shell sync. To remove shell initialization as well, delete the lines marked # wicket setup from your startup files. In IDE tasks and CI, invoke the installed Wicket executable explicitly and pass the command as an argument array.
If you used a build under the previous project name, port your personal rules to ~/.config/wicket/config.toml and rename each project rules file to .wicket.toml before running a workload. Review wicket explain for that command. Re-sign named profiles for the new namespace and renew checkout approvals. Wicket uses its own cache and shell shims.
Commit a .wicket.toml to restrict project access. For example, these rules hide a credentials file and allow the build to write only under dist:
[files]
deny_read = ["credentials.json"]
[commands."npm run build"]
network = "off"
write_only = ["dist"]Paths are relative to the file defining the rule. Add the output directories your build actually uses. Use wicket explain -- npm run build to see which rules apply. A checkout can narrow rights or request additional endpoints. A new grant requires approval from outside the checkout.
For a local backend, create ~/.config/wicket/policies/dev.toml with the endpoints your application needs:
listen_local = [5173]
connect_local = [5432]wicket --policy dev -- npm run devThis lets a compatible Node server listen on IPv4 loopback port 5173 and connect to a local database on port 5432. Wicket can also allocate a port per run, allow a specific Unix socket, or expose a fixed remote host and port through a private Unix-socket relay. The application must support the relevant transport. See the configuration guide for examples, project requests, signed profiles, and corporate registries. A coding agent can read the guide for the installed version with wicket guide.
| Command or option | What it gives you |
|---|---|
wicket explain --install --json |
The install command and mode, or an actionable diagnostic. An invalid strict npm entry includes its lockfile location. |
wicket explain --json -- npm test |
The resolved paths, network settings, policy digest, and approval state. CI can require the reviewed digest with --expect-policy-sha256. |
--audit-dir DIR --audit-job ID |
Per-run JSONL events in a private directory outside the project, including policy identity and child status. |
--trial --trial-json FILE |
A machine-readable filesystem change report for a disposable run. Supply a new filename. |
wicket doctor vite --port 5173 |
Checks HTTP, the Vite WebSocket, and file-change delivery against an already running dev server. Run from its served root. |
wicket inspect-secrets |
Suggests paths to exclude based on filenames, without reading secret values. |
- Files and credentials. The project is readable and writable by default. Files named
.envand.env.*are protected, and writes to.gitand.wicket.tomlare denied. Add explicit restrictions for other project secrets, including credential-bearing config files. A pre-existing hard link can expose the same contents under another allowed name. Files and sockets you explicitly attach, including stdin/stdout/stderr redirections opened by the parent shell, convey access of their own. - Dependencies and networking. A matching digest establishes that bytes match the lockfile. Package reputation, vulnerability scanning, and revocation require separate controls. An allowed registry or service can still receive data available to the child.
--networkgrants general outbound network access unless project policy narrows it. Use--offlineto explicitly close the network. - Scope. Wicket protects processes launched through it. A user who controls their shell can invoke another binary directly. Signed profiles support managed workflows. Machine-wide enforcement, resource quotas, and complete system-call auditing are outside its scope. Trial mode discards its project copy, while writes to authorized external services and databases can persist.
- Platform. Runtime enforcement requires macOS Seatbelt. Linux and Windows have no Wicket enforcement backend. Run
wicket --checkon each target Mac after system upgrades. The design notes describe the enforcement boundary and the trusted components.
cargo fmt --check
cargo clippy --locked --all-targets -- -D warnings
cargo test --locked
cargo build --release --lockedThe integration tests need a regular macOS account that can start Seatbelt, a discoverable Node/npm toolchain, and system Python 3. They exercise real processes, local sockets, and temporary settings. The optional browser test uses Vite and Chromium. See the test instructions, runnable demo, and benchmark protocol and measurements.