Skip to main content

SrcNexus CLI

The srcnexus CLI deploys projects and extensions to SrcNexus from your terminal — no app needed. It is published on npm as srcnexus.

Install

npm install -g srcnexus

Requires Node.js 18 or later.

Check the install:

srcnexus --version
srcnexus --help

Quick start

# Log in to your SrcNexus account
srcnexus login

# Deploy the current directory as a project
cd my-project
srcnexus deploy

# Deploy the current directory as an extension
srcnexus deploy --extension

After a project deploy, your site is live at https://{username}.srcnexus.app/{project-name}.


Commands

login

Authenticate with your SrcNexus account.

srcnexus login

Interactive prompts ask for your email/username and password. For CI, pass credentials directly:

srcnexus login --identifier user@email.com --password mypassword
OptionDescription
--identifier <value>Email or username
--password <value>Account password
--api-url <url>Custom API endpoint

logout

Clear the stored session.

srcnexus logout

whoami

Show the currently logged-in user.

srcnexus whoami

deploy

Deploy a project or an extension from a directory.

srcnexus deploy              # deploy as a project
srcnexus deploy -e # deploy as an extension
srcnexus deploy --cwd /path/to/project
srcnexus deploy -y # skip the confirmation prompt
OptionDescription
-e, --extensionDeploy as an extension instead of a project
--cwd <path>Working directory (default: .)
--name <name>Project name (skips the prompt)
-y, --yesSkip confirmation

Deploying an extension runs the same register → upload → finalize flow the app uses, so a new version automatically updates your existing store listing. See Publishing & Extension Store.

ls

List your projects and extensions.

srcnexus ls              # everything
srcnexus ls --projects # projects only
srcnexus ls --ext # extensions only

rm <nameOrId>

Delete a project.

srcnexus rm my-project
srcnexus rm my-project -y # skip confirmation

download <nameOrId>

Download a project's files to your machine.

srcnexus download my-project
srcnexus download my-project --cwd ./output

extension zip

Bundle an extension into a ZIP archive locally, without deploying it.

srcnexus extension zip
srcnexus extension zip --cwd /path/to/extension -o bundle.zip
srcnexus extension zip -w # watch mode — rebuild on changes
OptionDescription
--cwd <path>Extension directory (default: .)
-o, --output <file>Output ZIP filename
-w, --watchWatch for changes and rebuild

Global options

OptionDescription
--verboseShow detailed debug output
-V, --versionPrint the CLI version
-h, --helpShow help

Configuration

Credentials are stored in ~/.srcnexus/config.json. Tokens refresh automatically when they expire.

Override the API endpoint with the SRCNEXUS_API_URL environment variable, or a .env file in your project root.

File handling

The CLI respects .gitignore and automatically excludes common build and dependency directories (node_modules, .git, build, .dart_tool, and others). System files such as .DS_Store, .env, and *.log are skipped too.

For extensions, the files and ignore fields in manifest.json control the bundle — see Publishing & Extension Store.