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​

# New here? Create an account (a 6-digit code is emailed to you), then verify it
srcnexus signup --email [email protected] --username your-name
srcnexus verify 123456

# Already have an account? Log in
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 [email protected] --password mypassword
OptionDescription
--identifier <value>Email or username
--password <value>Account password
--api-url <url>Custom API endpoint

signup​

Create a SrcNexus account from the terminal. signup registers you, emails a 6-digit code and exits — it does not wait for the code. You finish with verify <code>. Splitting it into two commands means scripts, CI jobs and AI agents (which cannot answer a prompt halfway through a run) can sign up too.

# Interactive: asks for anything you leave out (the password is never echoed)
srcnexus signup --email [email protected] --username your-name

# Non-interactive: the password from the environment, the result as JSON
SRCNEXUS_PASSWORD='…' srcnexus signup --email [email protected] --username your-name --json
OptionDescription
--email <email>Email address — the code is sent here
--username <name>3–50 lower-case letters, digits and hyphens; no hyphen at the start, at the end or twice in a row. It is also your site's address: https://<username>.srcnexus.app/
--password <value>6–50 characters. Prefer the SRCNEXUS_PASSWORD environment variable, which keeps it out of your shell history
--api-url <url>Custom API endpoint
--jsonPrint the result as JSON

With --json (or when stdin is not a terminal) nothing is prompted: a missing --email, --username or password is an error. signup saves the new session on this machine, replacing any login already saved, so verify and every other command run as the new account.

{
"ok": true,
"user": { "userName": "your-name", "email": "[email protected]" },
"verified": false,
"next": "srcnexus verify <code>"
}

An unverified account can already create one project, so you can deploy straight away and verify later.

verify <code>​

Finish signing up with the 6-digit code from the email.

srcnexus verify 123456
srcnexus verify 123456 --json
  • Codes are valid for 5 minutes. If yours expired or never arrived, run resend-otp.
  • A wrong code is never retried for you — each run makes exactly one attempt. Wrong codes are counted, and too many wrong codes delete the unverified account. The error message says how many tries are left. In a script or agent, stop and get the right code rather than looping.

resend-otp​

Email a new verification code to the logged-in (unverified) account.

srcnexus resend-otp
srcnexus resend-otp --json

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

sources​

Publish the sources behind your YouTube videos: one page per video, plus an index that searches every source of every video. You write one small YAML file per video; the CLI renders it with a template and deploys it to https://<username>.srcnexus.app/<project>/<video-id>/.

srcnexus sources init --channel-name "My Channel" --channel-url https://www.youtube.com/@<your-handle>
srcnexus sources new how-tides-work --title "How tides work" --youtube https://youtu.be/<video-id>
srcnexus sources preview # http://127.0.0.1:4173
srcnexus sources deploy how-tides-work # that page + the index
srcnexus sources url how-tides-work # the link for your video description

Subcommands: init, new, templates, eject, check, build, preview, deploy, url.

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.