<p>The only way is to edit the json code in the wallet file and add the gap limit into it. You can do that using the command line tool jq:</p>

<p><code>jq ". + {gap_limit:100}" wallet_file</code></p>

CC BY-SA 3.0
2018-04-17T13:31:08.157Z
Is necessary to run the daemon to refresh addresses?
MichalVales
CC BY-SA 3.0
2018-04-17T20:21:15.197Z
@MichalVales yes you'll likely have to restart electrum to get it to generate the new addresses and sync.
Abdussamad
CC BY-SA 3.0
2018-04-17T12:48:10.003Z
2018-04-17T12:48:10.003Z
Abdussamad
<p>Is there any way to change wallet gap limit in Electrum from command line? If yes, how? If not, could it be bypassed using some kind of external script? I really need to avoid GUI. Thank you in advance.</p>

CC BY-SA 3.0
2018-04-17T11:40:33.927Z
Does [this](https://bitcoin.stackexchange.com/questions/22606/more-receive-addresses-with-electrum) no longer work?
Raghav Sood
CC BY-SA 3.0
2018-04-17T12:51:11.613Z
@RaghavSood console there means the python console in the QT gui.
Abdussamad
<electrum><cli><gap-limit>
Electrum Gap Limit from CLI
MichalVales
# Electrum Gap Limit from CLI

(Asked by: username_0 on 2018-04-17)

Is there any way to change wallet gap limit in Electrum from command line? If yes, how? If not, could it be bypassed using some kind of external script? I really need to avoid GUI. Thank you in advance.

**Tags:** electrum, cli, gap-limit

> **Comments:**
> **username_1**: Does [this](https://bitcoin.stackexchange.com/questions/22606/more-receive-addresses-with-electrum) no longer work?  
> **username_2**: @username_1 console there means the python console in the QT gui.  

---

## 1 answers

### Answer by username_2 on 2018-04-17. Score: 0 | Accepted answer

The only way is to edit the json code in the wallet file and add the gap limit into it. You can do that using the command line tool jq:

`jq ". + {gap_limit:100}" wallet_file`

> **Comments:**
> **username_0**: Is necessary to run the daemon to refresh addresses?  
> **username_2**: @username_0 yes you'll likely have to restart electrum to get it to generate the new addresses and sync.  

---

