# Open candid frontend by clicking canister id in iTerm2

**URL:** <https://forum.dfinity.org/t/open-candid-frontend-by-clicking-canister-id-in-iterm2/1677>\
**Category:** Programs & Applications\
**Created:** [December 21, 2020, 1:55pm UTC](https://forum.dfinity.org/t/open-candid-frontend-by-clicking-canister-id-in-iterm2/1677 "2020-12-21T13:55:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cryptoschindler](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/cryptoschindler/32/26_2.png) [@cryptoschindler](https://forum.dfinity.org/u/cryptoschindler)\
**Post date:** [December 21, 2020, 1:55pm UTC](https://forum.dfinity.org/t/open-candid-frontend-by-clicking-canister-id-in-iterm2/1677/1 "2020-12-21T13:55:33Z")

</div>

Thanks to a hint from @alexa.smith & @chenyan I no longer have to copy paste canister IDs 🙂

If you are using iTerm2, follow these steps:

1. In your iTerm2 Preferences, go to `Profiles -> Advanced -> Smart Selection -> Edit`
2. Click the `+` button to add a new rule and set the `Regular Expression` to `[a-z]{5}-[a-z]{5}-[a-z]{5}-[a-z]{5}-[a-z]{3}`  
 ![Bildschirmfoto 2020-12-21 um 14.52.13](https://us1.discourse-cdn.com/flex023/uploads/dfn/original/1X/b2766c68eac018f54d50366c53f9d09dd661a110.png)
3. Click on `Edit Actions...` and add a new action
4. Set the `Action` to `Open URL...`
5. Set the `Parameter` to `http://127.0.0.1:8000/candid?canisterId=\0` and name it `open candid`
6. Add another action with `Action` set to `Open URL...` and the `Parameter` set to `http://127.0.0.1:8000/?canisterId=\0` and name it `open frontend`  
 ![Bildschirmfoto 2020-12-21 um 14.52.28](https://us1.discourse-cdn.com/flex023/uploads/dfn/original/1X/4bcf272c12c4b629b50337df5380c47a8e7a2677.png)

You can now `CMD+left_click` canister IDs to directly open their candid frontend, you can also `CMD+right_click` to choose the `open frontend` action instead.

 ![Bildschirmfoto 2020-12-21 um 14.54.16](https://us1.discourse-cdn.com/flex023/uploads/dfn/original/1X/b28f3a7d6fc57f504ecf9f34137c9f6618e60456.png)

---

<div class="post-metadata">

**Author:** ![chenyan](https://avatars.discourse-cdn.com/v4/letter/c/35a633/32.png) [@chenyan](https://forum.dfinity.org/u/chenyan)\
**Post date:** [December 21, 2020, 6:37pm UTC](https://forum.dfinity.org/t/open-candid-frontend-by-clicking-canister-id-in-iterm2/1677/2 "2020-12-21T18:37:18Z")

</div>

Thanks for putting this up! A minor correction to the regex: `[a-z0-9]{5}(-[a-z0-9]{5})*-[a-z0-9]{1,5}`
