Second half of cross-cutting roadmap item B — the inbuxa-migrate side of the shared profile (inbuxa-cli #16 is the other half). Both now read the identical~/.config/inbuxa/config.toml, so the inbuxa server is named once.
import (into a JMAP server) and import-directory both write to an inbuxa server. They now take its url and API key from a [profile.<name>] section when --url or an INBUXA_MIGRATE_* variable doesn't give them:
Same format as inbuxa-cli: url + api-key or api-key-file (a path, ~/ expanded, one trailing newline dropped); --profile/$INBUXA_PROFILE select, default default.
Precedence: an explicit --url, or any INBUXA_MIGRATE_* variable, still wins.--url becomes optional on these two commands only when a profile supplies it; everything existing keeps working unchanged.
Scope is deliberate: only import and import-directory, whose target is unambiguously the inbuxa server. export/export-directory read from a server that may be Stalwart, and all the IMAP/DAV/ManageSieve commands talk to other servers — those are untouched and still require --url.
Implementation: new src/profile.rs (parsing split from file I/O for unit tests; load() also consults $INBUXA_PROFILE since migrate reads env itself rather than via clap), one parse-only toml dep, secret::resolve_any_or (env → profile → prompt), and resolve_auth gains an optional profile key and no longer insists on an auth flag. --url on the two commands became Option<String> and import jmap's auth group is no longer required. 6 unit tests (5 parsing + one auth-key-fallback); fmt/clippy/cargo test --locked (43 binaries) green; real-binary smoke confirms default/named/flag-override/no-profile for both commands, that export still requires --url, and --profile in both --help.
With this + cli #16, inbuxa-cli and inbuxa-migrate read the same server URL + token from one file.
Second half of cross-cutting roadmap item **B** — the inbuxa-migrate side of the shared profile (inbuxa-cli #16 is the other half). Both now read the **identical** `~/.config/inbuxa/config.toml`, so the inbuxa server is named once.
`import` (into a JMAP server) and `import-directory` both write to an inbuxa server. They now take its `url` and API key from a `[profile.<name>]` section when `--url` or an `INBUXA_MIGRATE_*` variable doesn't give them:
```toml
[profile.default]
url = "https://mail.example.org"
api-key = "inbuxa_pat_…"
```
- Same format as inbuxa-cli: `url` + `api-key` or `api-key-file` (a path, `~/` expanded, one trailing newline dropped); `--profile`/`$INBUXA_PROFILE` select, default `default`.
- **Precedence: an explicit `--url`, or any `INBUXA_MIGRATE_*` variable, still wins.** `--url` becomes *optional* on these two commands only when a profile supplies it; everything existing keeps working unchanged.
- **Scope is deliberate:** only `import` and `import-directory`, whose target is unambiguously the inbuxa server. `export`/`export-directory` read *from* a server that may be Stalwart, and all the IMAP/DAV/ManageSieve commands talk to other servers — those are untouched and still require `--url`.
Implementation: new `src/profile.rs` (parsing split from file I/O for unit tests; `load()` also consults `$INBUXA_PROFILE` since migrate reads env itself rather than via clap), one parse-only `toml` dep, `secret::resolve_any_or` (env → profile → prompt), and `resolve_auth` gains an optional profile key and no longer insists on an auth flag. `--url` on the two commands became `Option<String>` and `import jmap`'s auth group is no longer `required`. 6 unit tests (5 parsing + one auth-key-fallback); fmt/clippy/`cargo test --locked` (43 binaries) green; real-binary smoke confirms default/named/flag-override/no-profile for both commands, that `export` still requires `--url`, and `--profile` in both `--help`.
With this + cli #16, `inbuxa-cli` and `inbuxa-migrate` read the same server URL + token from one file.
inbuxa-cli gained the shared profile; this is the inbuxa-migrate side, the
same config.toml format. import (into a JMAP server) and import-directory
both write to an inbuxa server, so they now take its url and API key from a
[profile.<name>] section when --url or an INBUXA_MIGRATE_* variable doesn't
give them. --url is optional on these two when a profile supplies it; a flag
or variable still wins, so nothing changes for anyone passing them. The
other commands connect to IMAP, DAV and the like, not the inbuxa server, so
they are untouched and still require --url.
resolve_auth takes an optional profile key and no longer insists on an auth
flag (the key can come from the profile or the environment); a new
secret::resolve_any_or threads the profile key in after the environment and
before the prompt.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Second half of cross-cutting roadmap item B — the inbuxa-migrate side of the shared profile (inbuxa-cli #16 is the other half). Both now read the identical
~/.config/inbuxa/config.toml, so the inbuxa server is named once.import(into a JMAP server) andimport-directoryboth write to an inbuxa server. They now take itsurland API key from a[profile.<name>]section when--urlor anINBUXA_MIGRATE_*variable doesn't give them:url+api-keyorapi-key-file(a path,~/expanded, one trailing newline dropped);--profile/$INBUXA_PROFILEselect, defaultdefault.--url, or anyINBUXA_MIGRATE_*variable, still wins.--urlbecomes optional on these two commands only when a profile supplies it; everything existing keeps working unchanged.importandimport-directory, whose target is unambiguously the inbuxa server.export/export-directoryread from a server that may be Stalwart, and all the IMAP/DAV/ManageSieve commands talk to other servers — those are untouched and still require--url.Implementation: new
src/profile.rs(parsing split from file I/O for unit tests;load()also consults$INBUXA_PROFILEsince migrate reads env itself rather than via clap), one parse-onlytomldep,secret::resolve_any_or(env → profile → prompt), andresolve_authgains an optional profile key and no longer insists on an auth flag.--urlon the two commands becameOption<String>andimport jmap's auth group is no longerrequired. 6 unit tests (5 parsing + one auth-key-fallback); fmt/clippy/cargo test --locked(43 binaries) green; real-binary smoke confirms default/named/flag-override/no-profile for both commands, thatexportstill requires--url, and--profilein both--help.With this + cli #16,
inbuxa-cliandinbuxa-migrateread the same server URL + token from one file.