Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

nilbuild/slim

Repository files navigation

⚡️ Slim

Simple command to get clean HTTPS local domains for your projects

Website Go 1.25+ Platform

myapp.test → localhost:3000
myapp.test/api → localhost:8080
dashboard.test → localhost:5173
app.loc → localhost:4000

Install

curl -sL https://slim.sh/install.sh | sh

or build from source

git clone https://github.com/kamranahmedse/slim.git
cd slim
make build
make install

Requires Go 1.25 or later.

Quick Start

Create a custom HTTPs Domain for local development using slim start

slim start myapp --port 3000
# https://myapp.test → localhost:3000

To share your local project on a public URL

slim share --port 3000
# https://cheeky-panda.slim.show

Local Usage

Start or stop a local service using slim start or slim stop

slim start myapp --port 3000
slim start api --port 8080
slim stop myapp # stop one domain
slim stop # stop all domains

If you don't specify the TLD, you get a .test domain. Specify a full domain to use any TLD:

slim start app.loc --port 3000 # https://app.loc → localhost:3000
slim start my.demo --port 4000 # https://my.demo → localhost:4000

Note: Avoid .local — it's reserved for mDNS and can cause slow DNS resolution on macOS/Linux.

Route different URL paths to different upstream ports on a single domain:

slim start myapp --port 3000 --route /api=8080 --route /ws=9000

Define all services for a project in a .slim.yaml file at the project root:

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
slim up # start all services
slim up --config /path/to/.slim.yaml # specify a config path
slim down # stop all project services

Internet Sharing

Expose a local server to the internet with a public slim.show URL. Requires slim login first.

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

Logs and Diagnostics

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
$ 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日

Updating

Run slim update to update to latest version.

Uninstall

Remove everything: CA, certs, hosts entries, port-forward rules, config

slim uninstall

License

PolyForm Shield 1.0.0 © Kamran Ahmed

About

Give your localhost a local or public URL

Resources

License

Stars

Watchers

Forks

Contributors

Languages

AltStyle によって変換されたページ (->オリジナル) /