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

# jnc init

> Create a new workspace with a manifest file and project scaffolding.

# jnc init

Creates a new workspace. This command generates a manifest file (`jnc.toml` by default) and supporting files to get you started with dependency management and task running.

The manifest format can be customized with `--format` to generate a `pyproject.toml` instead. You can also bootstrap a workspace from an existing conda `environment.yml` file.

## Usage

```bash theme={null}
jnc init [OPTIONS] [PATH]
```

## Arguments

| Argument | Description                                                            |
| -------- | ---------------------------------------------------------------------- |
| `PATH`   | Where to place the workspace. Defaults to the current directory (`.`). |

## Options

| Option                              | Description                                                                                                                                |
| ----------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| `-c`, `--channel <CHANNEL>`         | Channel to use in the workspace. Can be specified multiple times. Conflicts with `--import`.                                               |
| `-p`, `--platform <PLATFORM>`       | Platforms that the workspace supports. Can be specified multiple times.                                                                    |
| `-i`, `--import <ENVIRONMENT_FILE>` | Path to a conda `environment.yml` file to bootstrap the workspace from.                                                                    |
| `--format <FORMAT>`                 | The manifest format to create. Values: `jnc`, `pyproject`. Conflicts with `--import`.                                                      |
| `-s`, `--scm <SCM>`                 | Source control management provider. Generates appropriate `.gitignore` and `.gitattributes` files. Values: `github`, `gitlab`, `codeberg`. |
| `--conda-pypi-map <MAPPING>`        | Mapping between conda channels and PyPI indexes, as comma-separated `CHANNEL=URL` pairs.                                                   |

## Examples

### Create a workspace in the current directory

```bash theme={null}
jnc init
```

### Create a workspace in a new directory

```bash theme={null}
jnc init my-project
```

### Create a workspace with specific channels

```bash theme={null}
jnc init --channel conda-forge --channel bioconda
```

### Create a workspace for specific platforms

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

### Create a pyproject.toml-based workspace

```bash theme={null}
jnc init --format pyproject
```

### Bootstrap from an existing environment.yml

```bash theme={null}
jnc init --import environment.yml
```

### Create a workspace with GitHub SCM files

```bash theme={null}
jnc init --scm github my-project
```
