Skip to content

Conversation

@benjreinhart
Copy link
Contributor

This PR:

  1. Introduces a more robust CLI with support for importing srcbooks from https://hub.srcbook.com.
  2. Removes the hardcoded localhost urls in the web package, which now means that we can configure port and leverage localhost aliases

CLI Examples:

npx srcbook start
npx srcbook start --port 5000   # or -p

npx srcbook import <hub-id>
npx srcbook import <hub-id> -p 5000  # or --port

Main CLI help menu

Usage: srcbook [options] [command]

Srcbook is a interactive programming environment for TypeScript

Options:
  -V, --version                 output the version number
  -h, --help                    display help for command

Commands:
  start [options]               Start the Srcbook server
  import [options] <specifier>  Import a Srcbook
  help [command]                display help for command

import command help menu

Usage: srcbook import [options] <specifier>

Import a Srcbook

Arguments:
  specifier          An identifier of a Srcbook on hub.srcbook.com

Options:
  -p, --port <port>  Port of the server (default: "2150")
  -h, --help         display help for command

@benjreinhart benjreinhart requested a review from nichochar August 15, 2024 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant