ATTENTION: I'VE BEEN USING FOR LOCAL DEVELOPMENT, BUT IT'S STILL IN A VERY EARLY STAGE - NO TESTS HAVE EVEN BEEN WRITTEN - SO BUGS ARE EXPECTED.
This is a pet-project that I created to get rid of Docker and to also learn Nix to create my dev environments.
If you install it using npm or yarn, you will also need:
First step is to install Nudx. For now, as it's just a pet-project, the only way to install it is by
running npm install -g nudx
or yarn global add nudx
.
After that, go to your project directory and run nudx site create
. You will be prompted with a few options.
A dev.json
file will be created in the directory. Take a look at it and change accordingly.
Sorry, but for now there's no documentation about what options are available for services.
If you change dev.json
, you will need to run nudx site build --force
. It's already in Roadmap to build it
again automatically when a change is detected.
To run the server, just run nudx up
. It will run a Caddy server that will be responsible to proxy requests
to your sites.
Then, run nudx site start
in your site directory and it will be available to be accessed on the host you
configured in dev.json
.
Automatic DNS resolving is not yet implemented, so for now you need to configure how your network resolves hosts your localhost. Depending on your system, there are a few options:
This is the method I'm using. Considering you will use *.localhost as domain:
sudo echo "nameserver 127.0.0.1" > /etc/resolver/localhost
dscacheutil -flushcache
TODO
TODO
$ npm install -g nudx
$ nudx COMMAND
running command...
$ nudx (--version)
nudx/0.1.0 darwin-x64 node-v18.15.0
$ nudx --help [COMMAND]
USAGE
$ nudx COMMAND
...
nudx down
nudx help [COMMANDS]
nudx plugins
nudx plugins:install PLUGIN...
nudx plugins:inspect PLUGIN...
nudx plugins:install PLUGIN...
nudx plugins:link PLUGIN
nudx plugins:uninstall PLUGIN...
nudx plugins:uninstall PLUGIN...
nudx plugins:uninstall PLUGIN...
nudx plugins update
nudx reload
nudx site build
nudx site create
nudx site remove
nudx site shell
nudx site start
nudx site stop
nudx status
nudx up
Shutdown the server and all configured sites
USAGE
$ nudx down
DESCRIPTION
Shutdown the server and all configured sites
EXAMPLES
$ nudx down
See code: dist/commands/down.ts
Display help for nudx.
USAGE
$ nudx help [COMMANDS] [-n]
ARGUMENTS
COMMANDS Command to show help for.
FLAGS
-n, --nested-commands Include all nested commands in the output.
DESCRIPTION
Display help for nudx.
See code: @oclif/plugin-help
List installed plugins.
USAGE
$ nudx plugins [--core]
FLAGS
--core Show core plugins.
DESCRIPTION
List installed plugins.
EXAMPLES
$ nudx plugins
See code: @oclif/plugin-plugins
Installs a plugin into the CLI.
USAGE
$ nudx plugins:install PLUGIN...
ARGUMENTS
PLUGIN Plugin to install.
FLAGS
-f, --force Run yarn install with force flag.
-h, --help Show CLI help.
-v, --verbose
DESCRIPTION
Installs a plugin into the CLI.
Can be installed from npm or a git url.
Installation of a user-installed plugin will override a core plugin.
e.g. If you have a core plugin that has a 'hello' command, installing a user-installed plugin with a 'hello' command
will override the core plugin implementation. This is useful if a user needs to update core plugin functionality in
the CLI without the need to patch and update the whole CLI.
ALIASES
$ nudx plugins add
EXAMPLES
$ nudx plugins:install myplugin
$ nudx plugins:install https://github.com/someuser/someplugin
$ nudx plugins:install someuser/someplugin
Displays installation properties of a plugin.
USAGE
$ nudx plugins:inspect PLUGIN...
ARGUMENTS
PLUGIN [default: .] Plugin to inspect.
FLAGS
-h, --help Show CLI help.
-v, --verbose
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
Displays installation properties of a plugin.
EXAMPLES
$ nudx plugins:inspect myplugin
Installs a plugin into the CLI.
USAGE
$ nudx plugins:install PLUGIN...
ARGUMENTS
PLUGIN Plugin to install.
FLAGS
-f, --force Run yarn install with force flag.
-h, --help Show CLI help.
-v, --verbose
DESCRIPTION
Installs a plugin into the CLI.
Can be installed from npm or a git url.
Installation of a user-installed plugin will override a core plugin.
e.g. If you have a core plugin that has a 'hello' command, installing a user-installed plugin with a 'hello' command
will override the core plugin implementation. This is useful if a user needs to update core plugin functionality in
the CLI without the need to patch and update the whole CLI.
ALIASES
$ nudx plugins add
EXAMPLES
$ nudx plugins:install myplugin
$ nudx plugins:install https://github.com/someuser/someplugin
$ nudx plugins:install someuser/someplugin
Links a plugin into the CLI for development.
USAGE
$ nudx plugins:link PLUGIN
ARGUMENTS
PATH [default: .] path to plugin
FLAGS
-h, --help Show CLI help.
-v, --verbose
DESCRIPTION
Links a plugin into the CLI for development.
Installation of a linked plugin will override a user-installed or core plugin.
e.g. If you have a user-installed or core plugin that has a 'hello' command, installing a linked plugin with a 'hello'
command will override the user-installed or core plugin implementation. This is useful for development work.
EXAMPLES
$ nudx plugins:link myplugin
Removes a plugin from the CLI.
USAGE
$ nudx plugins:uninstall PLUGIN...
ARGUMENTS
PLUGIN plugin to uninstall
FLAGS
-h, --help Show CLI help.
-v, --verbose
DESCRIPTION
Removes a plugin from the CLI.
ALIASES
$ nudx plugins unlink
$ nudx plugins remove
Removes a plugin from the CLI.
USAGE
$ nudx plugins:uninstall PLUGIN...
ARGUMENTS
PLUGIN plugin to uninstall
FLAGS
-h, --help Show CLI help.
-v, --verbose
DESCRIPTION
Removes a plugin from the CLI.
ALIASES
$ nudx plugins unlink
$ nudx plugins remove
Removes a plugin from the CLI.
USAGE
$ nudx plugins:uninstall PLUGIN...
ARGUMENTS
PLUGIN plugin to uninstall
FLAGS
-h, --help Show CLI help.
-v, --verbose
DESCRIPTION
Removes a plugin from the CLI.
ALIASES
$ nudx plugins unlink
$ nudx plugins remove
Update installed plugins.
USAGE
$ nudx plugins update [-h] [-v]
FLAGS
-h, --help Show CLI help.
-v, --verbose
DESCRIPTION
Update installed plugins.
Reload Nudx server
USAGE
$ nudx reload
DESCRIPTION
Reload Nudx server
See code: dist/commands/reload.ts
Build site definition
USAGE
$ nudx site build [-f] [-r]
FLAGS
-f, --force
-r, --reload
DESCRIPTION
Build site definition
EXAMPLES
$ nudx site build
$ nudx site build --force
Create a new site definition in the current directory
USAGE
$ nudx site create [-f] [-r]
FLAGS
-f, --force
-r, --reload
DESCRIPTION
Create a new site definition in the current directory
EXAMPLES
$ nudx site create
Remove app from Nudx
USAGE
$ nudx site remove
DESCRIPTION
Remove app from Nudx
EXAMPLES
$ nudx app remove
Enter the site shell
USAGE
$ nudx site shell
DESCRIPTION
Enter the site shell
Start site
USAGE
$ nudx site start [-s <value>]
FLAGS
-s, --site=<value>
DESCRIPTION
Start site
EXAMPLES
$ nudx site start
$ nudx site start
Stop site
USAGE
$ nudx site stop [-s <value>]
FLAGS
-s, --site=<value>
DESCRIPTION
Stop site
EXAMPLES
$ nudx site stop
$ nudx site stop
List status of running sites and processes
USAGE
$ nudx status
DESCRIPTION
List status of running sites and processes
EXAMPLES
$ nudx status
$ nudx status
See code: dist/commands/status.ts
Initialize the server and all configured sites
USAGE
$ nudx up [-v]
FLAGS
-v, --verbose
DESCRIPTION
Initialize the server and all configured sites
EXAMPLES
$ nudx up
See code: dist/commands/up.ts
Documentation To Be Defined