link: adds a new command `cortex link`; fixes #489