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

Pip version - Bind 0.0.0.0 #86

Open
EULArule opened this issue Nov 2, 2023 · 1 comment
Open

Pip version - Bind 0.0.0.0 #86

EULArule opened this issue Nov 2, 2023 · 1 comment
Labels
good first issue Good for newcomers

Comments

@EULArule
Copy link

EULArule commented Nov 2, 2023

In the pip version of llmstack, when you run the commands.
llmstack -h OR llmstack --help

There is no helpful output, and instead starts up the server. One thing not documented real well was the way to switch between production and the development server, or if its even possible with the pip packaged version. And how to bind the server to port 0.0.0.0:3000 so anyone is able to access it. And I think these will all be very useful features as it is applicable when you want to share your apps on llmstack with other people not on the same system.

Describe the solution you'd like
I would like a feature that when you do llmstack -h it outputs something like.
Usage llmstack [flags]
--listen [binds server to 0.0.0.0]
--prod [Runs production server]
--dev [Runs development server]
...
...
...

Describe alternatives you've considered
Alternatively I was able to bind the server to 0.0.0.0:3000 by editing the file "~/.llmstack/config" and changing llmstack_port = 3000 -> llmstack_port = "0:3000" and add the line allowed_hosts = "0.0.0.0,localhost,192.168.0.X". Where 192.168.0.x = your local ip. And you can now access it from other machines on the network. It has however caused a bug, that I recently reported has occurred due to this change.

@ajhai ajhai added the good first issue Good for newcomers label Nov 17, 2023
@shubhusion
Copy link
Contributor

Enhancing llmstack CLI for Better Usability

Problem Statement

When running llmstack -h or llmstack --help, no helpful output is displayed; instead, it starts the server. Additionally, there is a lack of clear documentation on how to switch between production and development servers or bind the server to specific addresses and ports. These features are essential for sharing applications on llmstack with others on the same network.

Proposed Solution

Add a help command that provides usage instructions and enhance the CLI to support binding the server to specific addresses and ports, and switching between development and production modes.

Implementation Details

1. Add Help Command

Modify the CLI to display usage information when -h or --help is used.

2. Enhance Configuration Options

Add command-line options for:

  • Binding the server to a specific address
  • Specifying the port
  • Switching between development and production modes

Example Usage

  • To run the server in production mode and bind it to 0.0.0.0:3000:
    llmstack --listen 0.0.0.0 --port 3000 --prod
  • To run the server in development mode on the default address and port:
    llmstack --dev

Usage

llmstack [flags]
--listen [Bind the server to a specific address (default: 127.0.0.1)]
--port [Port to bind the server to (default: 3000)]
--prod [Run the server in production mode]
--dev [Run the server in development mode]
-h, --help [Display usage information]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants