add agent workspace
This commit is contained in:
7
skills/git-essentials/.clawhub/origin.json
Normal file
7
skills/git-essentials/.clawhub/origin.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 1,
|
||||
"registry": "https://clawhub.ai",
|
||||
"slug": "git-essentials",
|
||||
"installedVersion": "1.0.0",
|
||||
"installedAt": 1771481595322
|
||||
}
|
||||
431
skills/git-essentials/SKILL.md
Normal file
431
skills/git-essentials/SKILL.md
Normal file
@@ -0,0 +1,431 @@
|
||||
---
|
||||
name: git-essentials
|
||||
description: Essential Git commands and workflows for version control, branching, and collaboration.
|
||||
homepage: https://git-scm.com/
|
||||
metadata: {"clawdbot":{"emoji":"🌳","requires":{"bins":["git"]}}}
|
||||
---
|
||||
|
||||
# Git Essentials
|
||||
|
||||
Essential Git commands for version control and collaboration.
|
||||
|
||||
## Initial Setup
|
||||
|
||||
```bash
|
||||
# Configure user
|
||||
git config --global user.name "Your Name"
|
||||
git config --global user.email "your@email.com"
|
||||
|
||||
# Initialize repository
|
||||
git init
|
||||
|
||||
# Clone repository
|
||||
git clone https://github.com/user/repo.git
|
||||
git clone https://github.com/user/repo.git custom-name
|
||||
```
|
||||
|
||||
## Basic Workflow
|
||||
|
||||
### Staging and committing
|
||||
```bash
|
||||
# Check status
|
||||
git status
|
||||
|
||||
# Add files to staging
|
||||
git add file.txt
|
||||
git add .
|
||||
git add -A # All changes including deletions
|
||||
|
||||
# Commit changes
|
||||
git commit -m "Commit message"
|
||||
|
||||
# Add and commit in one step
|
||||
git commit -am "Message"
|
||||
|
||||
# Amend last commit
|
||||
git commit --amend -m "New message"
|
||||
git commit --amend --no-edit # Keep message
|
||||
```
|
||||
|
||||
### Viewing changes
|
||||
```bash
|
||||
# Show unstaged changes
|
||||
git diff
|
||||
|
||||
# Show staged changes
|
||||
git diff --staged
|
||||
|
||||
# Show changes in specific file
|
||||
git diff file.txt
|
||||
|
||||
# Show changes between commits
|
||||
git diff commit1 commit2
|
||||
```
|
||||
|
||||
## Branching & Merging
|
||||
|
||||
### Branch management
|
||||
```bash
|
||||
# List branches
|
||||
git branch
|
||||
git branch -a # Include remote branches
|
||||
|
||||
# Create branch
|
||||
git branch feature-name
|
||||
|
||||
# Switch branch
|
||||
git checkout feature-name
|
||||
git switch feature-name # Modern alternative
|
||||
|
||||
# Create and switch
|
||||
git checkout -b feature-name
|
||||
git switch -c feature-name
|
||||
|
||||
# Delete branch
|
||||
git branch -d branch-name
|
||||
git branch -D branch-name # Force delete
|
||||
|
||||
# Rename branch
|
||||
git branch -m old-name new-name
|
||||
```
|
||||
|
||||
### Merging
|
||||
```bash
|
||||
# Merge branch into current
|
||||
git merge feature-name
|
||||
|
||||
# Merge with no fast-forward
|
||||
git merge --no-ff feature-name
|
||||
|
||||
# Abort merge
|
||||
git merge --abort
|
||||
|
||||
# Show merge conflicts
|
||||
git diff --name-only --diff-filter=U
|
||||
```
|
||||
|
||||
## Remote Operations
|
||||
|
||||
### Managing remotes
|
||||
```bash
|
||||
# List remotes
|
||||
git remote -v
|
||||
|
||||
# Add remote
|
||||
git remote add origin https://github.com/user/repo.git
|
||||
|
||||
# Change remote URL
|
||||
git remote set-url origin https://github.com/user/new-repo.git
|
||||
|
||||
# Remove remote
|
||||
git remote remove origin
|
||||
```
|
||||
|
||||
### Syncing with remote
|
||||
```bash
|
||||
# Fetch from remote
|
||||
git fetch origin
|
||||
|
||||
# Pull changes (fetch + merge)
|
||||
git pull
|
||||
|
||||
# Pull with rebase
|
||||
git pull --rebase
|
||||
|
||||
# Push changes
|
||||
git push
|
||||
|
||||
# Push new branch
|
||||
git push -u origin branch-name
|
||||
|
||||
# Force push (careful!)
|
||||
git push --force-with-lease
|
||||
```
|
||||
|
||||
## History & Logs
|
||||
|
||||
### Viewing history
|
||||
```bash
|
||||
# Show commit history
|
||||
git log
|
||||
|
||||
# One line per commit
|
||||
git log --oneline
|
||||
|
||||
# With graph
|
||||
git log --graph --oneline --all
|
||||
|
||||
# Last N commits
|
||||
git log -5
|
||||
|
||||
# Commits by author
|
||||
git log --author="Name"
|
||||
|
||||
# Commits in date range
|
||||
git log --since="2 weeks ago"
|
||||
git log --until="2024-01-01"
|
||||
|
||||
# File history
|
||||
git log -- file.txt
|
||||
```
|
||||
|
||||
### Searching history
|
||||
```bash
|
||||
# Search commit messages
|
||||
git log --grep="bug fix"
|
||||
|
||||
# Search code changes
|
||||
git log -S "function_name"
|
||||
|
||||
# Show who changed each line
|
||||
git blame file.txt
|
||||
|
||||
# Find commit that introduced bug
|
||||
git bisect start
|
||||
git bisect bad
|
||||
git bisect good commit-hash
|
||||
```
|
||||
|
||||
## Undoing Changes
|
||||
|
||||
### Working directory
|
||||
```bash
|
||||
# Discard changes in file
|
||||
git restore file.txt
|
||||
git checkout -- file.txt # Old way
|
||||
|
||||
# Discard all changes
|
||||
git restore .
|
||||
```
|
||||
|
||||
### Staging area
|
||||
```bash
|
||||
# Unstage file
|
||||
git restore --staged file.txt
|
||||
git reset HEAD file.txt # Old way
|
||||
|
||||
# Unstage all
|
||||
git reset
|
||||
```
|
||||
|
||||
### Commits
|
||||
```bash
|
||||
# Undo last commit (keep changes)
|
||||
git reset --soft HEAD~1
|
||||
|
||||
# Undo last commit (discard changes)
|
||||
git reset --hard HEAD~1
|
||||
|
||||
# Revert commit (create new commit)
|
||||
git revert commit-hash
|
||||
|
||||
# Reset to specific commit
|
||||
git reset --hard commit-hash
|
||||
```
|
||||
|
||||
## Stashing
|
||||
|
||||
```bash
|
||||
# Stash changes
|
||||
git stash
|
||||
|
||||
# Stash with message
|
||||
git stash save "Work in progress"
|
||||
|
||||
# List stashes
|
||||
git stash list
|
||||
|
||||
# Apply latest stash
|
||||
git stash apply
|
||||
|
||||
# Apply and remove stash
|
||||
git stash pop
|
||||
|
||||
# Apply specific stash
|
||||
git stash apply stash@{2}
|
||||
|
||||
# Delete stash
|
||||
git stash drop stash@{0}
|
||||
|
||||
# Clear all stashes
|
||||
git stash clear
|
||||
```
|
||||
|
||||
## Rebasing
|
||||
|
||||
```bash
|
||||
# Rebase current branch
|
||||
git rebase main
|
||||
|
||||
# Interactive rebase (last 3 commits)
|
||||
git rebase -i HEAD~3
|
||||
|
||||
# Continue after resolving conflicts
|
||||
git rebase --continue
|
||||
|
||||
# Skip current commit
|
||||
git rebase --skip
|
||||
|
||||
# Abort rebase
|
||||
git rebase --abort
|
||||
```
|
||||
|
||||
## Tags
|
||||
|
||||
```bash
|
||||
# List tags
|
||||
git tag
|
||||
|
||||
# Create lightweight tag
|
||||
git tag v1.0.0
|
||||
|
||||
# Create annotated tag
|
||||
git tag -a v1.0.0 -m "Version 1.0.0"
|
||||
|
||||
# Tag specific commit
|
||||
git tag v1.0.0 commit-hash
|
||||
|
||||
# Push tag
|
||||
git push origin v1.0.0
|
||||
|
||||
# Push all tags
|
||||
git push --tags
|
||||
|
||||
# Delete tag
|
||||
git tag -d v1.0.0
|
||||
git push origin --delete v1.0.0
|
||||
```
|
||||
|
||||
## Advanced Operations
|
||||
|
||||
### Cherry-pick
|
||||
```bash
|
||||
# Apply specific commit
|
||||
git cherry-pick commit-hash
|
||||
|
||||
# Cherry-pick without committing
|
||||
git cherry-pick -n commit-hash
|
||||
```
|
||||
|
||||
### Submodules
|
||||
```bash
|
||||
# Add submodule
|
||||
git submodule add https://github.com/user/repo.git path/
|
||||
|
||||
# Initialize submodules
|
||||
git submodule init
|
||||
|
||||
# Update submodules
|
||||
git submodule update
|
||||
|
||||
# Clone with submodules
|
||||
git clone --recursive https://github.com/user/repo.git
|
||||
```
|
||||
|
||||
### Clean
|
||||
```bash
|
||||
# Preview files to be deleted
|
||||
git clean -n
|
||||
|
||||
# Delete untracked files
|
||||
git clean -f
|
||||
|
||||
# Delete untracked files and directories
|
||||
git clean -fd
|
||||
|
||||
# Include ignored files
|
||||
git clean -fdx
|
||||
```
|
||||
|
||||
## Common Workflows
|
||||
|
||||
**Feature branch workflow:**
|
||||
```bash
|
||||
git checkout -b feature/new-feature
|
||||
# Make changes
|
||||
git add .
|
||||
git commit -m "Add new feature"
|
||||
git push -u origin feature/new-feature
|
||||
# Create PR, then after merge:
|
||||
git checkout main
|
||||
git pull
|
||||
git branch -d feature/new-feature
|
||||
```
|
||||
|
||||
**Hotfix workflow:**
|
||||
```bash
|
||||
git checkout main
|
||||
git pull
|
||||
git checkout -b hotfix/critical-bug
|
||||
# Fix bug
|
||||
git commit -am "Fix critical bug"
|
||||
git push -u origin hotfix/critical-bug
|
||||
# After merge:
|
||||
git checkout main && git pull
|
||||
```
|
||||
|
||||
**Syncing fork:**
|
||||
```bash
|
||||
git remote add upstream https://github.com/original/repo.git
|
||||
git fetch upstream
|
||||
git checkout main
|
||||
git merge upstream/main
|
||||
git push origin main
|
||||
```
|
||||
|
||||
## Useful Aliases
|
||||
|
||||
Add to `~/.gitconfig`:
|
||||
```ini
|
||||
[alias]
|
||||
st = status
|
||||
co = checkout
|
||||
br = branch
|
||||
ci = commit
|
||||
unstage = reset HEAD --
|
||||
last = log -1 HEAD
|
||||
visual = log --graph --oneline --all
|
||||
amend = commit --amend --no-edit
|
||||
```
|
||||
|
||||
## Tips
|
||||
|
||||
- Commit often, perfect later (interactive rebase)
|
||||
- Write meaningful commit messages
|
||||
- Use `.gitignore` for files to exclude
|
||||
- Never force push to shared branches
|
||||
- Pull before starting work
|
||||
- Use feature branches, not main
|
||||
- Rebase feature branches before merging
|
||||
- Use `--force-with-lease` instead of `--force`
|
||||
|
||||
## Common Issues
|
||||
|
||||
**Undo accidental commit:**
|
||||
```bash
|
||||
git reset --soft HEAD~1
|
||||
```
|
||||
|
||||
**Recover deleted branch:**
|
||||
```bash
|
||||
git reflog
|
||||
git checkout -b branch-name <commit-hash>
|
||||
```
|
||||
|
||||
**Fix wrong commit message:**
|
||||
```bash
|
||||
git commit --amend -m "Correct message"
|
||||
```
|
||||
|
||||
**Resolve merge conflicts:**
|
||||
```bash
|
||||
# Edit files to resolve conflicts
|
||||
git add resolved-files
|
||||
git commit # Or git merge --continue
|
||||
```
|
||||
|
||||
## Documentation
|
||||
|
||||
Official docs: https://git-scm.com/doc
|
||||
Pro Git book: https://git-scm.com/book
|
||||
Visual Git guide: https://marklodato.github.io/visual-git-guide/
|
||||
6
skills/git-essentials/_meta.json
Normal file
6
skills/git-essentials/_meta.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"ownerId": "kn7anq2d7gcch060anc2j9cg89800dyv",
|
||||
"slug": "git-essentials",
|
||||
"version": "1.0.0",
|
||||
"publishedAt": 1769692045864
|
||||
}
|
||||
7
skills/gitea/.clawhub/origin.json
Normal file
7
skills/gitea/.clawhub/origin.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 1,
|
||||
"registry": "https://clawhub.ai",
|
||||
"slug": "gitea",
|
||||
"installedVersion": "1.0.0",
|
||||
"installedAt": 1771481717994
|
||||
}
|
||||
203
skills/gitea/SKILL.md
Normal file
203
skills/gitea/SKILL.md
Normal file
@@ -0,0 +1,203 @@
|
||||
---
|
||||
name: gitea
|
||||
description: "Interact with Gitea using the `tea` CLI. Use `tea issues`, `tea pulls`, `tea releases`, and other commands for issues, PRs, releases, and repository management."
|
||||
---
|
||||
|
||||
# Gitea Skill
|
||||
|
||||
Use the `tea` CLI to interact with Gitea servers. Use `--repo owner/repo` when not in a git directory, or `--login instance.com` to specify a Gitea instance.
|
||||
|
||||
## Setup
|
||||
|
||||
Add a login once to get started:
|
||||
```bash
|
||||
tea login add
|
||||
```
|
||||
|
||||
Check current logged in user:
|
||||
```bash
|
||||
tea whoami
|
||||
```
|
||||
|
||||
## Repositories
|
||||
|
||||
List repositories you have access to:
|
||||
```bash
|
||||
tea repos list
|
||||
```
|
||||
|
||||
Create a new repository:
|
||||
```bash
|
||||
tea repos create --name my-repo --description "My project" --init
|
||||
```
|
||||
|
||||
Create a private repository:
|
||||
```bash
|
||||
tea repos create --name my-repo --private --init
|
||||
```
|
||||
|
||||
Fork a repository:
|
||||
```bash
|
||||
tea repos fork owner/repo
|
||||
```
|
||||
|
||||
Delete a repository:
|
||||
```bash
|
||||
tea repos delete --name my-repo --owner myuser --force
|
||||
```
|
||||
|
||||
## Pull Requests
|
||||
|
||||
List open pull requests:
|
||||
```bash
|
||||
tea pulls --repo owner/repo
|
||||
```
|
||||
|
||||
View a specific PR:
|
||||
```bash
|
||||
tea pr 55 --repo owner/repo
|
||||
```
|
||||
|
||||
Checkout a PR locally:
|
||||
```bash
|
||||
tea pr checkout 55
|
||||
```
|
||||
|
||||
Create a new PR:
|
||||
```bash
|
||||
tea pr create --title "Feature title" --description "Description"
|
||||
```
|
||||
|
||||
## Issues
|
||||
|
||||
List open issues:
|
||||
```bash
|
||||
tea issues --repo owner/repo
|
||||
```
|
||||
|
||||
View a specific issue:
|
||||
```bash
|
||||
tea issue 189 --repo owner/repo
|
||||
```
|
||||
|
||||
Create a new issue:
|
||||
```bash
|
||||
tea issue create --title "Bug title" --body "Description"
|
||||
```
|
||||
|
||||
View issues for a milestone:
|
||||
```bash
|
||||
tea milestone issues 0.7.0
|
||||
```
|
||||
|
||||
## Comments
|
||||
|
||||
Add a comment to an issue or PR:
|
||||
```bash
|
||||
tea comment 189 --body "Your comment here"
|
||||
```
|
||||
|
||||
## Releases
|
||||
|
||||
List releases:
|
||||
```bash
|
||||
tea releases --repo owner/repo
|
||||
```
|
||||
|
||||
Create a new release:
|
||||
```bash
|
||||
tea release create --tag v1.0.0 --title "Release 1.0.0"
|
||||
```
|
||||
|
||||
## Actions (CI/CD)
|
||||
|
||||
List repository action secrets:
|
||||
```bash
|
||||
tea actions secrets list
|
||||
```
|
||||
|
||||
Create a new secret:
|
||||
```bash
|
||||
tea actions secrets create API_KEY
|
||||
```
|
||||
|
||||
List action variables:
|
||||
```bash
|
||||
tea actions variables list
|
||||
```
|
||||
|
||||
Set an action variable:
|
||||
```bash
|
||||
tea actions variables set API_URL https://api.example.com
|
||||
```
|
||||
|
||||
## Webhooks
|
||||
|
||||
List repository webhooks:
|
||||
```bash
|
||||
tea webhooks list
|
||||
```
|
||||
|
||||
List organization webhooks:
|
||||
```bash
|
||||
tea webhooks list --org myorg
|
||||
```
|
||||
|
||||
Create a webhook:
|
||||
```bash
|
||||
tea webhooks create https://example.com/hook --events push,pull_request
|
||||
```
|
||||
|
||||
## Other Entities
|
||||
|
||||
List branches:
|
||||
```bash
|
||||
tea branches --repo owner/repo
|
||||
```
|
||||
|
||||
List labels:
|
||||
```bash
|
||||
tea labels --repo owner/repo
|
||||
```
|
||||
|
||||
List milestones:
|
||||
```bash
|
||||
tea milestones --repo owner/repo
|
||||
```
|
||||
|
||||
List organizations:
|
||||
```bash
|
||||
tea organizations
|
||||
```
|
||||
|
||||
Show repository details:
|
||||
```bash
|
||||
tea repo --repo owner/repo
|
||||
```
|
||||
|
||||
## Helpers
|
||||
|
||||
Open something in browser:
|
||||
```bash
|
||||
tea open 189 # open issue/PR 189
|
||||
tea open milestones # open milestones page
|
||||
```
|
||||
|
||||
Clone a repository:
|
||||
```bash
|
||||
tea clone owner/repo
|
||||
```
|
||||
|
||||
Show notifications:
|
||||
```bash
|
||||
tea notifications --mine
|
||||
```
|
||||
|
||||
## Output Formats
|
||||
|
||||
Use `--output` or `-o` to control output format:
|
||||
```bash
|
||||
tea issues --output simple # simple text output
|
||||
tea issues --output csv # CSV format
|
||||
tea issues --output yaml # YAML format
|
||||
```
|
||||
6
skills/gitea/_meta.json
Normal file
6
skills/gitea/_meta.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"ownerId": "kn7dnbj0wvhgz2c6bg8cvbsmb9808s4w",
|
||||
"slug": "gitea",
|
||||
"version": "1.0.0",
|
||||
"publishedAt": 1769899848068
|
||||
}
|
||||
7
skills/himalaya/.clawhub/origin.json
Normal file
7
skills/himalaya/.clawhub/origin.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 1,
|
||||
"registry": "https://clawhub.ai",
|
||||
"slug": "himalaya",
|
||||
"installedVersion": "1.0.0",
|
||||
"installedAt": 1771188165799
|
||||
}
|
||||
217
skills/himalaya/SKILL.md
Normal file
217
skills/himalaya/SKILL.md
Normal file
@@ -0,0 +1,217 @@
|
||||
---
|
||||
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: {"clawdbot":{"emoji":"📧","requires":{"bins":["himalaya"]},"install":[{"id":"brew","kind":"brew","formula":"himalaya","bins":["himalaya"],"label":"Install Himalaya (brew)"}]}}
|
||||
---
|
||||
|
||||
# Himalaya Email CLI
|
||||
|
||||
Himalaya is a CLI email client that lets you manage emails from the terminal using IMAP, SMTP, Notmuch, or Sendmail backends.
|
||||
|
||||
## References
|
||||
|
||||
- `references/configuration.md` (config file setup + IMAP/SMTP authentication)
|
||||
- `references/message-composition.md` (MML syntax for composing emails)
|
||||
|
||||
## Prerequisites
|
||||
|
||||
1. Himalaya CLI installed (`himalaya --version` to verify)
|
||||
2. A configuration file at `~/.config/himalaya/config.toml`
|
||||
3. IMAP/SMTP credentials configured (password stored securely)
|
||||
|
||||
## 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"
|
||||
display-name = "Your Name"
|
||||
default = true
|
||||
|
||||
backend.type = "imap"
|
||||
backend.host = "imap.example.com"
|
||||
backend.port = 993
|
||||
backend.encryption.type = "tls"
|
||||
backend.login = "you@example.com"
|
||||
backend.auth.type = "password"
|
||||
backend.auth.cmd = "pass show email/imap" # or use keyring
|
||||
|
||||
message.send.backend.type = "smtp"
|
||||
message.send.backend.host = "smtp.example.com"
|
||||
message.send.backend.port = 587
|
||||
message.send.backend.encryption.type = "start-tls"
|
||||
message.send.backend.login = "you@example.com"
|
||||
message.send.backend.auth.type = "password"
|
||||
message.send.backend.auth.cmd = "pass show email/smtp"
|
||||
```
|
||||
|
||||
## Common Operations
|
||||
|
||||
### List Folders
|
||||
|
||||
```bash
|
||||
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
|
||||
```
|
||||
|
||||
### Search Emails
|
||||
|
||||
```bash
|
||||
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
|
||||
```
|
||||
|
||||
### Reply to an Email
|
||||
|
||||
Interactive reply (opens $EDITOR):
|
||||
```bash
|
||||
himalaya message reply 42
|
||||
```
|
||||
|
||||
Reply-all:
|
||||
```bash
|
||||
himalaya message reply 42 --all
|
||||
```
|
||||
|
||||
### Forward an Email
|
||||
|
||||
```bash
|
||||
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
|
||||
To: recipient@example.com
|
||||
Subject: Test Message
|
||||
|
||||
Hello from Himalaya!
|
||||
EOF
|
||||
```
|
||||
|
||||
Or with headers flag:
|
||||
```bash
|
||||
himalaya message write -H "To:recipient@example.com" -H "Subject:Test" "Message body here"
|
||||
```
|
||||
|
||||
### Move/Copy Emails
|
||||
|
||||
Move to folder:
|
||||
```bash
|
||||
himalaya message move 42 "Archive"
|
||||
```
|
||||
|
||||
Copy to folder:
|
||||
```bash
|
||||
himalaya message copy 42 "Important"
|
||||
```
|
||||
|
||||
### Delete an Email
|
||||
|
||||
```bash
|
||||
himalaya message delete 42
|
||||
```
|
||||
|
||||
### Manage Flags
|
||||
|
||||
Add flag:
|
||||
```bash
|
||||
himalaya flag add 42 --flag seen
|
||||
```
|
||||
|
||||
Remove flag:
|
||||
```bash
|
||||
himalaya flag remove 42 --flag seen
|
||||
```
|
||||
|
||||
## Multiple Accounts
|
||||
|
||||
List accounts:
|
||||
```bash
|
||||
himalaya account list
|
||||
```
|
||||
|
||||
Use a specific account:
|
||||
```bash
|
||||
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
|
||||
```
|
||||
|
||||
## Output Formats
|
||||
|
||||
Most commands support `--output` for structured output:
|
||||
```bash
|
||||
himalaya envelope list --output json
|
||||
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
|
||||
```
|
||||
|
||||
## Tips
|
||||
|
||||
- Use `himalaya --help` or `himalaya <command> --help` for detailed usage.
|
||||
- Message IDs are relative to the current folder; re-list after folder changes.
|
||||
- For composing rich emails with attachments, use MML syntax (see `references/message-composition.md`).
|
||||
- Store passwords securely using `pass`, system keyring, or a command that outputs the password.
|
||||
6
skills/himalaya/_meta.json
Normal file
6
skills/himalaya/_meta.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"ownerId": "kn71t8cr12n54xdhz51fncgg0h7yr8dt",
|
||||
"slug": "himalaya",
|
||||
"version": "1.0.0",
|
||||
"publishedAt": 1767954271328
|
||||
}
|
||||
174
skills/himalaya/references/configuration.md
Normal file
174
skills/himalaya/references/configuration.md
Normal file
@@ -0,0 +1,174 @@
|
||||
# Himalaya Configuration Reference
|
||||
|
||||
Configuration file location: `~/.config/himalaya/config.toml`
|
||||
|
||||
## Minimal IMAP + SMTP Setup
|
||||
|
||||
```toml
|
||||
[accounts.default]
|
||||
email = "user@example.com"
|
||||
display-name = "Your Name"
|
||||
default = true
|
||||
|
||||
# IMAP backend for reading emails
|
||||
backend.type = "imap"
|
||||
backend.host = "imap.example.com"
|
||||
backend.port = 993
|
||||
backend.encryption.type = "tls"
|
||||
backend.login = "user@example.com"
|
||||
backend.auth.type = "password"
|
||||
backend.auth.raw = "your-password"
|
||||
|
||||
# SMTP backend for sending emails
|
||||
message.send.backend.type = "smtp"
|
||||
message.send.backend.host = "smtp.example.com"
|
||||
message.send.backend.port = 587
|
||||
message.send.backend.encryption.type = "start-tls"
|
||||
message.send.backend.login = "user@example.com"
|
||||
message.send.backend.auth.type = "password"
|
||||
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
|
||||
|
||||
```toml
|
||||
[accounts.gmail]
|
||||
email = "you@gmail.com"
|
||||
display-name = "Your Name"
|
||||
default = true
|
||||
|
||||
backend.type = "imap"
|
||||
backend.host = "imap.gmail.com"
|
||||
backend.port = 993
|
||||
backend.encryption.type = "tls"
|
||||
backend.login = "you@gmail.com"
|
||||
backend.auth.type = "password"
|
||||
backend.auth.cmd = "pass show google/app-password"
|
||||
|
||||
message.send.backend.type = "smtp"
|
||||
message.send.backend.host = "smtp.gmail.com"
|
||||
message.send.backend.port = 587
|
||||
message.send.backend.encryption.type = "start-tls"
|
||||
message.send.backend.login = "you@gmail.com"
|
||||
message.send.backend.auth.type = "password"
|
||||
message.send.backend.auth.cmd = "pass show google/app-password"
|
||||
```
|
||||
|
||||
**Note:** Gmail requires an App Password if 2FA is enabled.
|
||||
|
||||
## iCloud Configuration
|
||||
|
||||
```toml
|
||||
[accounts.icloud]
|
||||
email = "you@icloud.com"
|
||||
display-name = "Your Name"
|
||||
|
||||
backend.type = "imap"
|
||||
backend.host = "imap.mail.me.com"
|
||||
backend.port = 993
|
||||
backend.encryption.type = "tls"
|
||||
backend.login = "you@icloud.com"
|
||||
backend.auth.type = "password"
|
||||
backend.auth.cmd = "pass show icloud/app-password"
|
||||
|
||||
message.send.backend.type = "smtp"
|
||||
message.send.backend.host = "smtp.mail.me.com"
|
||||
message.send.backend.port = 587
|
||||
message.send.backend.encryption.type = "start-tls"
|
||||
message.send.backend.login = "you@icloud.com"
|
||||
message.send.backend.auth.type = "password"
|
||||
message.send.backend.auth.cmd = "pass show icloud/app-password"
|
||||
```
|
||||
|
||||
**Note:** Generate an app-specific password at appleid.apple.com
|
||||
|
||||
## Folder Aliases
|
||||
|
||||
Map custom folder names:
|
||||
```toml
|
||||
[accounts.default.folder.alias]
|
||||
inbox = "INBOX"
|
||||
sent = "Sent"
|
||||
drafts = "Drafts"
|
||||
trash = "Trash"
|
||||
```
|
||||
|
||||
## Multiple Accounts
|
||||
|
||||
```toml
|
||||
[accounts.personal]
|
||||
email = "personal@example.com"
|
||||
default = true
|
||||
# ... backend config ...
|
||||
|
||||
[accounts.work]
|
||||
email = "work@company.com"
|
||||
# ... backend config ...
|
||||
```
|
||||
|
||||
Switch accounts with `--account`:
|
||||
```bash
|
||||
himalaya --account work envelope list
|
||||
```
|
||||
|
||||
## Notmuch Backend (local mail)
|
||||
|
||||
```toml
|
||||
[accounts.local]
|
||||
email = "user@example.com"
|
||||
|
||||
backend.type = "notmuch"
|
||||
backend.db-path = "~/.mail/.notmuch"
|
||||
```
|
||||
|
||||
## OAuth2 Authentication (for providers that support it)
|
||||
|
||||
```toml
|
||||
backend.auth.type = "oauth2"
|
||||
backend.auth.client-id = "your-client-id"
|
||||
backend.auth.client-secret.cmd = "pass show oauth/client-secret"
|
||||
backend.auth.access-token.cmd = "pass show oauth/access-token"
|
||||
backend.auth.refresh-token.cmd = "pass show oauth/refresh-token"
|
||||
backend.auth.auth-url = "https://provider.com/oauth/authorize"
|
||||
backend.auth.token-url = "https://provider.com/oauth/token"
|
||||
```
|
||||
|
||||
## Additional Options
|
||||
|
||||
### Signature
|
||||
```toml
|
||||
[accounts.default]
|
||||
signature = "Best regards,\nYour Name"
|
||||
signature-delim = "-- \n"
|
||||
```
|
||||
|
||||
### Downloads directory
|
||||
```toml
|
||||
[accounts.default]
|
||||
downloads-dir = "~/Downloads/himalaya"
|
||||
```
|
||||
|
||||
### Editor for composing
|
||||
Set via environment variable:
|
||||
```bash
|
||||
export EDITOR="vim"
|
||||
```
|
||||
182
skills/himalaya/references/message-composition.md
Normal file
182
skills/himalaya/references/message-composition.md
Normal file
@@ -0,0 +1,182 @@
|
||||
# Message Composition with MML (MIME Meta Language)
|
||||
|
||||
Himalaya uses MML for composing emails. MML is a simple XML-based syntax that compiles to MIME messages.
|
||||
|
||||
## Basic Message Structure
|
||||
|
||||
An email message is a list of **headers** followed by a **body**, separated by a blank line:
|
||||
|
||||
```
|
||||
From: sender@example.com
|
||||
To: recipient@example.com
|
||||
Subject: Hello World
|
||||
|
||||
This is the message body.
|
||||
```
|
||||
|
||||
## Headers
|
||||
|
||||
Common headers:
|
||||
- `From`: Sender address
|
||||
- `To`: Primary recipient(s)
|
||||
- `Cc`: Carbon copy recipients
|
||||
- `Bcc`: Blind carbon copy recipients
|
||||
- `Subject`: Message subject
|
||||
- `Reply-To`: Address for replies (if different from From)
|
||||
- `In-Reply-To`: Message ID being replied to
|
||||
|
||||
### Address Formats
|
||||
|
||||
```
|
||||
To: user@example.com
|
||||
To: John Doe <john@example.com>
|
||||
To: "John Doe" <john@example.com>
|
||||
To: user1@example.com, user2@example.com, "Jane" <jane@example.com>
|
||||
```
|
||||
|
||||
## Plain Text Body
|
||||
|
||||
Simple plain text email:
|
||||
```
|
||||
From: alice@localhost
|
||||
To: bob@localhost
|
||||
Subject: Plain Text Example
|
||||
|
||||
Hello, this is a plain text email.
|
||||
No special formatting needed.
|
||||
|
||||
Best,
|
||||
Alice
|
||||
```
|
||||
|
||||
## MML for Rich Emails
|
||||
|
||||
### Multipart Messages
|
||||
|
||||
Alternative text/html parts:
|
||||
```
|
||||
From: alice@localhost
|
||||
To: bob@localhost
|
||||
Subject: Multipart Example
|
||||
|
||||
<#multipart type=alternative>
|
||||
This is the plain text version.
|
||||
<#part type=text/html>
|
||||
<html><body><h1>This is the HTML version</h1></body></html>
|
||||
<#/multipart>
|
||||
```
|
||||
|
||||
### Attachments
|
||||
|
||||
Attach a file:
|
||||
```
|
||||
From: alice@localhost
|
||||
To: bob@localhost
|
||||
Subject: With Attachment
|
||||
|
||||
Here is the document you requested.
|
||||
|
||||
<#part filename=/path/to/document.pdf><#/part>
|
||||
```
|
||||
|
||||
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>
|
||||
```
|
||||
|
||||
### Inline Images
|
||||
|
||||
Embed an image inline:
|
||||
```
|
||||
From: alice@localhost
|
||||
To: bob@localhost
|
||||
Subject: Inline Image
|
||||
|
||||
<#multipart type=related>
|
||||
<#part type=text/html>
|
||||
<html><body>
|
||||
<p>Check out this image:</p>
|
||||
<img src="cid:image1">
|
||||
</body></html>
|
||||
<#part disposition=inline id=image1 filename=/path/to/image.png><#/part>
|
||||
<#/multipart>
|
||||
```
|
||||
|
||||
### Mixed Content (Text + Attachments)
|
||||
|
||||
```
|
||||
From: alice@localhost
|
||||
To: bob@localhost
|
||||
Subject: Mixed Content
|
||||
|
||||
<#multipart type=mixed>
|
||||
<#part type=text/plain>
|
||||
Please find the attached files.
|
||||
|
||||
Best,
|
||||
Alice
|
||||
<#part filename=/path/to/file1.pdf><#/part>
|
||||
<#part filename=/path/to/file2.zip><#/part>
|
||||
<#/multipart>
|
||||
```
|
||||
|
||||
## 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
|
||||
- `disposition=inline`: Display inline instead of as attachment
|
||||
- `id=<cid>`: Content ID for referencing in HTML
|
||||
|
||||
## 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" \
|
||||
-H "Subject:Quick Message" \
|
||||
"Message body here"
|
||||
```
|
||||
|
||||
## Tips
|
||||
|
||||
- The editor opens with a template; fill in headers and body.
|
||||
- Save and exit the editor to send; exit without saving to cancel.
|
||||
- MML parts are compiled to proper MIME when sending.
|
||||
- Use `himalaya message export --full` to inspect the raw MIME structure of received emails.
|
||||
Reference in New Issue
Block a user