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
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Skip to the content
+
+
+ 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.
Folders, threads, reading with links you can click, reply, reply all, forward, drafts, flags, archive, move, delete and search, all from the keyboard.
+
+
+
Compose in your editor
+
Write mail in $EDITOR, with contact autocomplete and a choice of sending identity.
+
+
+
Calendar and contacts
+
A two-week calendar agenda and your contacts, over CalDAV and CardDAV with a Fastmail app password.
+
+
+
Commands that print JSON
+
List accounts and folders, view mail, mark it seen, and create, rename or delete folders. Every command takes --json and prints exactly one JSON object.
+
+
+
A live watch
+
Holds a JMAP push connection open and prints a JSON line for every added, updated or deleted email.
+
+
+
Offline mode
+
Caches mail and bodies locally in SQLite so you can read and draft offline, then fm-cli sync pushes the queued changes.
+
+
+
Easy, careful sign-in
+
fm-cli auth login opens Fastmail’s consent page in your browser. Tokens go into your system keyring, never a file, and refresh themselves.
+
+
+
Inline images
+
In terminals that can draw them (Sixel, the Kitty graphics protocol or iTerm2 images), and only when you ask.
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.