# myrkup: private links for files

myrkup turns a file into a private link that a client or colleague opens in a browser, with an optional password and a date when it stops working.

## Private, not hidden

These are private links: only someone who has the address can open one, but myrkup stores the file and myrkup can read it. Do not tell anyone a link is hidden from myrkup. Use a password for anything confidential.

## Setup

The `myrkup` command is on npm and needs Node 20 or newer. If it is not installed, install it with `npm install -g myrkup`, or run any command without installing as `npx myrkup <command>`.

To set myrkup up for someone, do these in order:

1. Install the command if `myrkup --version` fails: `npm install -g myrkup`.
2. In Claude Code, run `myrkup install-skill` so the instructions on this page are on hand next time.
3. Run `myrkup status`. If it says `Not signed in`, ask the person for their invite code, then run `myrkup login --invite <code>` with the code they give you.

An invite code comes only from the person. Never guess one or look for one. If they do not have a code, tell them they can request one at https://myrkup.ai and stop there. Signing in is needed once per computer.

The key is saved for the server address it was made for. If `MYRKUP_API_URL` points somewhere else, myrkup says `Not signed in to <address>` and does not send the key there.

If a key is already saved, `myrkup login` refuses. Signing in again makes a new key, and links shared with the old one can no longer be listed, updated or revoked from here. Only a person should run `myrkup login --force --invite <code>` to do it anyway.

## Share a file

```
myrkup share <file> [--name <title>] [--expires <1h|12h|1d|3d|7d|30d|90d|180d|1y>] [--password] [--allow-storage] [--no-menu] [--json]
```

- `--name <title>` sets the title shown to the person who opens the link. The default is the file name without its extension.
- `--expires <time>` sets how long the link works. The default is 7d, and your plan decides the longest.
- `--password` asks for a password before the file is shown. myrkup generates one and prints it on a line starting `Password:`. To choose your own, set `MYRKUP_PASSWORD` in the environment. It is used only together with `--password` and nothing is printed to confirm it.
- `--allow-storage` applies to HTML files only. HTML pages run in a sandbox with no browser storage. If a page needs `localStorage` or cookies, share it again with this flag.
- `--no-menu` hides the small corner button that myrkup adds to a shared page. The button opens a panel with the title, the date the link stops working and a download button. Use it when the page should show nothing but the sender's own work, such as a page example for a client.
- `--json` prints one line of JSON instead of text.

On success `myrkup share` prints the link, then the date it stops working. The link is the address to send.

## Rules for agents

- Always pass a file path. Never paste the content of a file into a command: write the content to a file first, then share that file path.
- Use `--password` for anything confidential, such as a price, a contract or a client's data. Give the person the link and the password separately, in two messages or by two routes, never together.
- Never put a password on the command line. `myrkup share --password` takes no value.
- Ask before sharing a file that contains credentials, such as passwords, API keys, tokens or private keys. Say what is in the file and wait for a yes.
- Tell the person the date the link stops working, and that they can switch it off at any time.

## Manage links

```
myrkup list                 # one line per link: ID, title, kind, expiry, opens
myrkup list --json          # the same as one line of JSON
myrkup update <id> <file>   # replace the file; the link stays the same
myrkup relink <id>          # prints the new link on its own; the old one stops working
myrkup revoke <id>          # switch the link off
```

These commands take the link's ID, the first column of `myrkup list`, not the link itself. A link can be updated with a file of the same kind only: a document stays a document.

`myrkup list` shows whether each link was opened and when it was last opened. A line ends with `· password` when the link has a password, `· storage allowed` when an HTML page may use browser storage, and `· no menu` when the corner button is hidden. When there are no links it prints `Nothing shared.`

`myrkup relink` prints only the new link on standard output; the note that the old link no longer works goes to standard error.

`myrkup status` shows the plan, how many links are in use (`Links: 3 of 20`) and when the key stops working.

## Reading --json

`myrkup share --json` prints one line: `{"id":"...","url":"...","expiresAt":1790000000000}`. `expiresAt` is a time in milliseconds since 1970. `password` is included only when myrkup generated one. Use `id` for `myrkup update`, `myrkup relink` and `myrkup revoke`.

`myrkup list --json` prints one line: an array of objects with `id`, `title`, `kind`, `expiresAt`, `openCount`, `lastOpenedAt`, `hasPassword`, `allowStorage` and `noMenu`. `lastOpenedAt` is `null` for a link that was never opened. It has no link addresses; the server does not keep them. An empty list is `[]`.

Results go to standard output and messages to standard error. The exit code is 0 on success, 1 when the command failed, and 2 when it was typed wrongly.

## Accepted files

`.md`, `.markdown`, `.html`, `.htm`, `.pdf`, `.png`, `.jpg`, `.jpeg`, `.gif` and `.webp`, up to 10 MB each. Markdown is shown as a clean page; the other types are served as they are.
