Something went wrong. Try again.
CLI for FastMail via JMAP
Something went wrong. Try again.
fastmail-cli AGENTS.md
1.2 kB
Markdown
at main
AGENTS.md #
Commands #
All commands require nix: nix develop --command bash -c "<cmd>"
- Run:
bun run startorbun run src/index.ts - Test all:
bun test - Test single:
bun test src/path/to/file.test.ts - Lint:
bun run lint - Format:
bun run format - Typecheck:
bun run typecheck - Build binaries:
bun run build
Architecture #
src/index.ts- CLI entrypoint, routes commands to handlerssrc/commands/- Command implementations (email, mailbox, masked, batch, thread, draft, attachment, url, unsubscribe)src/jmap/- JMAP protocol client and API methods (client.ts, email.ts, mailbox.ts, etc.)src/auth.ts/src/config.ts- Authentication and config file handling- Tests colocated as
*.test.tsusing bun:test with mocks viabun-bagel
Code Style #
- Formatting: Biome, 2-space indent, double quotes
- Imports: Use
.tsextensions,node:prefix for Node builtins - Types: Strict TS, define interfaces in
types.tsor colocate, prefer explicit return types - Errors: Custom error classes (JmapError, JmapMethodError), exit with
process.exit(1)on CLI errors - Naming: camelCase functions/vars, PascalCase classes/types, kebab-case files