chore: Also format scripts and skills.

This commit is contained in:
cpojer
2026-01-31 21:21:09 +09:00
parent a767c584c7
commit 76b5208b11
95 changed files with 2250 additions and 1239 deletions
+41 -1
View File
@@ -2,7 +2,24 @@
name: himalaya
description: "CLI to manage emails via IMAP/SMTP. Use `himalaya` to list, read, write, reply, forward, search, and organize emails from the terminal. Supports multiple accounts and message composition with MML (MIME Meta Language)."
homepage: https://github.com/pimalaya/himalaya
metadata: {"openclaw":{"emoji":"📧","requires":{"bins":["himalaya"]},"install":[{"id":"brew","kind":"brew","formula":"himalaya","bins":["himalaya"],"label":"Install Himalaya (brew)"}]}}
metadata:
{
"openclaw":
{
"emoji": "📧",
"requires": { "bins": ["himalaya"] },
"install":
[
{
"id": "brew",
"kind": "brew",
"formula": "himalaya",
"bins": ["himalaya"],
"label": "Install Himalaya (brew)",
},
],
},
}
---
# Himalaya Email CLI
@@ -23,11 +40,13 @@ Himalaya is a CLI email client that lets you manage emails from the terminal usi
## Configuration Setup
Run the interactive wizard to set up an account:
```bash
himalaya account configure
```
Or create `~/.config/himalaya/config.toml` manually:
```toml
[accounts.personal]
email = "you@example.com"
@@ -62,16 +81,19 @@ himalaya folder list
### List Emails
List emails in INBOX (default):
```bash
himalaya envelope list
```
List emails in a specific folder:
```bash
himalaya envelope list --folder "Sent"
```
List with pagination:
```bash
himalaya envelope list --page 1 --page-size 20
```
@@ -85,11 +107,13 @@ himalaya envelope list from john@example.com subject meeting
### Read an Email
Read email by ID (shows plain text):
```bash
himalaya message read 42
```
Export raw MIME:
```bash
himalaya message export 42 --full
```
@@ -97,11 +121,13 @@ himalaya message export 42 --full
### Reply to an Email
Interactive reply (opens $EDITOR):
```bash
himalaya message reply 42
```
Reply-all:
```bash
himalaya message reply 42 --all
```
@@ -115,11 +141,13 @@ himalaya message forward 42
### Write a New Email
Interactive compose (opens $EDITOR):
```bash
himalaya message write
```
Send directly using template:
```bash
cat << 'EOF' | himalaya template send
From: you@example.com
@@ -131,6 +159,7 @@ EOF
```
Or with headers flag:
```bash
himalaya message write -H "To:recipient@example.com" -H "Subject:Test" "Message body here"
```
@@ -138,11 +167,13 @@ himalaya message write -H "To:recipient@example.com" -H "Subject:Test" "Message
### Move/Copy Emails
Move to folder:
```bash
himalaya message move 42 "Archive"
```
Copy to folder:
```bash
himalaya message copy 42 "Important"
```
@@ -156,11 +187,13 @@ himalaya message delete 42
### Manage Flags
Add flag:
```bash
himalaya flag add 42 --flag seen
```
Remove flag:
```bash
himalaya flag remove 42 --flag seen
```
@@ -168,11 +201,13 @@ himalaya flag remove 42 --flag seen
## Multiple Accounts
List accounts:
```bash
himalaya account list
```
Use a specific account:
```bash
himalaya --account work envelope list
```
@@ -180,11 +215,13 @@ himalaya --account work envelope list
## Attachments
Save attachments from a message:
```bash
himalaya attachment download 42
```
Save to specific directory:
```bash
himalaya attachment download 42 --dir ~/Downloads
```
@@ -192,6 +229,7 @@ himalaya attachment download 42 --dir ~/Downloads
## Output Formats
Most commands support `--output` for structured output:
```bash
himalaya envelope list --output json
himalaya envelope list --output plain
@@ -200,11 +238,13 @@ himalaya envelope list --output plain
## Debugging
Enable debug logging:
```bash
RUST_LOG=debug himalaya envelope list
```
Full trace with backtrace:
```bash
RUST_LOG=trace RUST_BACKTRACE=1 himalaya envelope list
```
@@ -32,20 +32,24 @@ message.send.backend.auth.raw = "your-password"
## Password Options
### Raw password (testing only, not recommended)
```toml
backend.auth.raw = "your-password"
```
### Password from command (recommended)
```toml
backend.auth.cmd = "pass show email/imap"
# backend.auth.cmd = "security find-generic-password -a user@example.com -s imap -w"
```
### System keyring (requires keyring feature)
```toml
backend.auth.keyring = "imap-example"
```
Then run `himalaya account configure <account>` to store the password.
## Gmail Configuration
@@ -104,6 +108,7 @@ message.send.backend.auth.cmd = "pass show icloud/app-password"
## Folder Aliases
Map custom folder names:
```toml
[accounts.default.folder.alias]
inbox = "INBOX"
@@ -126,6 +131,7 @@ email = "work@company.com"
```
Switch accounts with `--account`:
```bash
himalaya --account work envelope list
```
@@ -155,6 +161,7 @@ backend.auth.token-url = "https://provider.com/oauth/token"
## Additional Options
### Signature
```toml
[accounts.default]
signature = "Best regards,\nYour Name"
@@ -162,13 +169,16 @@ signature-delim = "-- \n"
```
### Downloads directory
```toml
[accounts.default]
downloads-dir = "~/Downloads/himalaya"
```
### Editor for composing
Set via environment variable:
```bash
export EDITOR="vim"
```
@@ -17,6 +17,7 @@ This is the message body.
## Headers
Common headers:
- `From`: Sender address
- `To`: Primary recipient(s)
- `Cc`: Carbon copy recipients
@@ -37,6 +38,7 @@ To: user1@example.com, user2@example.com, "Jane" <jane@example.com>
## Plain Text Body
Simple plain text email:
```
From: alice@localhost
To: bob@localhost
@@ -54,6 +56,7 @@ Alice
### Multipart Messages
Alternative text/html parts:
```
From: alice@localhost
To: bob@localhost
@@ -69,6 +72,7 @@ This is the plain text version.
### Attachments
Attach a file:
```
From: alice@localhost
To: bob@localhost
@@ -80,11 +84,13 @@ Here is the document you requested.
```
Attachment with custom name:
```
<#part filename=/path/to/file.pdf name=report.pdf><#/part>
```
Multiple attachments:
```
<#part filename=/path/to/doc1.pdf><#/part>
<#part filename=/path/to/doc2.pdf><#/part>
@@ -93,6 +99,7 @@ Multiple attachments:
### Inline Images
Embed an image inline:
```
From: alice@localhost
To: bob@localhost
@@ -129,13 +136,17 @@ Alice
## MML Tag Reference
### `<#multipart>`
Groups multiple parts together.
- `type=alternative`: Different representations of same content
- `type=mixed`: Independent parts (text + attachments)
- `type=related`: Parts that reference each other (HTML + images)
### `<#part>`
Defines a message part.
- `type=<mime-type>`: Content type (e.g., `text/html`, `application/pdf`)
- `filename=<path>`: File to attach
- `name=<name>`: Display name for attachment
@@ -145,28 +156,34 @@ Defines a message part.
## Composing from CLI
### Interactive compose
Opens your `$EDITOR`:
```bash
himalaya message write
```
### Reply (opens editor with quoted message)
```bash
himalaya message reply 42
himalaya message reply 42 --all # reply-all
```
### Forward
```bash
himalaya message forward 42
```
### Send from stdin
```bash
cat message.txt | himalaya template send
```
### Prefill headers from CLI
```bash
himalaya message write \
-H "To:recipient@example.com" \