> ## Documentation Index
> Fetch the complete documentation index at: https://jncpkg.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Basic Usage

> Common jnc workflows for managing workspaces, dependencies, and tasks.

# Basic Usage

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

## Managing workspaces

| Command                       | Description                                            |
| ----------------------------- | ------------------------------------------------------ |
| [`jnc init`](/cli/init)       | Create a new workspace                                 |
| [`jnc add`](/cli/add)         | Add a dependency                                       |
| [`jnc remove`](/cli/remove)   | Remove a dependency                                    |
| [`jnc update`](/cli/update)   | Update dependencies in the lock file                   |
| [`jnc upgrade`](/cli/upgrade) | Upgrade dependencies with loosened version constraints |
| [`jnc lock`](/cli/lock)       | Solve and update the lock file without installing      |
| [`jnc install`](/cli/install) | Install the environment from the lock file             |
| [`jnc info`](/cli/info)       | Show workspace and system information                  |
| [`jnc run`](/cli/run)         | Run a task or command in the environment               |
| [`jnc shell`](/cli/shell)     | Start an interactive shell in the environment          |
| [`jnc list`](/cli/list)       | List packages in the environment                       |
| [`jnc tree`](/cli/tree)       | Show a dependency tree                                 |
| [`jnc clean`](/cli/clean)     | Remove the environment                                 |

## Managing global installations

jnc can install tools globally in isolated environments, accessible from anywhere:

| Command                               | Description                                       |
| ------------------------------------- | ------------------------------------------------- |
| [`jnc global install`](/cli/global)   | Install a package into its own global environment |
| [`jnc global uninstall`](/cli/global) | Remove a global environment                       |
| [`jnc global add`](/cli/global)       | Add a package to an existing global environment   |
| [`jnc global list`](/cli/global)      | List global environments                          |
| [`jnc global sync`](/cli/global)      | Sync global environments with the global manifest |
| [`jnc global update`](/cli/global)    | Update global environments                        |

More information: [Global Tools](/concepts/global-tools)

## Running one-off commands

Run a command in a temporary environment without creating a workspace:

```bash theme={null}
jnc exec python -- -c "print('hello')"
jnc exec --spec "python=3.12" python -- -VV
```

## Tasks

Define cross-platform tasks in your manifest:

```toml theme={null}
[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](/concepts/tasks)

## Multiple environments

Workspaces support multiple environments built from features:

```bash theme={null}
jnc add --feature test pytest     # Add to "test" feature
jnc run --environment test pytest # Run in "test" environment
```

More information: [Environments](/concepts/environments)

## Platform support

jnc targets `linux-aarch64` for NVIDIA Jetson (JetPack 6) devices:

```bash theme={null}
jnc add python --platform linux-aarch64
```

## Utilities

| Command                             | Description                           |
| ----------------------------------- | ------------------------------------- |
| [`jnc info`](/cli/info)             | Show workspace and system information |
| [`jnc config`](/cli/config)         | View or edit configuration            |
| [`jnc tree`](/cli/tree)             | Show dependency tree                  |
| [`jnc list`](/cli/list)             | List installed packages               |
| [`jnc clean`](/cli/clean)           | Remove workspace environments         |
| [`jnc auth`](/cli/auth)             | Manage conda channel authentication   |
| [`jnc search`](/cli/search)         | Search for packages                   |
| [`jnc completion`](/cli/completion) | Generate shell completion scripts     |
| [`jnc probe`](/cli/probe)           | Detect NVIDIA Jetson hardware         |
