Getting Started

Namespace is an all-in-one open-source development platform—a unified experience for teams, from development to production.

In this guide we'll walk you through how to install ns — the Namespace CLI, and how you can quickly try out the platform using one of our examples.


docker logoDocker(minimum version 20.10.x)
See docs.docker.com/get-docker/ for details on how to install Docker.

Install the CLI

ns will be your main interface through development to production.

You can install it by following the instructions below for your OS.

curl -fsSL https://get.namespace.so/install.sh | sh

# Alternatively, you can use homebrew to install ns.

brew install namespacelabs/namespace/ns

🎉 You're done!

That's it, you're ready to start and develop using Namespace.

ns is a statically linked binary that can self-update. After it's available in your system, when you interact with a repository that uses Namespace, it will automatically download and install any required dependencies without affecting other software installed in your workstation.

Try one of our examples

We've put together a set of examples that demonstrate Namespace's features. They're also a way to quickly try out the platform.

Clone the examples repository

$ git clone https://github.com/namespacelabs/examples.git
$ cd examples

Setup your workstation for local development

Namespace manages development environments for you, whether locally or remotely in the cloud. For this example, we'll setup a local development environment, which includes our build infrastructure and Kubernetes, running within Docker (but don't worry, you don't need to manage it).

$ ns prepare local

Start a development session

Namespace provides a fast managed edit/refresh development workflow. You start a new development session by running ns dev which automatically:

  • Builds all the required servers.
  • Deploys servers to the development environment (local or remote).
  • Sets up port forwarding so that services exported by the servers are available from the local workstation.
  • Starts the Namespace Web UI (as an extra server) for debugging.
  • Watches source files and will rebuild/restart on changes (edit/refresh).

Start a development session for the services we've created for you.

# Within our examples repository:
$ ns dev multitier/01-simple/frontend
   Servers deployed:
    [] namespacelabs.dev/examples/multitier/01-simple/frontend took 9.4s
    [] namespacelabs.dev/examples/multitier/01-simple/apibackend took 8.4s
    [] namespacelabs.dev/examples/multitier/01-simple/postgres took 8.4s
  Connected to FileSync (for hot reload), took 28.363167ms.
   Development mode, services forwarded to
    [] frontend/myweb
   Namespace: web ui running at:
   Key bindings (l): pause logs (s): show support servers (q): quit

Let's do a few changes

  1. Open your local workspace in VS Code, or your favorite editor.
  2. Make a change to any of apibackend or frontend: it will be automatically delivered to your development environment, either hot-reloaded if web, or rebuilt and restarted if it's a Go change.

What's next?