otio
v0.0.1
Published
📟 elegant inactivity timeout for your development servers
Readme
idea
otio is a single-purpose CLI tool that elegantly terminates processes after inactivity is detected.
inactivity
The main factor that deterimines inactivity is the chosen directory. After the directory has not been modified for a given amount of time, the processes are gracefully terminated.
Both the directory and the timeout duration are customizable.
use cases
This tool is most useful for running development servers. Forgetting about them happens often, consuming resources on your system without you knowing. otio was made to solve this problem.
otio can be used for any process that is not an ongoing server, but it was not made for such purposes. Do not expect a stable experience if you decide to use it for other purposes.
usage
otio "npm run dev"Runs
npm run devinsideotiowith default settings.
custom timeout
otio "npm run dev" --timeout 300Runs
npm run devwith a timeout of 300 seconds (5 minutes).
custom directory
otio "npm run dev" --dir /foo/bar/bazRuns
npm run dev, watching for changes in/foo/bar/baz.
custom timeout and directory
otio "npm run dev" --timeout 120 --dir /foo/bar/bazRuns
npm run dev, watching for changes in/foo/bar/bazwith a timeout of 120 seconds (2 minutes).
installation
npm i -D otioInstalls
otioas a dev dependency in the current node project. Ideal for running it vianpm run dev.
npx otioRuns
otiowithout installing.
npm i -g otioInstalls
otioglobally. Ideal for running it everywhere.
example
package.json
{
"devDependencies": {
"otio": "1.0.0"
},
"name": "my-project",
"scripts": {
"dev:watch": "tsc --watch",
"dev": "otio \"npm run dev:watch\" --dir \"./src\" --timeout 120"
},
"type": "module",
"version": "0.0.0"
}
Doing
npm run devwill runnpm run dev:watchinsideotio, watching for changes in the./srcdirectory with a timeout of 120 seconds (2 minutes).
license
MIT License © 2025 Jamie Jacobs
