{"id":20521545,"url":"https://github.com/tedivm/jsonsmash","last_synced_at":"2025-04-14T02:35:45.801Z","repository":{"id":57286047,"uuid":"92576666","full_name":"tedivm/jsonsmash","owner":"tedivm","description":"a shell for browsing json files","archived":false,"fork":false,"pushed_at":"2017-05-28T23:39:42.000Z","size":12,"stargazers_count":26,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-14T02:35:41.061Z","etag":null,"topics":["hacktoberfest","json","shell"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/jsonsmash","language":"JavaScript","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/tedivm.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}},"created_at":"2017-05-27T06:31:05.000Z","updated_at":"2023-10-23T22:42:19.000Z","dependencies_parsed_at":"2022-09-09T23:12:48.399Z","dependency_job_id":null,"html_url":"https://github.com/tedivm/jsonsmash","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tedivm%2Fjsonsmash","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tedivm%2Fjsonsmash/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tedivm%2Fjsonsmash/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tedivm%2Fjsonsmash/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tedivm","download_url":"https://codeload.github.com/tedivm/jsonsmash/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248811952,"owners_count":21165349,"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":["hacktoberfest","json","shell"],"created_at":"2024-11-15T22:29:43.988Z","updated_at":"2025-04-14T02:35:45.780Z","avatar_url":"https://github.com/tedivm.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# jsonsmash - a shell for browsing json files\n\n[![npm package](https://nodei.co/npm/jsonsmash.png?stars=true)](https://www.npmjs.com/package/jsonsmash)\n\nThis projects solves the problem of browsing large json files by providing an\nemulated shell environment that treats the json file as if it were a filesystem.\nThis allows the file to be browsed using commands such as `ls` and `cd` or\nviewed (in human readable yaml) using `cat`.\n\n\n## Install\n\nThis project is build with `node` and is installable using `npm`. It should be\ninstalled globally.\n\n```\n$ npm install jsonsmash -g\n```\n\n\n## Usage\n\nAny valid json file can be opened by calling `jsonsmash path`.\n\n```\n$ jsonsmash /path/to/jsonfile.js\n```\n\nData can also be loaded from a url by calling `jsonsmash url`.\n\n```\n$ jsonsmash http://example.come/somejson.json\n```\n\nAfter opening jsonsmash a prompt will appear to accept commands.\n\n## Paths\n\nThe jsonsmash shell treats the json data structure as a file system, with the\nroot of the data structure represented as `/` and the keys as either directories\n(for objects and arrays) or files.\n\nPaths can be either absolute or relative. Absolute paths must begin with `/`.\n\nCommands that require a path will default to using the current working\ndirectory.\n\n## Commands\n\n### cat\n\n`cat [--json] [path]`\n\nPrint the data structure, defaulting to yaml for human readablility.\n\nIf the `--json` flag is passed the output will be in unformatted json.\n\n\n### cd\n\n`cat [path]`\n\nChange to the specified path.\n\n\n### echo\n\n`echo [string ...]`\n\nPrint the argument passed to it.\n\n\n### exit\n\n`exit`\n\nClose the jsonsmash shell.\n\n\n### ls\n\n`ls [-lhSr] [path]`\n\nDisplay the children of the specified paths.\n\n* `-l` list in long format.\n* `-h` use unit suffixes (K,M,G,T) to reduce number of digits to three or less.\n* `-S` sort by size instead of alphabetically.\n* `-r` reverse sort order.\n\n\n### pwd\n\n`pwd`\n\nPrint the current working directory.\n\n\n## Examples\n\n```\n$ jsonsmash http://headers.jsontest.com/\n\u003e cat\nX-Cloud-Trace-Context: dbaae9ed37134e4c86d1e02147fe2676/1875084932880129464\nHost: headers.jsontest.com\n\n\u003e ls -lh\n  29 string Host\n  78 string X-Cloud-Trace-Context\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftedivm%2Fjsonsmash","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftedivm%2Fjsonsmash","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftedivm%2Fjsonsmash/lists"}