{"id":19484486,"url":"https://github.com/flowerinthenight/lsdy","last_synced_at":"2025-04-25T16:33:40.226Z","repository":{"id":73334401,"uuid":"262593377","full_name":"flowerinthenight/lsdy","owner":"flowerinthenight","description":"Tool to query/inspect DynamoDB tables.","archived":false,"fork":false,"pushed_at":"2023-10-11T23:40:33.000Z","size":237,"stargazers_count":8,"open_issues_count":1,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-06-20T00:36:25.144Z","etag":null,"topics":["aws","dynamodb","golang","inspect","query"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/flowerinthenight.png","metadata":{"files":{"readme":"README.md","changelog":null,"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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-05-09T14:51:56.000Z","updated_at":"2021-12-10T04:54:00.000Z","dependencies_parsed_at":"2024-05-05T18:02:09.531Z","dependency_job_id":null,"html_url":"https://github.com/flowerinthenight/lsdy","commit_stats":null,"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flowerinthenight%2Flsdy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flowerinthenight%2Flsdy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flowerinthenight%2Flsdy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flowerinthenight%2Flsdy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flowerinthenight","download_url":"https://codeload.github.com/flowerinthenight/lsdy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224009488,"owners_count":17240569,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["aws","dynamodb","golang","inspect","query"],"created_at":"2024-11-10T20:22:12.831Z","updated_at":"2024-11-10T20:22:14.221Z","avatar_url":"https://github.com/flowerinthenight.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![main](https://github.com/flowerinthenight/lsdy/actions/workflows/main.yml/badge.svg)](https://github.com/flowerinthenight/lsdy/actions/workflows/main.yml)\n\n**Active development for this tool will probably not continue since AWS just released PartiQL support for DynamoDB.**\n\n## Overview\n\n`lsdy` is a tool for querying [DynamoDB](https://aws.amazon.com/dynamodb/) tables. It will attempt to display the values in a tabular form using all available attributes (by default, alphabetical order, left to right), unless specified. If `--pk` is specified, it will query the table with that specific primary key. For tables with sort keys, only string-based sort keys are supported at the moment. When the `--sk` flag is supplied, it will query all sort keys that begins with the flag value. An empty primary key implies a table scan.\n\n## Installation\n\nUsing [Homebrew](https://brew.sh/) (applies to Linux, OSX, and [WSL](https://en.wikipedia.org/wiki/Windows_Subsystem_for_Linux)):\n```bash\n$ brew tap flowerinthenight/tap\n$ brew install lsdy\n```\n\nIf you have a Go environment:\n```bash\n$ go get -u -v github.com/flowerinthenight/lsdy\n```\n\n## Usage\n```bash\n# Minimal usage:\n$ lsdy TABLE_NAME\n\n# For a more updated help information:\n$ lsdy -h\n```\n\nTo authenticate to AWS, this tool looks for the following environment variables (can be set by cmdline args as well):\n```bash\n# If --region, --key, --secret, and optionally, --rolearn are not provided, the tool\n# will look for these environment variables:\nAWS_REGION\nAWS_ACCESS_KEY_ID\nAWS_SECRET_ACCESS_KEY\n\n# Optional:\nROLE_ARN\n\n# Authenticate using id/secret flags:\n$ lsdy --region=xxx --key=xxx --secret=xxx\n\n# Authenticate by assuming a role ARN, in which case, id/secret should have the\n# AssumeRole permissions. Using flags:\n$ lsdy --region=xxx --key=xxx --secret=xxx --rolearn=xxx\n```\n\nTo query a table using a primary key:\n```bash\n# Query table with primary key 'id' value of 'ID0001':\n$ lsdy TABLE_NAME --pk \"id:ID0001\"\n```\n\nTo query a table using both a primary key and a sort key:\n```bash\n# Query table with primary key 'id' value of 'ID0001' and sort key 'sortkey' of SK002:\n$ lsdy TABLE_NAME --pk \"id:ID0001\" --sk \"sortkey:SK002\"\n```\n\nTo query a table using multiple primary keys and optional sort key pair(s):\n```bash\n# Multiple primary keys only:\n$ lsdy TABLE_NAME --pk \"id:ID0001\" --pk \"id:ID0002\" --pk \"id:ID9999\"\n\n# Multiple primary keys with corresponding sort keys:\n$ lsdy TABLE_NAME --pk \"id:ID0001,id:ID0002\" --sk \"sortkey:AAA,sortkey:BBB\"\n\n# Multiple primary keys with only the first pk having a sortkey pair:\n$ lsdy TABLE_NAME --pk \"id:ID0001,id:ID0002,id:ID9999\" --sk \"sortkey:AAA\"\n```\n\nTo scan a table:\n```bash\n# All attributes (columns) will be queried:\n$ lsdy TABLE_NAME\n\n# If you want specific attributes (unsorted columns):\n$ lsdy TABLE_NAME --attr \"col1,col2,col3\" --nosort\n\n# or you can write it this way (sorted columns):\n$ lsdy TABLE_NAME --attr col1 --attr col2 --attr col3\n```\n\nIf you want to describe a table:\n```bash\n# Will output the table details and all its attributes/columns:\n$ lsdy TABLE_NAME --describe\n```\n_Warning!_ At the moment, `--describe` will cause a table scan if the `--pk` flag is not set. For massive tables, it's probably a good idea to supply the `--pk` flag, in which case, it will only query the attributes from that key.\n\nBy default, the maximum length of all cell items in the output table is set by the `--maxlen` flag.\n\n## Need help\nPR's are welcome!\n\n- [x] Handling data tabulation for fullwidth characters (i.e. Japanese, Chinese, etc.) - use [tablewriter](https://github.com/olekukonko/tablewriter)\n- [x] Filtering/exclusion support - added with the `--contains` flag\n- [ ] Better handling of JSON, map values in cells\n- [x] Better handling of base64-encoded values in cells - added with the `--decb64` flag\n- [ ] Query secondary indeces\n- [ ] Support for other sort key types\n- [ ] Config file support\n- [x] ~~Package for Windows~~ - can use WSL for now\n- [x] Output to CSV - added with the `--csv` flag\n- [x] Add `--delete` option to delete the queried data\n- [x] Add `--limit` option in query (Scan and Query)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflowerinthenight%2Flsdy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflowerinthenight%2Flsdy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflowerinthenight%2Flsdy/lists"}