Skip to main content

CLI Reference

All package management commands are subcommands of the neuroscript CLI.

neuroscript init

Initialize a new NeuroScript package.

neuroscript init <NAME> [OPTIONS]

Arguments [init]

ArgumentDescription
<NAME>Package name (lowercase, alphanumeric + hyphens)

Options [init]

OptionDescription
--author <AUTHOR>Author in "Name <email>" format
--license <LICENSE>License identifier (e.g., MIT, Apache-2.0)
--version <VERSION>Initial version (default: 0.1.0)
--binInclude an examples/ directory
--path <DIR>Create in a specific directory

Example [init]

neuroscript init my-neurons \
--author "Your Name <[email protected]>" \
--license MIT \
--bin

neuroscript add

Add a dependency to the current package.

neuroscript add <NAME> [OPTIONS]

Arguments [add]

ArgumentDescription
<NAME>Dependency name

Options [add]

OptionDescription
--version <VERSION>Version constraint (e.g., "^1.0", "0.3")
--git <URL>Git repository URL
--branch <BRANCH>Git branch to track
--tag <TAG>Git tag to pin
--rev <REV>Git commit hash to pin
--path <PATH>Local filesystem path

Examples [add]

# Git dependency with branch
neuroscript add blocks --git "https://github.com/user/blocks.git" --branch main

# Local path dependency
neuroscript add utils --path ../utils

# Version constraint (future registry)
neuroscript add core --version "^1.0"

neuroscript fetch

Fetch all declared dependencies and generate a lockfile.

neuroscript fetch [OPTIONS]

Options [fetch]

OptionDescription
--verboseShow detailed fetch progress
--updateUpdate dependencies to latest compatible versions

Example [fetch]

neuroscript fetch --verbose

neuroscript keygen

Generate an Ed25519 signing keypair.

neuroscript keygen <NAME>

Arguments [keygen]

ArgumentDescription
<NAME>Key name (used as filename prefix)

Keys are stored in ~/.neuroscript/keys/:

  • <NAME>.key - Private key (restricted permissions)
  • <NAME>.pub - Public key

Example [keygen]

neuroscript keygen my-package

neuroscript publish

Compute checksums, sign the package, and update Axon.toml with security metadata.

neuroscript publish [OPTIONS]

Options [publish]

OptionDescription
--no-signCompute checksums only, skip signing
--key <PATH>Path to Ed25519 private key
--verboseShow detailed output

Example [publish]

neuroscript publish --verbose
neuroscript publish --no-sign
neuroscript publish --key ~/.neuroscript/keys/custom.key

neuroscript verify

Verify package checksums and signature.

neuroscript verify [OPTIONS]

Options [verify]

OptionDescription
--verboseShow per-file verification details

Example [verify]

neuroscript verify --verbose

neuroscript list (Package Flags)

List available neurons from various sources.

neuroscript list [FILE] [OPTIONS]

Arguments [list]

ArgumentDescription
[FILE]NeuroScript file to list neurons from (optional with --stdlib/--available)
OptionDescription
--stdlibList all primitives and stdlib composites
--package <NAME>List neurons from a specific fetched dependency
--availableList everything: stdlib + all dependencies
--verboseShow connection details

Examples [list]

# List primitives and standard library neurons
neuroscript list --stdlib

# List neurons from a specific dependency
neuroscript list --package attention-blocks

# List all available neurons (stdlib + all deps)
neuroscript list --available

# List neurons in a file
neuroscript list src/model.ns --verbose

neuroscript validate / neuroscript compile (Dependency Flags)

Both validate and compile automatically load dependencies from Axon.lock when present.

Dependency Options [validate]

OptionDescription
--no-depsSkip dependency loading

Examples [validate]

# Compile with dependencies loaded automatically
neuroscript compile src/model.ns

# Compile without loading dependencies
neuroscript compile src/model.ns --no-deps

# Validate with dependency neurons in scope
neuroscript validate src/model.ns

For the full list of compiler options (including --bundle, --no-optimize, and others), see the Compiler Reference.