github.com/vchain-us/vcn@v0.9.11-0.20210921212052-a2484d23c0b3/docs/user-guide/quick-start.md (about)

     1  # Quick start
     2  
     3  ## Overview
     4  `vcn` is the *Command Line Interface* for the CodeNotary platform. Basically, it can [notarize and authenticate](notarization.md) any of the following kind of assets:
     5  
     6  - a **file**
     7  - an entire **directory** (by prefixing the directory path with `dir://`)
     8  - a **git commit** (by prefixing the local git working directory path with `git://`)
     9  - a [**container image**](schemes/docker.md) (by using `docker://` or `podman://` followed by the name of an image present in the local registry of docker or podman, respectively)
    10  - a **java BoM component** (by using `javacom://` followed by the name of a maven jar or pom.xml file)
    11  - a **Go BoM component** (by using `gocom://` followed by the name and version of Go module, in a format `<name>@<version>`)
    12  - a **Python BoM component** (by using `pythoncom://` followed by the name and version of Python module, in a format `<name>@<version>`)
    13  - a **.Net BoM component** (by using `dotnetcom://` followed by the name and version of .Net module, in a format `<name>@<version>`)
    14  
    15  > It's also possible to provide a hash value directly by using the `--hash` flag.
    16  
    17  ## Install the CLI
    18  
    19  The easiest way to get `vcn` is to download the latest version for your platform from the [release page](
    20  https://github.com/vchain-us/vcn/releases).
    21  
    22  Once downloaded, you can rename the binary to `vcn` and store it in your `PATH`, then run it from anywhere.
    23  > For Linux and macOS you need to mark the file as executable: `chmod +x vcn`
    24  
    25  ## Authenticate an asset
    26  
    27  Authentication is always free and can be performed by anyone, anywhere, at any time. You can use `vcn authenticate` even without a [codernotary.io](https://codenotary.io) account.
    28  
    29  Examples:
    30  ```
    31  vcn authenticate <file>
    32  vcn authenticate dir://<directory>
    33  vcn authenticate docker://<imageId>
    34  vcn authenticate podman://<imageId>
    35  vcn authenticate git://<path_to_git_repo>
    36  vcn authenticate --hash <hash>
    37  vcn authenticate javacom://<java maven jar or pom.xml>
    38  vcn authenticate gocom://<Go module in name@version format>
    39  vcn authenticate pythoncom://<Python module in name@version format>
    40  vcn authenticate dotnetcom://<.Net module in name@version format>
    41  ```
    42  
    43  To output results in `json` or `yaml` formats:
    44  ```
    45  vcn authenticate --output=json <asset>
    46  vcn authenticate --output=yaml <asset>
    47  ```
    48  
    49  ## Notarize an asset
    50  
    51  Register an account with [codernotary.io](https://codenotary.io) first.
    52  
    53  Then start with the `login` command. `vcn` will walk you through login and importing up your secret upon initial use.
    54  ```
    55  vcn login
    56  ```
    57  
    58  Once your secret is set you can notarize assets like in the following examples:
    59  
    60  ```
    61  vcn notarize <file>
    62  vcn notarize dir://<directory>
    63  vcn notarize docker://<imageId>
    64  vcn notarize podman://<imageId>
    65  vcn notarize git://<path_to_git_repo>
    66  vcn notarize --hash <hash>
    67  vcn notarize javacom://<java maven jar or pom.xml>
    68  vcn notarize gocom://<Go module in name@version format>
    69  vcn notarize pythoncom://<Python module in name@version format>
    70  vcn notarize dotnetcom://<.Net module in name@version format>
    71  ```
    72  
    73  By default all assets are notarized private, so not much information is disclosed about the asset. If you want to make that public and therefore, more trusted, please use the `--public` flag.
    74  
    75  ```
    76  vcn notarize --public <asset>
    77  ```
    78  
    79  Change the asset's status:
    80  
    81  ```
    82  vcn unsupport <asset>
    83  vcn untrust <asset>
    84  ```
    85  
    86  Finally, to fetch all assets you've notarized:
    87  
    88  ```
    89  vcn list
    90  ```