Yak Command Line Tool Reference

The Yak command line tool is included with Rhino 7 WIP. On Windows the tool is located at "C:\Program Files\Rhino 8\System\yak.exe". On macOS there is a convenience script at "/Applications/Rhino 8.app/Contents/Resources/bin/yak".

Build

  • Since 0.2: Command added
  • Since 0.4: Supports multiple .gha files, .rhp files or anything else for that matter
  • Since 0.9: Appends distribution tag to filename and expands $version placeholder
  • Since 0.10.1: Adds --platform argument

When run in a directory containing a valid manifest.yaml file, creates a package containing all files in the directory.

Usage: yak build [options]

Options:
    --platform PLATFORM  The platform where the package will run ('win', 'mac' or 'any')
    -h, --help           Get help (equivalent to `yak help build`)
Note
A distribution tag (e.g. rh7-win) is appended to the filename of the created package. The tag is determined by inspecting the contents of the package during creation. The --platform=any argument can be used if the author wants to publish a cross-platform distribution, e.g. rh7-any. Only .rhp and .gha files can currently be inspected. If a package contains none of these, it will have a distribution tag of any-any.

Install

  • Since 0.1: Command added
  • Since 0.13.0: Supports installing local .yak files

Installs a package (optionally with a specific version).

Usage:
    yak install [--source=URL] <package> [<version>]
    yak install <package>

Where <package> is either the name of a package or the path to a local .yak file.

List

Since 0.2

Lists the packages installed on the machine.

yak list

Login

  • Since 0.2: Command added
  • Since 0.10: User registered during login

Authenticates with Rhino Accounts and stores a time-limited OAuth2 access token so that the user can use commands which require authentication.

Usage: yak login [options]

Options:
    --ci              Generate a non-expiring API key and display it
    -s, --source URL  Package repository location [default: https://yak.rhino3d.com/].
    -h, --help        Get help (equivalent to `yak help login`)

On Windows, the token is stored in %appdata%\McNeel\yak.yml. On macOS, it is stored in ~/.mcneel/yak.yml.

During login, the user is registered on the server.

Push

Since 0.1

Pushes a package to the server.

yak push [--source=URL] <filename>
Note
Requires authentication.
  • Since 0.1: Command added
  • Since 0.5: Adds --all and --prerelease flags

Searches the server for packages which match query.

Usage: yak search [options] <query>

  Options:
    --prerelease      Display prerelease package versions
    -a, --all         Display all package versions
    -s, --source URL  Package repository location
    -h, --help        Get help (equivalent to `yak help search`)

Spec

  • Since 0.2: Command added
  • Since 0.4: Adds support for inspecting .rhp files (RhinoCommon only)

Creates a skeleton manifest.yml file based on the contents of the current directory. When run in a directory containing a Grasshopper assembly (.gha) or a RhinoCommon plug-in (.rhp) the file will be inspected and used to pre-populate the manifest.yml file.

yak spec

Uninstall

Since 0.1

Uninstalls a package.

yak uninstall <package>

Yank

Since 0.6

Removes a version from the package index.

yak yank <package> <version>
Note
Requires authentication.

Yanked versions do not appear in searches but can still be installed if the exact package version is known. To all intents and purposes they are hidden.

It is not possible to re-push a package version that has been yanked. If you find yourself in this situation, then simply roll the version number of your package and push again.

If all versions of a package are removed, it will no longer show up in the package index.

Danger

Deleting a package from the McNeel server

If you absolutely need to delete your package from the public server, please email will@mcneel.com. Once a package has been deleted, the name can no longer be used.

Unyank

Works in the same way as the yank command, but in reverse!

Owner

Since 0.10

Adds, removes of lists the owners of a package. Package owners can push new versions of the package and (un)yank existing versions.

Usage:
    yak owner add [--source=URL] <package> <email>
    yak owner remove [--source=URL] <package> <email>
    yak owner list [--source=URL] <package>
    
Options:
    -h, --help
    -s, --source URL  Package repository location [default: https://yak.rhino3d.com/].

New owners can do everything that the original owner can do. Please bear this in mind!