# nine fish > One identity, every domain you own. Email forwarding and single sign-on at each domain a small company owns: hello@, support@ and each person's own name forwarded to the mailbox they already use, and sign-in to the platforms they use for each brand with an identity on that brand's domain, over OpenID Connect or SAML at the organisation's one sign-in host, such as auth.. And a website at each domain, written and kept up by the person's AI assistant through nf, and a store for the events their websites and services post, tailed, counted and exported with nf. Run from the `nf` CLI and an HTTP API, billed by use in Australian dollars, with no seats or subscription. It is for a company of one to three people running several brands, each on its own domain. Use the service's own words: organisation, person, domain, forward, platform, site, source (where events are posted), and group (who may sign in to a platform restricted to some people). - An organisation is the company. It has one owner, who alone handles billing, puts people in groups and restricts a platform to them, hands the organisation on and closes it; everyone else is a member, who can do everything else. - A domain is set up once, with `nf domain setup`: its forwards, the organisation's sign-in host if it has none yet (auth. by default) and the person's own name, then every DNS record at once. - A forward sends an address at a domain to a mailbox, or to another of the organisation's addresses (support@ to alex@), following wherever that one forwards. The mailbox it goes to, not the address at the domain, agrees first: the first time a mailbox is used it is emailed a link, and mail goes to it once that link is clicked. - A platform is one the company signs in to, on one of its domains. Its issuer is the organisation's one sign-in host, such as https://auth.example.com, whatever the platform's domain, and it sees each person as their name at the platform's domain. Where a platform only wants an email address, the forwarded address is the login. - The people who sign in see the organisation's own pages at its sign-in host, with one passkey for all its domains, never this service's name. ## Using the nf CLI - The CLI is `nf`. Install it with `npm install --global @ninefish/cli` (Node.js 22 or later). Start with `nf login`, which signs in with a passkey in the browser (`nf login --device` where there is no browser, and for scripts and CI, which run as the person who signed them in). - nf uses this stage when nothing else is selected. - Commands inside an organisation take `--org `, or `NF_ORG`, or the profile's organisation (`nf org use `). - At a terminal, `nf domain setup` and `nf platform add` ask for what is left out. Every question has a flag, and under `--json` or `--no-interactive` nf never asks. - Commands that ask for DNS records print them as zone-file lines (absolute names, TTL 300): publish them as they are, or import them at the DNS provider. nf never changes DNS itself, but an assistant that can change the zone may publish them, adding only those records and asking before it changes or removes one already there; then `nf domain check --wait 30m` carries the setup on until it is live. - Add `--json` (or `-o json`) for machine-readable output. Errors in JSON are `{code, message, request_id, details, retryable}`. Rely on exit codes rather than parsing text. - Reading (`list`, `show`) changes nothing and is safe to run. Each change is one command and safe to retry. Adding a card, a callback or a mailbox, changing a secret or ownership, or giving a member a name needs a passkey from the last five minutes: at a terminal nf opens the browser for it and carries on; elsewhere nf queues it for the person's approval and exits 10 with the link (in CI, or with --no-interactive, it exits 6). Ask the user first and tell them the exact command. - `nf help ` lists a command's options. Exit codes: - 0: it worked - 1: something else failed - 2: the command line is wrong, or the API refused a value - 3: not signed in, or the session expired: run `nf login` - 4: not found, or not visible to you - 5: conflict: it changed since it was read - 6: it needs a passkey from the last five minutes (a step-up), or you refused it - 7: the config, profile or stage is missing or invalid - 8: signed in, but not allowed - 9: timeout, rate limit or server error: retrying may work - 10: not done yet: DNS hasn't caught up, or a change waits for your approval at the link nf printed ## Get started Examples use the organisation `acme`, the domain `example.com` and the mailbox `me@example.net`. Output is abridged. ### Install nf Needs Node.js 22 or later. ```sh npm install --global @ninefish/cli ``` ### Your organisation Sign in with a passkey, make an organisation and add a card. - Nothing active, nothing to pay - Invite someone to help run it - Billing stays with you ```sh nf login nf org create acme --username alex nf billing setup nf person invite sam@example.com --username sam ``` ### Set up a domain A few questions, then every DNS record the domain needs. - Which addresses forward, and where - The organisation’s sign-in host, the first time - Your username works there too ```sh nf domain setup example.com ``` ### Check the records Publish the records, then check. - Each part turns on as its record appears - A new mailbox confirms by email first - Repeat for each brand ```sh nf domain check example.com ``` ### Forward mail Forward any address in one command. No mailboxes to run. - To the mailbox you already use - Or to another of your addresses - Catch everything else with *@example.com - nf email test sends a real message and tracks it ```sh nf email route create support@example.com --to alex@example.com nf email route create security@example.com --to sam@example.net nf email test support@example.com ``` ### Sign in to your platforms Add a platform, then paste what nf prints into its single sign-on settings. - Everyone signs in with a passkey, as their name at your domain - Or only people in a group, such as finance - OpenID Connect by default, or SAML with --saml - No single sign-on setting? Sign up with your forwarded address ```sh nf platform add nf platform add --saml ``` ### Build a website Your assistant writes the site through nf, one page at a time, and you publish what you've seen. - Start from a landing page, business site, blog, portfolio or docs - Every change is a revision you can undo - A private preview link before anything is public - Served at www.example.com with its own certificate ```sh nf site create www --name Acme --starter business nf site page set www /about --title About --file about.md nf site release create www nf site host add www www.example.com nf site publish www rel_… ``` ### Collect events Your websites and services post JSON to a source, and nf tails, counts and exports it. - No SDK: any server, script or web page posts with the source's token - Limit a source to your own origins, so other sites' pages can't post - Live for 7 days, then counted from an archive kept 90 days, or up to 13 months - Never the sender's address or browser ```sh curl https://ingest.nine.fish/v1/events \ nf analytics create web --origin https://www.example.com \ --token-file web.token -H "Authorization: Bearer $(cat web.token)" \ --json '{"event":"signup.completed","plan":"pro"}' nf analytics tail web nf analytics query web --by event --since 30d ``` ### Brand your sign-in pages Sign-in pages on your own host, with your name, logo and colours. - The pages show your organisation's name - Set once, for every domain and platform - Add dark colours and pages follow each person's setting ```sh nf org name set Acme nf org branding set --primary '#0b6e4f' \ --background '#ffffff' --logo ./acme.png \ --dark-primary '#6fd3a8' --dark-background '#0f1712' ``` ### Know what you owe See what you owe at any time, with an alert before the invoice. - Charges carry forward until they reach A$10, then go on the next monthly invoice - Every meter for any dates with nf usage show - The owner is emailed when a month passes A$10; change the amount or turn it off - An alert, never a limit ```sh nf billing show nf billing alert set 25 ``` ### See what happened Where every message went, why any didn't, and who changed what. - One line per mailbox, easy to grep - Kept 90 days, without subject or content - Filter by domain, address or date - nf audit list shows who changed what, and when ```sh nf email log --domain example.com --since 2026-11-01 \ | grep bounced | awk '{print $3, $4, $5}' ``` ## Writing a site with nf A site is held by nine fish, not in a folder: every page, layout, component, style, asset, collection and entry is its own resource, read and changed on its own. There is nothing to check out or keep in step. Start every session with: nf site inspect It leads with the site's instructions (notes for whoever edits it next), lists recent change identifiers, and gives every resource with its version, what it uses and what uses it. ## Changing things nf site page set /about --title About --file about.md nf site page set /about --file about.md --version 3 A new resource needs no version. To change one, give the version you read: nf keeps what you don't give and refuses a stale version, naming who changed it. Every save is a revision: nf site history and nf site restore go back. Give saves that belong together a change identifier (--change redesign, or NF_CHANGE=redesign for a session); nf site undo redesign puts back everything it touched. The draft changes at once; nothing public changes until a release is published. ## Pages, layouts and components - A page is Markdown or HTML at a path. Its layout is an HTML document whose takes it. - A component is HTML used as a custom element: uses hero. Children fill its ; a child with slot="media" fills ; a slot's own content shows when nothing fills it. A component declares its attributes (heading! is required, lede=Welcome has a default). - Styles are CSS: global ones apply everywhere; a layout or component names the others it needs. Each page gets them once, by order then name. - Assets are uploaded files. Refer to them by path (/images/hero.jpg) in HTML and CSS; nf rewrites the references to content-hashed URLs. Scripts are not rewritten: use the path. ## Values {{name}} inserts a value as text, escaped. Values are data, never markup, and are refused in event handlers, style attributes, srcset,