erfanium / erfanium/h8-cli

Feature: add `h8 set port` command to add/remove ports on existing apps

Open
#2 0 comments 0 reactions 0 assignees View on GitHub
enhancement P2-nice
Dominant language
TypeScript
Stars
0
Forks
1
PR merge metrics
No merged PRs in 30d

Description

## Description

Currently there is no way to modify the service ports of an existing app. To add or remove a port, you must delete the entire app and recreate it — which loses disk attachments, env vars, and other configuration.

## Proposed Command

```bash
h8 set port APP PORTS...
```

Where `PORTS` is in the same `svcPort:containerPort` format as `app create --port`.

Examples:
```bash
h8 set port myapp 8080:8080 # set/replace all ports
h8 set port myapp 3000:3000 # remove SSH, keep only HTTP
h8 set port myapp 3000:3000 2222:22 # add SSH back
```

## Workaround

Currently requires delete + recreate (destructive): `h8 app delete` then `h8 app create` with the desired ports, re-attach disk, re-set all env vars.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the existing `app create --port` command and its `svcPort:containerPort` parsing, then trace how `h8 app delete` and `h8 app create` update an app. Add the `h8 set port APP PORTS...` entry point so ports on an existing app can be replaced or updated without losing other configuration; verify the documented examples and removal behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
cli
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
67/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.