{"_id":"@dogagenc/tmux.js","_rev":"5-5f0aff33691c0f8a82e605daa8cf9be2","name":"@dogagenc/tmux.js","dist-tags":{"latest":"0.1.2"},"versions":{"0.1.0":{"name":"@dogagenc/tmux.js","version":"0.1.0","keywords":["tmux","cli","effect","typescript","terminal","node"],"author":{"name":"Doga Genc"},"license":"ISC","_id":"@dogagenc/tmux.js@0.1.0","maintainers":[{"name":"doga.io","email":"dogagenc@gmail.com"}],"homepage":"https://github.com/dogagenc/tmux.js#readme","bugs":{"url":"https://github.com/dogagenc/tmux.js/issues"},"dist":{"shasum":"0ac4e7042f0a015e1aadcedefb3770f54dff4307","tarball":"https://registry.npmjs.org/@dogagenc/tmux.js/-/tmux.js-0.1.0.tgz","fileCount":271,"integrity":"sha512-kVN9psZ0bC6ijytfNlp/Ws5uLfHf3rLTks4b0E3XJ03o+BrrmaaRhxx0Lqkks7TPGZceE5l537oiLn3ndj4AFw==","signatures":[{"sig":"MEQCIFgKXFdJybelEOym7Fv3ad7C42LUW5AKmwaKrpLsRZhCAiAxQ979EsvFrvw68h4W/8IGxk9JYOkptgH8RoNYgwnduw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":320067},"main":"./dist/exports/node.js","type":"module","types":"./dist/exports/node.d.ts","module":"./dist/exports/node.js","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/exports/node.d.ts","import":"./dist/exports/node.js"},"./bun":{"types":"./dist/exports/bun.d.ts","import":"./dist/exports/bun.js"},"./effect":{"types":"./dist/exports/effect.d.ts","import":"./dist/exports/effect.js"}},"gitHead":"7ef937f15332e867d55fd6cb0511bbc4b75d7a57","scripts":{"docs":"typedoc","lint":"biome lint .","test":"vitest run","build":"tsc -p tsconfig.build.json","check":"biome check .","format":"biome format --write .","run:index":"tsx examples/index.ts","typecheck":"tsc -p tsconfig.typecheck.json","run:effect":"tsx examples/effect.ts","check:flags":"node scripts/check-flag-coverage.mjs","diagnostics":"effect-language-service diagnostics --project \"$PWD/tsconfig.json\" --format text","prepublishOnly":"pnpm build && pnpm test","test:integration":"vitest run --config vitest.integration.config.ts"},"_npmUser":{"name":"doga.io","email":"dogagenc@gmail.com"},"deprecated":"Renamed - install tmux.ts instead: https://www.npmjs.com/package/tmux.ts","repository":{"url":"git+https://github.com/dogagenc/tmux.js.git","type":"git"},"_npmVersion":"11.16.0","description":"TypeScript-first programmatic tmux for Node.js and Bun","directories":{},"_nodeVersion":"24.18.0","dependencies":{"effect":"4.0.0-beta.92","@effect/platform-bun":"4.0.0-beta.92","@effect/platform-node":"4.0.0-beta.92"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"pnpm@10.27.0","devDependencies":{"tsx":"^4.22.4","vitest":"^4.1.9","typedoc":"^0.28.20","typescript":"^6.0.3","@types/node":"^25.9.3","@biomejs/biome":"^2.5.0","@effect/vitest":"4.0.0-beta.92","@effect/language-service":"^0.86.2"},"_npmOperationalInternal":{"tmp":"tmp/tmux.js_0.1.0_1788428398880_0.09490030181723719","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@dogagenc/tmux.js","version":"0.1.1","keywords":["tmux","cli","effect","typescript","terminal","node"],"author":{"name":"Doga Genc"},"license":"ISC","_id":"@dogagenc/tmux.js@0.1.1","maintainers":[{"name":"doga.io","email":"dogagenc@gmail.com"}],"homepage":"https://github.com/dogagenc/tmux.js#readme","bugs":{"url":"https://github.com/dogagenc/tmux.js/issues"},"dist":{"shasum":"5d7d1f8b16310094478df1ed2b1956cf5e5f5cab","tarball":"https://registry.npmjs.org/@dogagenc/tmux.js/-/tmux.js-0.1.1.tgz","fileCount":247,"integrity":"sha512-E5bYO63/EDr6+gXu5CVna6eDWTQkgSmz4Spjirra8xOJW2X3CaANM7v1h/3OnYdP3N9Yan1BkgxuPAaH+A+cgw==","signatures":[{"sig":"MEYCIQDsTtHCAi6hba9KsLAplagHy2F2lxWgm0lGPwhYtd1LoQIhANgW+i8HUIaZZq+ga4vrrP3eDzHyw/ArGGpUDGgMDqz4","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":279013},"main":"./dist/exports/node.js","type":"module","types":"./dist/exports/node.d.ts","module":"./dist/exports/node.js","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/exports/node.d.ts","import":"./dist/exports/node.js"},"./bun":{"types":"./dist/exports/bun.d.ts","import":"./dist/exports/bun.js"},"./effect":{"types":"./dist/exports/effect.d.ts","import":"./dist/exports/effect.js"}},"gitHead":"baeafa1ca2ce53d1426650e9d7de46692b07e112","scripts":{"docs":"typedoc","lint":"biome lint .","test":"vitest run","build":"rm -rf dist && tsc -p tsconfig.build.json","check":"biome check .","format":"biome format --write .","run:index":"tsx examples/index.ts","typecheck":"tsc -p tsconfig.typecheck.json","run:effect":"tsx examples/effect.ts","check:flags":"node scripts/check-flag-coverage.mjs","diagnostics":"effect-language-service diagnostics --project \"$PWD/tsconfig.json\" --format text","prepublishOnly":"pnpm build && pnpm test","test:integration":"vitest run --config vitest.integration.config.ts"},"_npmUser":{"name":"doga.io","email":"dogagenc@gmail.com"},"repository":{"url":"git+https://github.com/dogagenc/tmux.js.git","type":"git"},"_npmVersion":"11.16.0","description":"TypeScript-first programmatic tmux for Node.js and Bun","directories":{},"_nodeVersion":"24.18.0","dependencies":{"effect":"4.0.0-beta.92","@effect/platform-bun":"4.0.0-beta.92","@effect/platform-node":"4.0.0-beta.92"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"pnpm@10.27.0","devDependencies":{"tsx":"^4.22.4","vitest":"^4.1.9","typedoc":"^0.28.20","typescript":"^6.0.3","@types/node":"^25.9.3","@biomejs/biome":"^2.5.0","@effect/vitest":"4.0.0-beta.92","@effect/language-service":"^0.86.2"},"_npmOperationalInternal":{"tmp":"tmp/tmux.js_0.1.1_1788428756376_0.5862608412129366","host":"s3://npm-registry-packages-npm-production"},"deprecated":"Renamed - install tmux.ts instead: https://www.npmjs.com/package/tmux.ts"},"0.1.2":{"name":"@dogagenc/tmux.js","version":"0.1.2","keywords":["tmux","cli","effect","typescript","terminal","node"],"author":{"name":"Doga Genc"},"license":"ISC","_id":"@dogagenc/tmux.js@0.1.2","maintainers":[{"name":"doga.io","email":"dogagenc@gmail.com"}],"homepage":"https://github.com/dogagenc/tmux.js#readme","bugs":{"url":"https://github.com/dogagenc/tmux.js/issues"},"dist":{"shasum":"3fe409ac6f73aeda2eec2cbe3684d570edbba24a","tarball":"https://registry.npmjs.org/@dogagenc/tmux.js/-/tmux.js-0.1.2.tgz","fileCount":247,"integrity":"sha512-bSeVxtXVJsWqRY0w6L54wAwxFDBz31/8dnCip71mwTyW6NhBtxwwII33phWHUSC5gnaqPB1aCpCzu1CUPDyLUA==","signatures":[{"sig":"MEQCIDW/qgIIdvsKkeXrQa7CL4jSx0HqsV59/9idXHsGbPujAiA2xzQCHJ/9mSUw1uUaeOzLfYG2YV01kzQqUc0/nx67uA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":278831},"main":"./dist/exports/node.js","type":"module","types":"./dist/exports/node.d.ts","module":"./dist/exports/node.js","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/exports/node.d.ts","import":"./dist/exports/node.js"},"./bun":{"types":"./dist/exports/bun.d.ts","import":"./dist/exports/bun.js"},"./effect":{"types":"./dist/exports/effect.d.ts","import":"./dist/exports/effect.js"}},"gitHead":"f08b66dff93a166714b85e2ba24e2848abd3aa23","scripts":{"docs":"typedoc","lint":"biome lint .","test":"vitest run","build":"rm -rf dist && tsc -p tsconfig.build.json","check":"biome check .","format":"biome format --write .","run:index":"tsx examples/index.ts","typecheck":"tsc -p tsconfig.typecheck.json","run:effect":"tsx examples/effect.ts","check:flags":"node scripts/check-flag-coverage.mjs","diagnostics":"effect-language-service diagnostics --project \"$PWD/tsconfig.json\" --format text","prepublishOnly":"pnpm build && pnpm test","test:integration":"vitest run --config vitest.integration.config.ts"},"_npmUser":{"name":"doga.io","email":"dogagenc@gmail.com"},"repository":{"url":"git+https://github.com/dogagenc/tmux.js.git","type":"git"},"_npmVersion":"11.16.0","description":"TypeScript-first programmatic tmux for Node.js and Bun","directories":{},"_nodeVersion":"24.18.0","dependencies":{"effect":"4.0.0-rc.112","@effect/platform-bun":"4.0.0-rc.112","@effect/platform-node":"4.0.0-rc.112"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"pnpm@10.27.0","devDependencies":{"tsx":"^4.22.4","vitest":"^4.1.9","typedoc":"^0.28.20","typescript":"^6.0.3","@types/node":"^25.9.3","@biomejs/biome":"^2.5.0","@effect/vitest":"4.0.0-rc.112","@effect/language-service":"^0.86.2"},"_npmOperationalInternal":{"tmp":"tmp/tmux.js_0.1.2_1788429476634_0.1372844326248548","host":"s3://npm-registry-packages-npm-production"},"deprecated":"Renamed - install tmux.ts instead: https://www.npmjs.com/package/tmux.ts"}},"time":{"created":"2026-09-03T09:39:58.695Z","modified":"2026-09-05T08:03:35.585Z","0.1.0":"2026-09-03T09:39:59.016Z","0.1.1":"2026-09-03T09:45:56.539Z","0.1.2":"2026-09-03T09:57:56.765Z"},"bugs":{"url":"https://github.com/dogagenc/tmux.js/issues"},"author":{"name":"Doga Genc"},"license":"ISC","homepage":"https://github.com/dogagenc/tmux.js#readme","keywords":["tmux","cli","effect","typescript","terminal","node"],"repository":{"url":"git+https://github.com/dogagenc/tmux.js.git","type":"git"},"description":"TypeScript-first programmatic tmux for Node.js and Bun","maintainers":[{"name":"doga.io","email":"dogagenc@gmail.com"}],"readme":"# tmux.js\n\nTypeScript-first programmatic tmux for Node.js and Bun.\n\nThis package is an early-stage wrapper around the `tmux` CLI. Commands will be added as the project needs them, rather than trying to mirror all of tmux up front.\n\n## Goals\n\n- Run tmux commands from Node.js and Bun\n- Provide a TypeScript API for common tmux workflows\n- Support both plain TypeScript and Effect usage\n- Keep behavior close to tmux itself\n- Add API surface incrementally\n\n## Installation\n\n```sh\nnpm install @dogagenc/tmux.js\n```\n\nRequires a `tmux` binary of version 3.4 or newer on `PATH`. Tested against tmux 3.4 through 3.6.\n\n## Entry points\n\nThe package ships ESM-only with three entry points:\n\n- `@dogagenc/tmux.js` — standalone Promise-based API for Node-compatible runtimes. No Effect knowledge required.\n- `@dogagenc/tmux.js/bun` — standalone Promise-based API backed by Bun platform services.\n- `@dogagenc/tmux.js/effect` — Effect-native API (`TmuxClient` service + base layer + tagged errors) for Effect users.\n\nAll entry points expose the same tagged error classes (`TmuxExecutableNotFound`, `TmuxProcessError`, `TmuxServerNotRunning`, `TmuxTargetNotFound`, `TmuxCommandError`, `TmuxParseError`, `TmuxCommandOptionsError`, `TmuxClientConfigError`). Importing any entry point spawns nothing; tmux only runs when a command is called.\n\n## Usage\n\n### Standalone (Promise API)\n\n```ts\nimport { TmuxClient, TmuxServerNotRunning } from \"@dogagenc/tmux.js\";\n\nconst tmux = new TmuxClient();\n\n// Resolves with decoded sessions; rejects with TmuxServerNotRunning if no server.\nconst sessions = await tmux.listSessions();\n\ntry {\n\tconst windows = await tmux.listWindows();\n\tconsole.log(windows);\n} catch (error) {\n\t// Expected tmux/config failures reject with tagged errors.\n\tif (error instanceof TmuxServerNotRunning) {\n\t\tconsole.error(\"no tmux server running\");\n\t}\n}\n```\n\n### Effect\n\n```ts\nimport { NodeServices } from \"@effect/platform-node\";\nimport { Effect, Layer } from \"effect\";\nimport { TmuxClient } from \"@dogagenc/tmux.js/effect\";\n\nconst program = Effect.gen(function* () {\n\tconst tmux = yield* TmuxClient;\n\treturn yield* tmux.listSessions();\n}).pipe(\n\tEffect.provide(TmuxClient.layer().pipe(Layer.provide(NodeServices.layer))),\n);\n\nEffect.runPromise(program).then(console.log);\n```\n\n`TmuxClient.layer()` requires `ChildProcessSpawner`; provide `NodeServices.layer` for Node/Deno, `BunServices.layer` for Bun, or a fake spawner in tests. Pass `{ executable, socketName, socketPath }` to target a custom tmux binary/socket.\n\n## Development\n\n```sh\npnpm install\npnpm test\npnpm check\n```\n\n### Effect setup\n\nThis project uses [Effect](https://effect.website) v4 as a language. The pieces are already installed; no extra setup is needed:\n\n- `effect` — core APIs (`Context`, `Effect`, `Layer`, `Schema`) and `effect/unstable/process` for child processes.\n- `@effect/platform-node` / `@effect/platform-bun` — platform layers that provide `ChildProcessSpawner` for Promise entry points and Effect users.\n- `@effect/vitest` — `it.effect` test runner.\n- `@effect/language-service` — Effect-specific diagnostics (wired in `tsconfig.json`).\n\nService pattern used here (see `src/internal/Client.ts`): a `Context.Service` with a dependency-requiring `layer(config?)` (requires `ChildProcessSpawner`, so tests and non-Node platforms can provide their own services). Errors stay in the typed channel as a `Schema.TaggedError`; nothing runs at import time.\n\nValidation commands:\n\n```sh\npnpm typecheck   # tsc --noEmit (src only)\npnpm diagnostics # Effect language-service diagnostics\npnpm test        # vitest\npnpm check       # Biome lint + format\n```\n\n\n## Command coverage\n\n46 tmux commands are wrapped, each with typed options and results — see the\n[API docs](https://dogagenc.github.io/tmux.js/) for per-command details:\n\n`breakPane` `capturePane` `clearHistory` `deleteBuffer` `displayMessage`\n`hasSession` `joinPane` `killPane` `killServer` `killSession` `killWindow`\n`lastPane` `lastWindow` `linkWindow` `listPanes` `listSessions` `listWindows`\n`loadBuffer` `movePane` `moveWindow` `newSession` `newWindow` `nextLayout`\n`nextWindow` `pasteBuffer` `pipePane` `previousLayout` `previousWindow`\n`renameSession` `renameWindow` `resizePane` `resizeWindow` `respawnPane`\n`respawnWindow` `rotateWindow` `saveBuffer` `selectLayout` `selectPane`\n`selectWindow` `sendKeys` `setBuffer` `showBuffer` `splitWindow` `swapPane`\n`swapWindow` `unlinkWindow`\n\nMore are added incrementally.\n\n## License\n\nISC\n","readmeFilename":"README.md"}