diff --git a/.github/workflows/pages.yaml b/.github/workflows/pages.yaml new file mode 100644 index 0000000..c5ff35d --- /dev/null +++ b/.github/workflows/pages.yaml @@ -0,0 +1,58 @@ +name: Pages + +on: + push: + branches: [main] + paths: + - "site/**" + - "docs/tui.png" + - ".github/workflows/pages.yaml" + pull_request: + paths: + - "site/**" + - "docs/tui.png" + - ".github/workflows/pages.yaml" + workflow_dispatch: + +permissions: + contents: read + +concurrency: + group: pages-${{ github.ref }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + + - name: Assemble the site + run: | + mkdir _site + cp -r site/. _site/ + # The screenshot lives in docs/ for the README; the page uses the same file. + cp docs/tui.png _site/tui.png + test -s _site/index.html + test "$(cat _site/CNAME)" = "fm-cli.ninepointlabs.com" + + - uses: actions/configure-pages@45bfe0192ca1faeb007ade9deae92b16b8254a0d # v6.0.0 + if: github.event_name != 'pull_request' + + - uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0 + with: + path: _site + + deploy: + if: github.event_name != 'pull_request' + needs: build + runs-on: ubuntu-latest + permissions: + pages: write + id-token: write + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + steps: + - id: deployment + uses: actions/deploy-pages@368f82528645a54fb793d4d04e342629a3f51346 # v5.0.1 diff --git a/README.md b/README.md index faa3a68..2bb323e 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # fm-cli +Website: https://fm-cli.ninepointlabs.com + Fastmail from the terminal: a small Go client for Fastmail's JMAP API with a full-screen mail app, a set of scriptable commands that print JSON, and a live `watch` that follows your mailbox over Fastmail's push connection. It is diff --git a/site/CNAME b/site/CNAME new file mode 100644 index 0000000..7876044 --- /dev/null +++ b/site/CNAME @@ -0,0 +1 @@ +fm-cli.ninepointlabs.com diff --git a/site/fonts/Inter-OFL.txt b/site/fonts/Inter-OFL.txt new file mode 100644 index 0000000..9b2ca37 --- /dev/null +++ b/site/fonts/Inter-OFL.txt @@ -0,0 +1,92 @@ +Copyright (c) 2016 The Inter Project Authors (https://github.com/rsms/inter) + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION AND CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/site/fonts/JetBrainsMono-OFL.txt b/site/fonts/JetBrainsMono-OFL.txt new file mode 100644 index 0000000..8bee414 --- /dev/null +++ b/site/fonts/JetBrainsMono-OFL.txt @@ -0,0 +1,93 @@ +Copyright 2020 The JetBrains Mono Project Authors (https://github.com/JetBrains/JetBrainsMono) + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +https://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/site/fonts/inter-latin.woff2 b/site/fonts/inter-latin.woff2 new file mode 100644 index 0000000..5f5d124 Binary files /dev/null and b/site/fonts/inter-latin.woff2 differ diff --git a/site/fonts/jetbrains-mono-latin.woff2 b/site/fonts/jetbrains-mono-latin.woff2 new file mode 100644 index 0000000..8f5dd98 Binary files /dev/null and b/site/fonts/jetbrains-mono-latin.woff2 differ diff --git a/site/index.html b/site/index.html new file mode 100644 index 0000000..2e69113 --- /dev/null +++ b/site/index.html @@ -0,0 +1,145 @@ + + + + + + fm-cli: Fastmail from the terminal + + + + + + + + + + + + + + + + + + + +
+ fm-cli + +
+ +
+
+

Terminal · Go · MIT

+

Fastmail from the terminal.

+

fm-cli is a small Go client for Fastmail’s JMAP API. It gives you a full-screen mail app, a set of scriptable commands that print JSON, and a live watch that follows your mailbox over Fastmail’s push connection. It’s for Fastmail users who live in a terminal, and it’s the engine behind the Fastmail plugin for Omarchy.

+ +
+ +
+
The fm-cli terminal app reading a thread
+
+ +
+

What it does

+ +
+ +
+

Install

+
+
+

On Omarchy

+
omarchy-mise-install github:ninepointlabs/fm-cli fm-cli
+
+
+

With mise elsewhere

+
mise use -g github:ninepointlabs/fm-cli@latest
+
+
+

With autonomix-cli

+

autonomix-cli installs it from GitHub Releases and keeps it updated.

+
autonomix-cli add https://github.com/ninepointlabs/fm-cli
+
+
+

Packages and tarballs

+

Every release ships .pkg.tar.zst, .deb and .rpm packages and plain tarballs for Linux and macOS.

+
+
+

From source

+

Go 1.26 or newer. No C toolchain needed.

+
git clone https://github.com/ninepointlabs/fm-cli.git
+cd fm-cli
+go build -o fm-cli ./cmd/fm-cli
+
+
+
+ +
+

Get started

+
+
+

Sign in. This opens Fastmail’s consent page in your browser; approve fm-cli there and you’re done. Prefer an API token? fm-cli auth login --token takes one instead.

+
fm-cli auth login
+
+
+

Open the app, or ask for your mail as JSON.

+
fm-cli
+fm-cli box view inbox --limit 20 --json
+
+
+

Keys, every command and the full JSON contract are in the README.

+
+
+ + + + diff --git a/site/style.css b/site/style.css new file mode 100644 index 0000000..d01297d --- /dev/null +++ b/site/style.css @@ -0,0 +1,349 @@ +/* Product page. Plain CSS, no build. + Tokens, fonts and type scale follow ninepointlabs.com: + a dark workshop by default, warm paper in light mode. */ + +/* Self-hosted Latin subsets (SIL OFL 1.1, licences in fonts/). */ +@font-face { + font-family: "Inter"; + src: url("fonts/inter-latin.woff2") format("woff2"); + font-weight: 400 800; + font-style: normal; + font-display: swap; +} + +@font-face { + font-family: "JetBrains Mono"; + src: url("fonts/jetbrains-mono-latin.woff2") format("woff2"); + font-weight: 400; + font-style: normal; + font-display: swap; +} + +:root { + --sans: "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif; + --mono: "JetBrainsMono Nerd Font", "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace; + --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif; + --bg: #0c0e11; + --ink: #ece8e1; + --ink-soft: #9ba1a8; + --ink-faint: #8a9199; + --line: #20252b; + --surface: #13161a; + --surface-2: #181c21; + --accent: #4cc3e0; + --focus: #f3bd55; + --radius: 1.25rem; + color-scheme: dark; +} + +@media (prefers-color-scheme: light) { + :root { + --bg: #f6f2ea; + --ink: #1b1f23; + --ink-soft: #545b62; + --ink-faint: #646a70; + --line: #e2d9c8; + --surface: #fffdf8; + --surface-2: #f1ebdf; + --accent: #0b6e8a; + --focus: #8a5b00; + color-scheme: light; + } +} + +* { + box-sizing: border-box; +} + +html { + scroll-behavior: smooth; +} + +body { + margin: 0; + background: + radial-gradient(60rem 40rem at 85% -10%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%), + var(--bg); + background-repeat: no-repeat; + color: var(--ink); + font: 1rem/1.55 var(--sans); + -webkit-font-smoothing: antialiased; + overflow-x: clip; +} + +a { + color: inherit; + text-decoration-color: var(--accent); + text-underline-offset: 0.2em; +} + +a:focus-visible { + outline: 3px solid var(--focus); + outline-offset: 3px; + border-radius: 0.4rem; +} + +code { + font: 0.88em var(--mono); +} + +.wrap { + width: min(64rem, 100% - 2.5rem); + margin-inline: auto; +} + +.skip { + position: absolute; + left: 1rem; + top: -4rem; + padding: 0.5rem 0.9rem; + border-radius: 0.5rem; + background: var(--ink); + color: var(--bg); + z-index: 10; +} + +.skip:focus { + top: 1rem; +} + +/* Header */ + +.top { + display: flex; + flex-wrap: wrap; + align-items: center; + justify-content: space-between; + gap: 0.5rem 1rem; + padding-block: 1.5rem; +} + +.brand { + font: 650 1rem var(--mono); + letter-spacing: -0.01em; + text-decoration: none; +} + +.top nav { + display: flex; + flex-wrap: wrap; + gap: 0.5rem 1.5rem; + font: 0.82rem var(--mono); +} + +.top nav a { + color: var(--ink-soft); + text-decoration: none; + transition: color 0.15s; +} + +.top nav a:hover { + color: var(--ink); +} + +/* Hero */ + +.hero { + padding-block: clamp(2.5rem, 7vw, 5.5rem) clamp(2rem, 5vw, 3.5rem); +} + +.eyebrow { + margin: 0 0 1.5rem; + color: var(--accent); + font: 0.78rem var(--mono); + letter-spacing: 0.12em; + text-transform: uppercase; +} + +h1 { + max-width: 17ch; + margin: 0; + font-size: clamp(2.5rem, 6.6vw, 4.75rem); + font-weight: 750; + line-height: 1.02; + letter-spacing: -0.045em; + text-wrap: balance; +} + +h1 .hl { + background: linear-gradient(100deg, #2aa4cf, #8fe0ef); + -webkit-background-clip: text; + background-clip: text; + color: transparent; +} + +@media (prefers-color-scheme: light) { + h1 .hl { + background-image: linear-gradient(100deg, #0a536a, #1f98c3); + } +} + +.lede { + max-width: 40rem; + margin: 1.75rem 0 0; + color: var(--ink-soft); + font-size: clamp(1.05rem, 1.6vw, 1.25rem); +} + +.lede a { + color: var(--ink); +} + +.actions { + display: flex; + flex-wrap: wrap; + gap: 0.75rem; + margin-top: 2rem; +} + +.button { + display: inline-block; + padding: 0.6rem 1.1rem; + border: 1px solid var(--line); + border-radius: 0.6rem; + background: var(--surface); + font: 0.88rem var(--mono); + text-decoration: none; + transition: border-color 0.15s; +} + +.button:hover { + border-color: var(--accent); +} + +.button.primary { + border-color: var(--accent); + background: var(--accent); + color: var(--bg); +} + +/* Screenshot */ + +.shot { + margin: 0 0 clamp(2rem, 5vw, 3.5rem); + padding: 0.75rem; + border: 1px solid var(--line); + border-radius: var(--radius); + background: #111; +} + +.shot img { + display: block; + width: 100%; + height: auto; + border-radius: 0.75rem; +} + +/* Sections */ + +.band { + padding-block: clamp(2rem, 4.5vw, 3.25rem); + border-top: 1px solid var(--line); +} + +h2 { + margin: 0 0 1.25rem; + font-size: clamp(1.5rem, 2.6vw, 2rem); + font-weight: 700; + letter-spacing: -0.03em; +} + +h3 { + margin: 0 0 0.4rem; + font-size: 1.05rem; + font-weight: 650; + letter-spacing: -0.01em; +} + +.band > p { + max-width: 44rem; + color: var(--ink-soft); +} + +.features { + display: grid; + grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); + gap: 1rem; + margin: 0; + padding: 0; + list-style: none; +} + +.features li { + padding: 1.1rem 1.25rem; + border: 1px solid var(--line); + border-radius: var(--radius); + background: var(--surface); +} + +.features p { + margin: 0; + color: var(--ink-soft); +} + +.steps { + display: grid; + gap: 1.5rem; +} + +.steps > * { + min-width: 0; +} + +.steps p { + max-width: 44rem; + margin: 0 0 0.6rem; + color: var(--ink-soft); +} + +pre { + margin: 0; + padding: 0.9rem 1.1rem; + overflow-x: auto; + border: 1px solid var(--line); + border-radius: 0.75rem; + background: var(--surface-2); + font: 0.86rem/1.6 var(--mono); +} + +pre code { + font: inherit; +} + +/* Footer */ + +.foot { + display: flex; + flex-wrap: wrap; + justify-content: space-between; + gap: 1rem 2rem; + margin-top: 1rem; + padding-block: 2rem 3rem; + border-top: 1px solid var(--line); + color: var(--ink-soft); + font-size: 0.92rem; +} + +.foot p { + margin: 0; +} + +.foot ul { + display: flex; + flex-wrap: wrap; + gap: 0.5rem 1.5rem; + margin: 0; + padding: 0; + list-style: none; +} + +@media (prefers-reduced-motion: reduce) { + html { + scroll-behavior: auto; + } + + .button, + .top nav a { + transition: none; + } +}