config init
Interactive wizard. Five prompts, one written file: ./apyx.config.json.
apyx config init
Synopsis
apyx config init
No flags. The wizard runs in the current directory and writes
./apyx.config.json (the project config). Pre-existing files are
detected and the wizard asks before overwriting.
What it asks
$ apyx config init
chain (ethereum | base) [ethereum]:
rpcUrl [https://eth.llamarpc.com]:
signer type (key | ledger | none) [key]:
keyPath [~/.apyx/keys/default]:
wrote /path/to/cwd/apyx.config.json
next: put your hex private key at ~/.apyx/keys/default
(one line, 32 bytes; `chmod 600` the file).
| Prompt | Default | Effect |
|---|---|---|
chain | ethereum | Sets profiles.default.chain. |
rpcUrl | https://eth.llamarpc.com (or Base default for Base) | Sets profiles.default.rpcUrl. Use a paid RPC for any real workload — see Custom RPC recipe. |
signer type | key | Picks the signer shape. none writes a profile without a signer (read-only). |
keyPath | ~/.apyx/keys/default | Only asked when signer type = key. Path is stored verbatim — the wizard does not create the file. |
derivationPath | m/44'/60'/0'/0/0 | Only asked when signer type = ledger. |
After writing the file the wizard prints a “next:” reminder pointing at whichever path you chose for the key.
What gets written
{
"defaultProfile": "default",
"profiles": {
"default": {
"chain": "ethereum",
"rpcUrl": "https://eth.llamarpc.com",
"signer": { "type": "key", "keyPath": "~/.apyx/keys/default" }
}
}
}
Only one profile (default). To add more, edit the file by hand or
add another profile block — the schema is in Configuration.
Overwrite handling
If ./apyx.config.json already exists:
$ apyx config init
./apyx.config.json already exists. Overwrite? (y/N): n
aborted
Decline and the file is untouched, exit code 1. The decline path is
covered by an e2e spec — see
test/e2e/cli/config.e2e.spec.ts.
Exit codes
| Code | Meaning |
|---|---|
| 0 | Wrote a new config file |
| 1 | User declined to overwrite an existing file, or wizard aborted via ^C |
Common follow-ups
After config init:
- Drop your hex private key into the
keyPathyou chose:echo '0xYOUR_KEY' > ~/.apyx/keys/default chmod 600 ~/.apyx/keys/default - Verify the resolved config:
apyx config show. - Open the REPL:
apyx repl.
Related
- Configuration — the full config schema.
- config show — inspect what
initwrote. - config path — print the resolved config file path.