### Install Slim with Curl Source: https://github.com/nilbuild/slim/blob/main/README.md Use this command to download and install Slim directly from the official script. Requires curl to be installed. ```bash curl -sL https://slim.sh/install.sh | sh ``` -------------------------------- ### Build Slim from Source Source: https://github.com/nilbuild/slim/blob/main/README.md Clone the repository and use make commands to build and install Slim locally. This method requires Go 1.25 or later. ```bash git clone https://github.com/kamranahmedse/slim.git cd slim make build make install ``` -------------------------------- ### Start Local Service with Custom TLD Source: https://github.com/nilbuild/slim/blob/main/README.md Starts a local service using a custom Top-Level Domain (TLD) instead of the default .test. Avoid using .local due to potential mDNS conflicts. ```bash slim start app.loc --port 3000 # https://app.loc → localhost:3000 slim start my.demo --port 4000 # https://my.demo → localhost:4000 ``` -------------------------------- ### Manage Project Services with YAML Config Source: https://github.com/nilbuild/slim/blob/main/README.md Start or stop all services defined in a `.slim.yaml` configuration file. You can specify a custom path to the config file. ```bash slim up # start all services slim up --config /path/to/.slim.yaml # specify a config path slim down # stop all project services ``` -------------------------------- ### Start a Local HTTPS Domain Source: https://github.com/nilbuild/slim/blob/main/README.md Initiates a local HTTPS domain for a specified service name and port. The default TLD is .test. ```bash slim start myapp --port 3000 ``` -------------------------------- ### Manage Local Services Source: https://github.com/nilbuild/slim/blob/main/README.md Commands to start, stop, and manage local services. You can stop specific domains or all running domains. ```bash slim start myapp --port 3000 slim start api --port 8080 slim stop myapp # stop one domain slim stop # stop all domains ``` -------------------------------- ### Update Slim to Latest Version Source: https://github.com/nilbuild/slim/blob/main/README.md Run this command to update your Slim installation to the most recent release. ```bash slim update ``` -------------------------------- ### Slim Doctor Diagnostic Output Source: https://github.com/nilbuild/slim/blob/main/README.md Example output from the `slim doctor` command, showing the status of CA certificates, port forwarding, hosts file entries, and daemon status. ```text $ slim doctor ✓ CA certificate valid, expires 2035-02-28 ✓ CA trust trusted by OS ✓ Port forwarding active (80→10080, 443→10443) ✓ Hosts: myapp.test present in /etc/hosts ! Daemon not running ✓ Cert: myapp.test valid, expires 2027-06-03 ``` -------------------------------- ### Share Local Project with Options Source: https://github.com/nilbuild/slim/blob/main/README.md Expose local projects to the internet with options for random or specific subdomains, password protection, TTL, and custom domains. Requires `slim login`. ```bash slim share --port 3000 # random subdomain slim share --port 3000 --subdomain demo # https://demo.slim.show slim share --port 3000 --password secret # password protected slim share --port 3000 --ttl 30m # auto-expires after 30 minutes slim share --port 3000 --domain myapp.example.com # custom domain ``` -------------------------------- ### Define Project Services in YAML Source: https://github.com/nilbuild/slim/blob/main/README.md Configure multiple services, including domains, ports, routes, log mode, and CORS settings, within a `.slim.yaml` file. ```yaml services: - domain: myapp port: 3000 routes: - path: /api port: 8080 - domain: dashboard port: 5173 - domain: app.loc port: 4000 log_mode: minimal # full | minimal | off cors: true # enable CORS headers on proxied responses ``` -------------------------------- ### Share Local Project Publicly Source: https://github.com/nilbuild/slim/blob/main/README.md Exposes your local project running on a specified port to a public URL. Requires prior login with `slim login`. ```bash slim share --port 3000 ``` -------------------------------- ### Inspect and Manage Running Domains Source: https://github.com/nilbuild/slim/blob/main/README.md List running domains, view logs, follow log output for a specific domain, clear logs, or run diagnostic checks. ```bash slim list # inspect running domains slim list --json slim logs # view access logs slim logs --follow myapp # tail logs for a domain slim logs --flush # clear log file slim doctor # run diagnostic checks ``` -------------------------------- ### Route Multiple Paths to Different Ports Source: https://github.com/nilbuild/slim/blob/main/README.md Configure a single domain to route different URL paths to distinct upstream ports. ```bash slim start myapp --port 3000 --route /api=8080 --route /ws=9000 ``` -------------------------------- ### Uninstall Slim Source: https://github.com/nilbuild/slim/blob/main/README.md Removes Slim, including its CA certificate, custom certificates, hosts file entries, and port forwarding rules. ```bash slim uninstall ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.