Machinen
 __  __    _    ____ _   _ ___ _   _ _____ _   _
|  \/  |  / \  / ___| | | |_ _| \ | | ____| \ | |
| |\/| | / _ \| |   | |_| || ||  \| |  _| |  \| |
| |  | |/ ___ \ |___|  _  || || |\  | |___| |\  |
|_|  |_/_/   \_\____|_| |_|___|_| \_|_____|_| \_|

Your computer is already a cloud.

Your computer is already a cloud. Machinen makes it feel like one.

You already have machines: one on your lap, one on your desk, maybe one humming in a closet. Machinen gives you small, named Linux VMs on the hardware you control. They run in the background, keep terminal sessions alive, and let you reconnect from another shell later.

No tiny rented slice. No hyperscaler-shaped workflow. Just cloud-shaped computers that belong to you.

=== THE LOOP ============================================================================

Start a little Linux machine, detach from it, and come back later. attach opens a real PTY with job control, tab completion, full-screen TUIs, and Ctrl-C going to the guest.

> terminal.sh
npx machinen boot --name work --detach -- sleep infinity
npx machinen attach work

# from another terminal, another SSH session, or after your client drops:
npx machinen attach work

By default, attach creates or reconnects a persistent session named default. If your host terminal or SSH connection disappears, the shell keeps running inside the VM.

> sessions.sh
npx machinen attach --session editor work   # another persistent terminal
npx machinen sessions work                  # list live sessions
npx machinen session-kill work editor       # reset one session
npx machinen stop work                      # shut down the VM
=== A TINY SERVICE YOU OWN ============================================================================

Boot a service as a named VM, forward a port, and reach into it whenever you want. The VM, port forward, and guest exec agent stay alive after the boot command returns.

> counter.sh
npx machinen boot --name counter -p 3000:3000 --detach ./counter.tar.gz
curl localhost:3000                        # { count: 1 }
curl localhost:3000                        # { count: 2 }

npx machinen exec counter -- ps aux         # one-off command
npx machinen attach counter                 # reconnectable shell/TUI
=== POWER TOOLS ============================================================================
> SNAPSHOT

Freeze the VM exactly as it is: CPU state, memory, devices, and disk.

> RESTORE

Thaw the snapshot on another same-architecture host and continue.

> FORK

Branch a warm VM into siblings that diverge from the same moment.

> power-tools.sh
npx machinen snapshot counter ./counter.snap
scp -r ./counter.snap host-b:
ssh host-b npx machinen restore ./counter.snap -p 3000:3000 &

npx machinen fork counter --new-name counter-b --detach
=== WHAT YOU GET ============================================================================
[x] Small, named Linux VMs on hardware you control
[x] Persistent terminal sessions, no tmux required
[x] One-off exec for scripts and agent tools
[x] Port forwards and live host-directory mounts
[x] Snapshot, restore, fork, and handoff
[x] Apple Silicon, arm64 Linux, and amd64 Linux/KVM
$npm i @machinen/cli @machinen/runtime
$npx machinen boot --name work --detach -- sleep infinity
$npx machinen attach work
=== INSTALL ============================================================================
> install.sh
npm i @machinen/cli @machinen/runtime
npx machinen --help