8000 Set up Cursor Cloud dev environment by dominicletz · Pull Request #7 · dominicletz/certmagex · GitHub
[go: up one dir, main page]

Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# AGENTS.md

## Cursor Cloud specific instructions

CertMagex is a single **Elixir/Mix library** (Hex package `:certmagex`), not a runnable
service or web app. It provides automatic Let's Encrypt/ZeroSSL TLS certificates via the
`sni_fun` callback. There is no dev server to start; you build, lint, test, and exercise it
from `iex`/`mix run`.

- Toolchain: Elixir + Erlang/OTP are preinstalled from apt (Elixir 1.14, OTP 25.3, matching
the CI target in `.github/workflows/test.yml`). Hex/rebar are installed for the user.
- Standard commands (see `mix.exs`):
- Deps: `mix deps.get`
- Compile: `mix compile`
- Test: `mix test` (ExUnit; self-contained and offline — no network/ACME server needed)
- Lint: `mix lint` (alias = `compile` + `format --check-formatted` + `credo` + `dialyzer`)
- `mix lint` runs Dialyzer, which builds PLT files on the first run (roughly a minute or two).
The PLTs are cached under `_build/`, so subsequent runs are fast. Don't assume `mix lint`
is hung during that first PLT build.
- No `mix.lock` is committed (this is a library), so `mix deps.get` resolves the latest
matching dependency versions each time.
- Certificates/state are stored on local disk under `$HOME/.local/share/certmagex` (DETS via
`dets_plus`), honoring `XDG_DATA_HOME`. No external database.
Comment on lines +22 to +23
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

To be more precise regarding the storage path resolution, it would be clearer to state that the certificates are stored under $XDG_DATA_HOME/certmagex and default to $HOME/.local/share/certmagex if the environment variable is unset.

Suggested change
- Certificates/state are stored on local disk under `$HOME/.local/share/certmagex` (DETS via
`dets_plus`), honoring `XDG_DATA_HOME`. No external database.
- Certificates/state are stored on local disk under `$XDG_DATA_HOME/certmagex` (defaulting to
`$HOME/.local/share/certmagex` if unset) via `dets_plus`. No external database.

- End-to-end certificate issuance (real ACME) requires a consuming Phoenix/Cowboy/Bandit app
with ports 80/443 free and internet access; that is out of scope for this repo. The core
SNI/storage flow can be exercised offline by inserting a self-signed cert via
`CertMagex.insert/3` and resolving it with `CertMagex.sni_fun/1`.
0