{"_id":"@alexcrondon/tx","_rev":"6-a24c49cd3a4f7cd2d89af4045b153776","name":"@alexcrondon/tx","dist-tags":{"latest":"0.2.0"},"versions":{"0.1.0":{"name":"@alexcrondon/tx","version":"0.1.0","license":"MIT","_id":"@alexcrondon/tx@0.1.0","maintainers":[{"name":"alexcrondon","email":"alex.crondon@gmail.com"}],"bin":{"tx":"bin/tx"},"dist":{"shasum":"3a1e78cff21d40dae7b4f7948a057a71f4073ab2","tarball":"https://registry.npmjs.org/@alexcrondon/tx/-/tx-0.1.0.tgz","fileCount":15,"integrity":"sha512-UmzeHiRrQ0slzW42U2yKvl9mG50Khs7mMSd6ExhupWiBzX3w2zwsmiUlkxTBVO5r0mDrzw+tUbN3B4VpWRL+kQ==","signatures":[{"sig":"MEUCIH0j00HP/P14+Gm1AAdV8RVY84kU0ZC/hPYF5b19rrxkAiEA4HBfKjv2Bit+BOZPv+gzUSjJJXD7kc0+/E4VTALQCIA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":58345},"gitHead":"986d24432f122eaeb51868d88d118fd9bb1d4c44","_npmUser":{"name":"alexcrondon","email":"alex.crondon@gmail.com"},"_npmVersion":"10.9.2","description":"Modular CLI for isolated dev environments using git worktrees","directories":{},"_nodeVersion":"22.17.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/tx_0.1.0_1772408569771_0.241151965784145","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@alexcrondon/tx","version":"0.1.1","license":"MIT","_id":"@alexcrondon/tx@0.1.1","maintainers":[{"name":"alexcrondon","email":"alex.crondon@gmail.com"}],"bin":{"tx":"bin/tx"},"dist":{"shasum":"b1a828abf4d184141926ab8f83c92895d0009c07","tarball":"https://registry.npmjs.org/@alexcrondon/tx/-/tx-0.1.1.tgz","fileCount":15,"integrity":"sha512-nNkg2cZQ99XU7AkT/p9MmnhzrhHdccPt9DCYye2y0k1r6I7x0HOBkuy/+SYNvZRRUjhdCuWcrk8e+u5t1nRcjQ==","signatures":[{"sig":"MEYCIQCbkWfooSjr1O0Z9BwHbK60Y7gRLL73nbG2lFWmzIy7mgIhAMEMToJ9PMH4Wf1WPPPt5vdiu8QdEodeQwvz7ACgv+jw","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":58713},"gitHead":"9e27c2d0d4dc72336056250285bf56be41615037","_npmUser":{"name":"alexcrondon","email":"alex.crondon@gmail.com"},"_npmVersion":"10.9.2","description":"Modular CLI for isolated dev environments using git worktrees","directories":{},"_nodeVersion":"22.17.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/tx_0.1.1_1772417741979_0.4950676291172742","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@alexcrondon/tx","version":"0.1.3","license":"MIT","_id":"@alexcrondon/tx@0.1.3","maintainers":[{"name":"alexcrondon","email":"alex.crondon@gmail.com"}],"bin":{"tx":"bin/tx"},"dist":{"shasum":"3dc2cfa9d6b17243924ce61f8b88f9e709cfa50d","tarball":"https://registry.npmjs.org/@alexcrondon/tx/-/tx-0.1.3.tgz","fileCount":15,"integrity":"sha512-9PyOWn2BV6CXj8YEYTTKEhIAfZDU98hrrErXf30ckJO2Vjm6XD0MrY1cO1z2YUijkSB5L/WwXQZeAMduOx2MXA==","signatures":[{"sig":"MEUCIQChPDrzTDBUiiLXRsdmY/rQXJgxt/Pgz4lEIhV5h2WeQAIgF6XvYAB4M97ZOF9ZrP6XJgrXslD3Sl67iihd/Xh2on4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":60229},"gitHead":"893daee3f0734e7c8ba03b3cab51bbc06da5a315","scripts":{"publish":"sh scripts/publish.sh"},"_npmUser":{"name":"alexcrondon","email":"alex.crondon@gmail.com"},"_npmVersion":"10.9.2","description":"Modular CLI for isolated dev environments using git worktrees","directories":{},"_nodeVersion":"22.17.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/tx_0.1.3_1772462427617_0.5483235288808797","host":"s3://npm-registry-packages-npm-production"}},"0.1.4":{"name":"@alexcrondon/tx","version":"0.1.4","license":"MIT","_id":"@alexcrondon/tx@0.1.4","maintainers":[{"name":"alexcrondon","email":"alex.crondon@gmail.com"}],"bin":{"tx":"bin/tx"},"dist":{"shasum":"e2dcfaab8d670218d8910b27e74473e21962fed5","tarball":"https://registry.npmjs.org/@alexcrondon/tx/-/tx-0.1.4.tgz","fileCount":15,"integrity":"sha512-G5KGC4taX4XGG9InFQRTElU0Oq7TM5GJ5FhNxeYNXlFa4jb8BGKO/faAnHrFResDaz8R//IVvIajWRljTD8+SQ==","signatures":[{"sig":"MEUCIQDj6ROCqpCDo8/pB9n0/NAxdrLjrXLy6eCroDedDWdyyAIgElAHcjzeUrZRypIHvNQyItMm7WJAB5SIBImXuONW9tI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":60446},"gitHead":"59d31ee053c508323756decbfa74133e6c4cbfd2","scripts":{"publish":"sh scripts/publish.sh"},"_npmUser":{"name":"alexcrondon","email":"alex.crondon@gmail.com"},"_npmVersion":"10.9.2","description":"Modular CLI for isolated dev environments using git worktrees","directories":{},"_nodeVersion":"22.17.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/tx_0.1.4_1772462623324_0.9806536438155673","host":"s3://npm-registry-packages-npm-production"}},"0.1.5":{"name":"@alexcrondon/tx","version":"0.1.5","license":"MIT","_id":"@alexcrondon/tx@0.1.5","maintainers":[{"name":"alexcrondon","email":"alex.crondon@gmail.com"}],"bin":{"tx":"bin/tx"},"dist":{"shasum":"395701bceb55516f8421ade1fef2fdeba3207ce3","tarball":"https://registry.npmjs.org/@alexcrondon/tx/-/tx-0.1.5.tgz","fileCount":15,"integrity":"sha512-IPv3D+ZkOOamMtGzkXGYQn4Pq0scUTBgg6c198urpwV+iz87yWULczVOZ3wsJ2APOfPeI4OMcJyD8mqSXgn1hg==","signatures":[{"sig":"MEYCIQCZM0bo+HSD/Z1DoncbGenQEi9lrMACAMcXMkkPT2k18QIhAKEDBRecnHjHeGncFOjoFLvxSJxbwHLtZFiCSdUSkBa9","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":60446},"gitHead":"05fd79e734cddb93abcfc8b33e57f974553aee8a","scripts":{"release":"sh scripts/release.sh"},"_npmUser":{"name":"alexcrondon","email":"alex.crondon@gmail.com"},"_npmVersion":"10.9.2","description":"Modular CLI for isolated dev environments using git worktrees","directories":{},"_nodeVersion":"22.17.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/tx_0.1.5_1772463240190_0.018737570875559495","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@alexcrondon/tx","version":"0.2.0","description":"Modular CLI for isolated dev environments using git worktrees","bin":{"tx":"bin/tx"},"scripts":{"release":"sh scripts/release.sh"},"license":"MIT","_id":"@alexcrondon/tx@0.2.0","gitHead":"817736241831626bb96decb8a158d68cc2a41e68","_nodeVersion":"22.17.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-TWthgi+MsN8peHl8yHNitktlum4AbwHH+1LDaTYNFLbw00dz5d3mKAge+MNoS/6DfmeuNY51PSZSXLBB15LqlA==","shasum":"90b858c464860e20adc40bb0a26049e3507afed4","tarball":"https://registry.npmjs.org/@alexcrondon/tx/-/tx-0.2.0.tgz","fileCount":14,"unpackedSize":62437,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIDHf/ji3T9LoaiAPlta5zTbPcageVjJy68UDBVmerQY1AiEAnwrZbK32PS409/LnoRZP/e+P6nuVhTs0cmPngHPkhRU="}]},"_npmUser":{"name":"alexcrondon","email":"alex.crondon@gmail.com"},"directories":{},"maintainers":[{"name":"alexcrondon","email":"alex.crondon@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/tx_0.2.0_1784819170844_0.9779331351771312"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-01T23:42:49.678Z","modified":"2026-07-23T15:06:11.150Z","0.1.0":"2026-03-01T23:42:49.920Z","0.1.1":"2026-03-02T02:15:42.122Z","0.1.3":"2026-03-02T14:40:27.768Z","0.1.4":"2026-03-02T14:43:43.459Z","0.1.5":"2026-03-02T14:54:00.354Z","0.2.0":"2026-07-23T15:06:10.989Z"},"license":"MIT","description":"Modular CLI for isolated dev environments using git worktrees","maintainers":[{"name":"alexcrondon","email":"alex.crondon@gmail.com"}],"readme":"# tx\n\nModular CLI for isolated dev environments built on git worktrees. Manage worktrees, dev servers, and database access for every project in a workspace from a single tool. Pure POSIX shell, zero runtime dependencies beyond `sh`, Git, and standard macOS tools.\n\n## Installation\n\n```bash\nnpm install -g @alexcrondon/tx\n```\n\nOr run without installing:\n\n```bash\nnpx @alexcrondon/tx\n```\n\n## Requirements\n\n- POSIX shell (`sh`)\n- Git (for worktrees)\n- macOS tools (`lsof`, `md5`, `osascript`) for server tracking and browser opening\n\n## Workspace Model\n\ntx is organized around a single **workspace root** — a directory you mark with `tx init`. Inside it:\n\n- **Projects** are the git repositories that sit directly under the root.\n- **Worktrees** live under `<root>/.worktrees/<project>/<name>`.\n- Everything tx manages (config, run state, db aliases) lives under `<root>/.tx/`.\n\n```\n~/toggl/                        workspace root (marked by .tx/)\n├── .tx/\n│   ├── config                  workspace-level config\n│   ├── databases               db aliases (alias:host:port:dbname:user)\n│   ├── projects/\n│   │   └── <name>.conf         per-project config overrides\n│   └── run/\n│       ├── serv/<md5>.{pid,port,dir,log,url}\n│       └── db.{pid,log}\n├── .worktrees/<project>/<name> worktrees\n├── frontend/                   a project (git repo)\n└── backend/                    a project (git repo)\n```\n\nA **target** is `<project>/<worktree>`, or `<project>`, or omitted — when omitted, tx infers it from your current directory.\n\n## Quick Start\n\n```bash\ncd ~/toggl\ntx init                            # mark this directory as the workspace root\n\ntx config start \"yarn dev\"         # workspace-wide default server command\ntx config frontend/port 9100       # per-project override\n\ntx wt add frontend/my_worktree_1   # create a worktree\ncd .worktrees/frontend/my_worktree_1\ntx serv start                      # start its dev server\n\ntx status                          # see all worktrees, servers, and db\ntx wt remove frontend/my_worktree_1\n```\n\n## Commands\n\n| Command | Default | Description |\n|---------|---------|-------------|\n| `tx` / `tx status [<project>]` | — | Show worktrees, servers, and db |\n| `tx init` | — | Mark the current directory as the workspace root |\n| `tx root` | — | Print the resolved workspace root |\n| `tx projects` | — | List project names, one per line |\n| `tx wt` | list | Git worktrees: add, remove, list |\n| `tx serv` | list | Dev servers: start, stop, restart, open, log, list |\n| `tx db` | status | Database process + query aliases |\n| `tx config` | show | Show or set configuration |\n| `tx nuke` | — | Stop everything, remove all worktrees |\n| `tx completions` | — | Emit zsh completions |\n| `tx --version` / `-v` | — | Show version number |\n\nRun `tx help` or `tx help <command>` for details.\n\n### Worktrees — `tx wt`\n\n```bash\ntx wt                              # list worktrees (default)\ntx wt list frontend                # list one project's worktrees\ntx wt list --names                 # bare <project>/<name> lines (for scripts)\n\ntx wt add frontend/my_worktree_1   # create a worktree (branch named after it)\ntx wt add frontend/fix -b fix/login -i   # custom branch, then run install\ntx wt remove frontend/my_worktree_1      # stop server, refuse if dirty/unpushed\ntx wt remove frontend -y           # remove all of a project's worktrees, no prompt\n```\n\n`add` checks out an existing local branch, tracks an existing remote branch, or forks a new one off the project's default branch (running a clean-tree + `git pull --ff-only` pre-flight first). `remove` never deletes branches; use `-f` to force past a dirty tree (untracked files count) or unpushed commits.\n\n### Dev servers — `tx serv`\n\n```bash\ntx serv                            # list all servers (default)\ntx serv start frontend/my_worktree_1 -o     # start and open browser when ready\ntx serv start frontend/my_worktree_1 -p 3000   # pick a specific port\ntx serv start frontend/my_worktree_1 \"npm run dev\"   # override the start command\ntx serv stop frontend/my_worktree_1\ntx serv stop all\ntx serv restart frontend/my_worktree_1\ntx serv open frontend/my_worktree_1\ntx serv log frontend/my_worktree_1\n```\n\n`start` flags: `-o/--open` (open the URL when ready), `-f/--front` (foreground), `-p/--port N` (specific port). With no target, tx infers it from your current directory.\n\n### Database — `tx db`\n\n```bash\ntx db                              # show the db process status (default)\ntx db start                        # start the configured db command in background\ntx db stop\ntx db log\ntx db list                         # list configured aliases\ntx db run main \"select now()\"      # run SQL against an aliased database\n```\n\nSet the db command with `tx config db \"<command>\"`. Aliases live in `<root>/.tx/databases`, one per line as `alias:host:port:dbname:user`; passwords are read from `~/.pgpass`.\n\n### Configuration — `tx config`\n\n```bash\ntx config                          # show config for the current directory\ntx config frontend                 # show a project's effective config\ntx config start \"npm run dev\"      # set a workspace-level value\ntx config frontend/port 4000       # set a project-level value\ntx config branch --unset           # remove a value\n```\n\n| Key | Scope | Default | Description |\n|-----|-------|---------|-------------|\n| `port` | project | `9001` | Starting port for servers |\n| `start` | project | `yarn start` | Default server command |\n| `url` | project | `http://localhost:{PORT}` | URL template (`{PORT}` substituted) |\n| `branch` | project | (auto-detected) | Default branch for new worktrees |\n| `copy` | project | (empty) | Glob patterns to copy into new worktrees |\n| `install` | project | `yarn install` | Install command for `wt add -i` |\n| `db` | workspace | (empty) | Background db command |\n| `auto_open` | workspace | `false` | Open browser after `serv start` |\n\nLoad order (later wins): built-in defaults → `<root>/.tx/config` → `<root>/.tx/projects/<name>.conf`. Worktrees are always at `<root>/.worktrees` — there is no directory config key.\n\n### Status and teardown\n\n```bash\ntx status                          # everything across the workspace\ntx status frontend                 # restrict to one project\n\ntx nuke                            # stop all servers + db, remove all worktrees\ntx nuke frontend -y                # scope to one project; leaves db untouched\n```\n\n`nuke` always forces past dirty/unpushed worktrees; `-y` skips the confirmation.\n\n## Shell completions\n\n```bash\n# zsh\nsource <(tx completions)\n# or add the line above to ~/.zshrc\n```\n\n## Upgrading to 0.2.0\n\n0.2.0 is a **clean break** to the workspace model. Old state and config are ignored, not migrated:\n\n- `.txrc` / `~/.txrc` config files are no longer read. Re-create your settings under the workspace with `tx init` then `tx config …` (written to `<root>/.tx/config` and `<root>/.tx/projects/<name>.conf`).\n- `~/.tx-databases` is gone; db aliases now live in `<root>/.tx/databases`.\n- Run state moved out of `/tmp/tx-*` into `<root>/.tx/run/`.\n- Worktrees moved from a per-repo `.worktrees` to `<root>/.worktrees/<project>/<name>`.\n- `tx code` and `tx tunnel` have been removed — run your editor/agent (e.g. `claude`) and `ngrok` directly.\n- The `worktrees_dir`, `code`, `tunnel`, `auto_tmux`, and `auto_start` config keys no longer exist.\n\n## License\n\n[MIT](LICENSE)\n","readmeFilename":"README.md"}