# myos

> A fully dockerized development environment

Latest version **1.0.3** (published 2019-05-31) · MIT license · 0 weekly downloads

## Install

```sh
npm install myos
pnpm add myos
yarn add myos
bun add myos
```

Provides the command `myos`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2019-05-31 |
| First published | 2019-05-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 17.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 141 |
| Author | Ryland Goldstein |
| Maintainers | taillogs |

## Links

- npm: https://www.npmjs.com/package/myos
- Repository: https://github.com/rylandg/myos
- Homepage: https://github.com/rylandg/myos#Readme
- Issues: https://github.com/rylandg/myos/issues
- npm.io page: https://npm.io/package/myos

## Dependencies (3)

- [mz](https://npm.io/package/mz.md) ^2.7.0
- [yargs](https://npm.io/package/yargs.md) ^13.2.4
- [fs-extra](https://npm.io/package/fs-extra.md) ^8.0.1

## Recent versions

- 1.0.3 (latest) — 2019-05-31
- 1.0.2 — 2019-05-30
- 1.0.1 — 2019-05-30
- 1.0.0 — 2019-05-28

## README

# MyOS - develop and share command line environments

> If you like the project, please remember to star it so we can grow the community!

![](https://www.cdevn.com/assets/static/myos.e903f9a.3875bee.png)

[Blog post about MyOS](https://cdevn.com/my-os)

[Dockerhub](https://cloud.docker.com/repository/docker/rylandg/myos)

If you want your environment listed in the showcase, please submit a PR

## High Level

Uses Docker + Docker Compose to provide a consistent and reproducible build environment. Base image assumes the minimum while still being useful out of the box.

## Usage

### Assumptions

Everything depends on `myos` base Docker image. This image is available on Dockerhub, but you may also build it using the included Dockerfile.

The default `docker-compose.yml` mounts your hosts `~/.ssh/authorized_keys` file into the running container. This is what allows the openSSH server to authenticate you when you connect. This means you will need an `authorized_keys` file in the correct location with any keys you want to be able to use.

> OSX Users: For display forwarding to work, you'll need to have [X11 Quartz](http://osxdaily.com/2012/12/02/x11-mac-os-x-xquartz/). It's crappy and I'd love to find an alternative.

> Ctrl-D is the most sure fire way of getting out of the container

### Setup

1. Install the CLI

```bash
$ npm install -g myos
```

2. Create a new template project

```bash
$ myos init ./template
$ cd template
```

3. Start the container

```bash
$ myos create fooName
```

4. Connect to the container

```bash
$ myos connect
```

### Advanced usage

Assuming you've already installed the tool, my personal configuration can be used to test out MyOS.

1. Clone my personal MyOS config

```bash
$ git clone https://github.com/rylandg/rylandg-myosfiles
```

2. Create a MyOS based on my setup

```bash
$ cd rylandg-myosfiles
$ myos create rysetup
$ myos connect rysetup
```

## API

### Init
`myos init <dir>`

Creates the initial templates that the default `docker-compose.yml` expects. These are...

```bash
# vim
vim/binds.vim
vim/helpers.vim
vim/plugins.vim
vim/vimrc
# zsh
zsh/.zlogin
zsh/.zprofile
zsh/.zshenv
zsh/.zshrc
# tmux
tmux/tmux_saves
tmux/install_tmux.sh
tmux/tmux.conf
```

These files are empty (for the most part). You're expected to add your environment specific settings.

### Create
`myos create <name>`

Runs `docker-compose up -d` from the current directory

### Connect
`myos connect`

Connects to a previously created MyOS environment


### Restart

`myos restart <name>`

Restart a previously created MyOS environment

### Remove

`myos remove <name>`

Remove a running MyOS environment

## Features

* Configuring locale and colors
* Creating a non-root user and setting necessary permissions
* Setups OpenSSH for password-less login
* Enabling X11 Display server
* Super light, highly optimized base Ubuntu image
* Mechanism to "safely" run multiple processes
* Init for running your user process as PID > 1
* OpenSSH server out of the box
* ZSH
* HTop
* Vim8 with clipboard support
* Latest Tmux built from source
* XAuth and XDisplay packages for clipboard support


## Issues/planned changes

* Very vim focused, would like to see if its possible to support other editors (definitely Emacs)
* Needs CLI command that allows you to copy another users MyOS environment
* Multiple MyOS environments should be able to run simelataneously
* SSH key for authorized_keys could be autogenerated
* Potentially move away from NodeJS for CLI

---
_Source: https://npm.io/package/myos · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
