You can navigate the Unison Codebase Manager (UCM) via the CLI with a set of commands but the UCM also ships with a UI for viewing and navigating your local codebase.
ui
in the UCM. This will open the UI in your default browser.The UI supports several features which augment the local development process in Unison:
๐ Doc rendering
If there are linked Doc
s for a Unison term or type, the codebase UI will fully render the docs with their enriched text features. Doc
elements like tooltips, links between docs and terms, and evaluated code examples will all be displayed when you open a Unison term.
Try it out by searching for the Natural
type in the ๐ find definition
query box. The linked documentation for using Natural
should render in the local UI.
๐ Click-through to source interactivity
If you're ever curious about the source code of your favorite Unison library or functions, you can use the local UI to see the source of the code and all the preceding code that constitutes it.
Any function, value, or type that highlights on mouse-over is a clickable link that will open a new source code panel.
๐น Keyboard shortcuts
With the UI open in your browser, enter ?
to pull up a few handy keyboard shortcuts to remember when using the UI.
These keyboard shortcuts are also useful for navigating public codebases on Unison Share.
๐ญ Namespace scoped searching
In addition to the top-level ๐ find definition
search functionality, the local codebase UI supports scoped searching and namespace navigation.
Say you're in a large codebase and you've been using the local UI to check out some of the functions under the List
data type namespace. If you'd like to scope your search to other terms which are only under the List
namespace in the base
library, you can mouse-over the namespace path to the right of the type or term name, and from there you should see two options. The first opens a search query for finding other terms within the namespace, and the second allows you to refocus your navigation sidebar to the current namespace for a more granular view of the codebase.