{"id":37172326,"url":"https://github.com/vitwit/lens","last_synced_at":"2026-01-14T20:09:20.917Z","repository":{"id":98936006,"uuid":"501579219","full_name":"vitwit/lens","owner":"vitwit","description":"⚛️❤️👁 Brought to you by the LensCrafters","archived":false,"fork":true,"pushed_at":"2023-10-19T19:04:57.000Z","size":19054,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2024-04-01T16:10:11.229Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"strangelove-ventures/lens","license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vitwit.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2022-06-09T09:02:26.000Z","updated_at":"2023-10-19T10:46:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"1a43b4e0-dd0f-4337-bb3d-dbea4920cf1c","html_url":"https://github.com/vitwit/lens","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/vitwit/lens","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vitwit%2Flens","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vitwit%2Flens/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vitwit%2Flens/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vitwit%2Flens/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vitwit","download_url":"https://codeload.github.com/vitwit/lens/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vitwit%2Flens/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28434397,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T18:57:19.464Z","status":"ssl_error","status_checked_at":"2026-01-14T18:52:48.501Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-14T20:09:18.244Z","updated_at":"2026-01-14T20:09:20.909Z","avatar_url":"https://github.com/vitwit.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `lens`\n\n## Inactive :\n\nThis repository is now inactive. It will be kept open (non-archived) but will no longer be actively developed by Strangelove.\n\n\n**Lens provides a command line tool to  interact with any cosmos chain supporting the core [Cosmos-SDK modules](https://github.com/cosmos/cosmos-sdk/tree/master/x).**\n\n**Lens is meant to be imported as a library in other repos and projects to easily navigate and interact with the Cosmos Hub along with IBC chains.**\n\n---\n\n`lens` is your lens to view the Cosmos :atom:. `lens` packs all the best practices in golang cosmos client development into one place and provides a simple and easy to use APIs provided by standard Cosmos chains. The `cmd` package implements the `lens` command line tool while the `client` package contains all the building blocks to build your own, complex, feature rich, Cosmos client in go.\n\nIntended use cases:\n- Trading Bots\n- Server side query integrations for alerting or other automation\n- Indexers and search engines\n- Transaction automation (`x/authz` for security) for farming applications\n- ...:atom::rocket::moon:\n\nThis is the start of ideas around how to implement the cosmos client libraries in a seperate repo.\n\n## **--INSTALL--**\n---\n```bash\ngit clone https://github.com/strangelove-ventures/lens.git\n\ncd lens\n\nmake install\n```\nNow run:\n```bash\nlens\n```\nYou should see:\n\n```\n❯ lens            \nThis is my lens, there are many like it, but this one is mine.\n\nUsage:\n  lens [command]\n\nAvailable Commands:\n  chains      manage local chain configurations\n  keys        manage keys held by the relayer for each chain\n  query       query things about a chain\n  tendermint  all tendermint query commands\n  tx          query things about a chain\n  help        Help about any command\n\nFlags:\n      --chain string   override default chain\n  -d, --debug          debug output\n  -h, --help           help for lens\n      --home string    set home directory (default \"/Users/lenscrafters/.lens\")\n\nUse \"lens [command] --help\" for more information about a command.\n```\n\n## **--CONFIG--**\n---\nThe config file describes how lens will interact with blockchains. This is where information such as grpc addresses and chain-ids are held.\n\n**Config File Location:** `~/.lens/config.yaml` \n\n\u003e NOTE: The config file is not created at install, it is created the first time lens needs to query your config. Just to get it created, you can run something like:\n\u003e```\n\u003elens chains show-default\n\u003e```\n\n### **CHAINS**\nLens comes with two default chains. Cosmos Hub and Osmosis.\n\nTo interact with other chains, you need to add them to your config. To do this, run:\n\n```\nlens chains add \u003cchain_name\u003e\n#Example:\nlens chains add juno\n```\n\nTo view all possible chain names, run:\n```\nlens chains registry-list\n```\n\u003e NOTE: These two commands check the chain registry located [here](https://github.com/cosmos/chain-registry), for the requested chain.\n\nWhen running a command, it will run the command for the defaulted chain.\n\nTo view your default chain, run:\n\n```\n lens chains show-default\n```\n\nTo change your default, run: \n\n``` \nlens chains set-default \u003cchain_name\u003e\n```\n\n### **Keys**\nLens uses the keyring from the Cosmos-sdk. There is more information about it [here](https://github.com/cosmos/cosmos-sdk/blob/master/crypto/keyring/doc.go). \n\nTo add a key to lens you have two options:\n\n* `lens keys add` - This will add a key to you default chain and name it \"default\". You can optionally add a name as an argument. \n* `lens keys restore \u003cname\u003e` - This will restore a key to your default chain. Replace '\\\u003cname\\\u003e' with a key name. This command will THEN ask for your mnemonic which is needed to restore and use it to boradcast transactions. \n\n\u003e❗️ NOTE: IF you name your key anything other than \"default\", you will need to manually change the `key:` value in your config to link key with chain.  \n\u003e```bash\n\u003edefault_chain: cosmoshub\n\u003echains:\n\u003e  cosmoshub:\n\u003e    key: default #CHANGE THIS NAME\n\u003e    chain-id: cosmoshub-4\n\u003e    rpc-addr: https://cosmoshub-4.technofractal.com:443\n\u003e    ...\n\u003e```\n\nAfter generating or restoring a key, it should appear in your list by running: `lens keys list`, by default it will show the Cosmos Hub address. \n\nTo see the key encoded for use on other chains run `lens keys enumerate \u003ckey_name\u003e`. \n\n\n## --EXAMPLES--\nFind examples of using Lens as a Go module in our [Examples Repository](https://github.com/strangelove-ventures/lens-examples)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvitwit%2Flens","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvitwit%2Flens","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvitwit%2Flens/lists"}