## register_metakernel()


Track a metakernel already on disk, as `skd import` does.


Usage

``` python
register_metakernel(
    path,
    *,
    mission=None,
    official=True,
)
```


Opens the database named in the config, does one thing and closes it. This function calls [KernelDB.import_metakernel](KernelDB.import_metakernel.md#spice_kernel_db.KernelDB.import_metakernel). It indexes the metakernel's entries, registers every kernel it resolves to that exists on disk, and adds the registry row with no source URL.


## Parameters


`path: str | Path`  
The `.tm` file.

`mission: str | None = None`  
The mission. Defaults to the one guessed from the path, taking the configured kernel roots into account.

`official: bool = ``True`  
`False` marks a metakernel assembled locally, such as the output of NAIF's subsetter, so that `ls` and `show` say so.


## Returns


`dict`  
With the keys `mk_path`, `filename`, `mission`, `n_entries`, `n_registered` and `missing`, the entries whose file is not on disk.


## Raises


`FileNotFoundError`  
*path* is not a file.
