Metadata-Version: 2.4
Name: simple-dtach
Version: 1.0.0
Summary: A convenience wrapper around dtach. Detach and reattach to processes.
Project-URL: Homepage, https://github.com/talwrii/simple-dtach
Project-URL: Repository, https://github.com/talwrii/simple-dtach
Project-URL: Issues, https://github.com/talwrii/simple-dtach/issues
Author-email: "@readwithai" <talwrii@gmai.com>
License-Expression: MIT
Keywords: dtach,persistent,session,ssh,terminal
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: POSIX
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: System :: Shells
Classifier: Topic :: Terminals
Requires-Python: >=3.8
Description-Content-Type: text/markdown

# Simple dtach
**@readwithai** - [X](https://x.com/readwithai) - [blog](https://readwithai.substack.com/) - [machine-aided reading](https://www.reddit.com/r/machineAidedReading/) - [📖](https://readwithai.substack.com/p/what-is-reading-broadly-defined
)[⚡️](https://readwithai.substack.com/s/technical-miscellany)[🖋️](https://readwithai.substack.com/p/note-taking-with-obsidian-much-of)

Simple dtach (`sdtach`) is a wrapper around the dtach command-line utility to make it slightly easier to use. It keeps `dtach` sessions in a standard location removing the need to specify sessions with `-A`.

`dtach` is a simplified alternative to tmux which allows you to detach and reattach your terminal to a running process, but it does not completely hijack your terminal like `screen` and `tmux` do. I am using this to have persistent ssh connections to a remote machine while running `tmux` locally.

## Installation
`simple-detach` depends upon `dtach` which you can install with

```
sudo apt isntall dtach
```

You can install sdtach using [pipx](https://github.com/pypa/pipx):
```
pipx install simple-dtach
```

## Usage
To run cat in a way which can be detached run `sdtach cat`.  You can use `Ctrl-T` (rather than dtach's `Ctrl+\`) to detach from an existing session. To reattach use `sdtach`. Exit the process as normall to kill the sessions.

If you do not specify a program the users defaut shell is run.

  * [ ] If you want to have several processes at the same time you can use `sdtach -n name`.

You can list the curent sessions with `--list`

If errors occur, the `--debug` option may provide you with relevant information.

## About me
I am **@readwithai**. I create tools for reading, research and agency sometimes using the markdown editor [Obsidian](https://readwithai.substack.com/p/what-exactly-is-obsidian).

I also create a [stream of tools](https://readwithai.substack.com/p/my-productivity-tools) that are related to carrying out my work. If you are interested in this tool you might be interested in [killable-sudo](https://github.com/talwrii/killable-sudo).which allows you to run a process as root or another user but kill it "as usual" with your process.

You might also be interested in my [ffmpeg beginner's cookbook](https://github.com/talwrii/ffmpeg-cookbook).

I write about lots of things - including tools like this - on [X](https://x.com/readwithai).
My [blog](https://readwithai.substack.com/) is more about reading and research and agency.
