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

# anaconda channel share

export const GCell = ({children, className}) => <div className={`grid-table-cell ${className || ""}`} role="cell">
    {children}
  </div>;

export const GTH = ({children, className}) => <div className={`grid-table-th ${className || ""}`} role="columnheader">
    {children}
  </div>;

export const GRow = ({children}) => <div className="grid-table-row" role="row">{children}</div>;

export const GBody = ({children}) => <div className="grid-table-body" role="rowgroup">{children}</div>;

export const GHead = ({children}) => <div className="grid-table-head" role="rowgroup">{children}</div>;

export const GTable = ({children, className, cols}) => <div className={`grid-table not-prose overflow-hidden rounded-2xl ${className || ""}`} style={{
  "--grid-table-cols": cols
}} role="table">
    {children}
  </div>;

## Usage

```bash theme={null}
anaconda channel share <USER> --channel <CHANNEL> [OPTIONS]
```

## Description

Shares a channel with a user, granting them access to the channel.

You can specify channels in two ways:

* **Simple name with `--namespace`**: `--channel my-channel --namespace my-org`
* **Combined format**: `--channel my-org/my-channel`

You can share multiple channels by specifying `--channel` multiple times. Use `--unshare` to revoke access.

<Note>
  Sharing is an anaconda.com (repository) concept. This command does not apply to anaconda.org channels.
</Note>

## Arguments

<GTable cols="20% 80%">
  <GHead>
    <GRow>
      <GTH>Argument</GTH>
      <GTH>Description</GTH>
    </GRow>
  </GHead>

  <GBody>
    <GRow>
      <GCell>`<USER>`</GCell>
      <GCell>User ID, email, or username to share with</GCell>
    </GRow>
  </GBody>
</GTable>

## Options

<GTable cols="30% 70%">
  <GHead>
    <GRow>
      <GTH>Option</GTH>
      <GTH>Description</GTH>
    </GRow>
  </GHead>

  <GBody>
    <GRow>
      <GCell>`-c, --channel <CHANNEL>`</GCell>
      <GCell>Required. Channel(s) to share in `namespace/channel` or `channel` format. Can be specified multiple times.</GCell>
    </GRow>

    <GRow>
      <GCell>`-n, --namespace <TEXT>`</GCell>
      <GCell>Namespace for the channel (alternative to `namespace/channel` format)</GCell>
    </GRow>

    <GRow>
      <GCell>`-r, --role <ROLE>`</GCell>
      <GCell>Role to grant: `viewer` (read access) or `collaborator` (write access). Defaults to `viewer`.</GCell>
    </GRow>

    <GRow>
      <GCell>`--unshare`</GCell>
      <GCell>Revoke access instead of granting it</GCell>
    </GRow>

    <GRow>
      <GCell>`-h, --help`</GCell>
      <GCell>Show help for this command</GCell>
    </GRow>
  </GBody>
</GTable>

### Roles

* `viewer`: Read-only access to the channel and its packages
* `collaborator`: Read and write access, allowing the user to upload packages

## Examples

**Share a channel with read access**

```bash theme={null}
anaconda channel share user@example.com --channel my-org/my-channel
```

**Share a channel with write access**

```bash theme={null}
anaconda channel share colleague --channel my-channel --namespace my-org --role collaborator
```

**Share multiple channels**

```bash theme={null}
anaconda channel share user@example.com --channel my-org/channel-1 --channel my-org/channel-2
```

**Revoke access to a channel**

```bash theme={null}
anaconda channel share user@example.com --channel my-org/my-channel --unshare
```
