# Understanding the \`--\` (Double Dash) Separator in \`slnodejs run\` Commands

{% hint style="info" icon="circle-info" %}
One option for adding SeaLights to a Backend Node Server is to \*wrap\* the application's startup command with `slnodejs` , as detailed [here](/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/node.js-agent/backend-server-application/running-backend-server.md#wrapper-command-using-slnodejs-run). This article is specifically relevant to anyone using that approach.\
This article is **not** relevant if you are using Preload.js or if you are adding SeaLights to a Frontend Javascript application component.
{% endhint %}

### What does `--` mean in a shell command?

A standalone `--` (double dash followed by a space) is a POSIX convention that signals **"end of options."** Everything after `--` is treated as positional arguments, not as option flags — even if those arguments start with `-`.

This is a universal convention used across virtually all CLI tools. For example:

```sh
# Deletes a file literally named "-f" (without --, rm would interpret -f as a flag)
rm -- -f

# Checks out a file named "main" (without --, git might think it's a branch name)
git checkout -- main
```

### How is `--` different from `--token` or `--labid`?

They are two entirely different constructs:

| Syntax                  | Meaning                                           | Example                                 |
| ----------------------- | ------------------------------------------------- | --------------------------------------- |
| `--option` (no space)   | A long-form option flag passed to the program     | `--token`, `--labid`, `--workspacepath` |
| `-- value` (with space) | The argument separator — marks the end of options | `-- server.js`                          |

### How does `slnodejs run` use `--`?

In a `slnodejs run` command, the `--` separator tells the Sealights agent: "I'm done passing options to you — everything that follows is the application entry point you should wrap."

```sh
exec ./node_modules/.bin/slnodejs run \
  --token "$SL_TOKEN" \
  --buildsessionidfile buildSessionId \
  --labid __SEALIGHTS_LAB_ID__ \
  --workspacepath "." \
  --useinitialcolor true \
  --useslnode2 \
  -- server.js
```

* `--token`, `--buildsessionidfile`, `--labid`, etc. are **options for `slnodejs`**.
* `--` signals that options are done.
* `server.js` is the **application entry point** that Sealights will wrap and run.

### Should I include `node` after `--`?

**No.** The Sealights agent already invokes Node.js internally. The value after `--` should only be the path to your application entry point.

**Correct:**

```sh
-- server.js
```

**Incorrect:**

```sh
-- node server.js
```

### What happens if I write `-- node server.js`?

The agent interprets `node` as the application entry point file. If the agent is active, this may appear to work in some cases. However, if the agent is disabled (e.g., due to a missing or invalid token), the fallback logic runs:

```
node <first-argument-after-->
```

Since the first argument is `node`, this becomes:

```
node node
```

Node.js then attempts to load a module called `node` from the working directory, resulting in an error like:

```
Error: Cannot find module '/your-app-directory/node'
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sealights.io/knowledgebase/setup-and-configuration/troubleshooting-faq/node-javascript/understanding-the-double-dash-separator-in-slnodejs-run-commands.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
