Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor sndev to have fewer commands #1533

Open
huumn opened this issue Nov 3, 2024 · 0 comments
Open

Refactor sndev to have fewer commands #1533

huumn opened this issue Nov 3, 2024 · 0 comments

Comments

@huumn
Copy link
Member

huumn commented Nov 3, 2024

sndev is beginning to get kludgy with overexposed, poor UX commands.

After #1521 gets merged, I'd like to reduce the surface area of sndev to:

[keyan stackernews]🍏 sndev   

                            888
                            888
                            888
      .d8888b  88888b.  .d88888  .d88b.  888  888
     88K      888 '88b d88' 888 d8P  Y8b 888  888
     'Y8888b. 888  888 888  888 88888888 Y88  88P
          X88 888  888 Y88b 888 Y8b.      Y8bd8P
      88888P' 888  888  'Y88888  'Y8888    Y88P

manages a docker based stacker news development environment

USAGE
  $ sndev [COMMAND]
  $ sndev help [COMMAND]

COMMANDS
  help                    show help

  env:
    start                 start env
    stop                  stop env
    restart               restart env
    status                status of env
    logs                  logs from env
    delete                delete env

  sn:
    login                 login as a nym
    fund_nym              fund a nym without using an LN invoice

  lightning:
    fund                   pay a bolt11 for funding
    withdraw               create a bolt11 for withdrawal

  db:
    psql                   open psql on db
    prisma                 run prisma commands

  dev:
    pr                     fetch and checkout a pr
    lint                   run linters

  other:
    cli                    passthrough to service cli
    open                   open GUI in browser
    onion                  get the onion address of a container
    cert                   get the tls cert of a container
    compose                docker compose passthrough

For things like onion/cert/cli, we'll want to define the paths/commands as container labels like we do with the CONNECT label. Then the interface for them would probably work like sndev onion SERVICE.

For fund/withdraw, we'll want a flag for using cln instead of the default, lnd.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant