Skip to main content

Basic Usage

jnc covers the full lifecycle of workspace management. Here’s an overview of the most common workflows.

Managing workspaces

CommandDescription
jnc initCreate a new workspace
jnc addAdd a dependency
jnc removeRemove a dependency
jnc updateUpdate dependencies in the lock file
jnc upgradeUpgrade dependencies with loosened version constraints
jnc lockSolve and update the lock file without installing
jnc installInstall the environment from the lock file
jnc infoShow workspace and system information
jnc runRun a task or command in the environment
jnc shellStart an interactive shell in the environment
jnc listList packages in the environment
jnc treeShow a dependency tree
jnc cleanRemove the environment

Managing global installations

jnc can install tools globally in isolated environments, accessible from anywhere:
CommandDescription
jnc global installInstall a package into its own global environment
jnc global uninstallRemove a global environment
jnc global addAdd a package to an existing global environment
jnc global listList global environments
jnc global syncSync global environments with the global manifest
jnc global updateUpdate global environments
More information: Global Tools

Running one-off commands

Run a command in a temporary environment without creating a workspace:
jnc exec python -- -c "print('hello')"
jnc exec --spec "python=3.12" python -- -VV

Tasks

Define cross-platform tasks in your manifest:
[tasks]
build = "make build"

[tasks.test]
cmd = "pytest"
depends-on = ["build"]
Run them with jnc run build or jnc run test. Tasks can depend on other tasks and run in the correct order. More information: Tasks

Multiple environments

Workspaces support multiple environments built from features:
jnc add --feature test pytest     # Add to "test" feature
jnc run --environment test pytest # Run in "test" environment
More information: Environments

Platform support

jnc targets linux-aarch64 for NVIDIA Jetson (JetPack 6) devices:
jnc add python --platform linux-aarch64

Utilities

CommandDescription
jnc infoShow workspace and system information
jnc configView or edit configuration
jnc treeShow dependency tree
jnc listList installed packages
jnc cleanRemove workspace environments
jnc authManage conda channel authentication
jnc searchSearch for packages
jnc completionGenerate shell completion scripts
jnc probeDetect NVIDIA Jetson hardware