{"id":19398061,"url":"https://github.com/arthurweinmann/treesitter-simple-cli","last_synced_at":"2025-10-28T17:38:17.789Z","repository":{"id":183754377,"uuid":"670697854","full_name":"arthurweinmann/treesitter-simple-cli","owner":"arthurweinmann","description":"Just a very simple way of parsing and printing the code CST with tree-sitter. ","archived":false,"fork":false,"pushed_at":"2023-07-25T18:26:13.000Z","size":187,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-07T11:12:08.360Z","etag":null,"topics":["json","normal","tree-sitter","xml"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/arthurweinmann.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-07-25T16:17:10.000Z","updated_at":"2023-07-25T17:39:32.000Z","dependencies_parsed_at":"2023-07-25T17:51:43.503Z","dependency_job_id":null,"html_url":"https://github.com/arthurweinmann/treesitter-simple-cli","commit_stats":null,"previous_names":["arthurweinmann/treesitter-simple-cli"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arthurweinmann%2Ftreesitter-simple-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arthurweinmann%2Ftreesitter-simple-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arthurweinmann%2Ftreesitter-simple-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arthurweinmann%2Ftreesitter-simple-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arthurweinmann","download_url":"https://codeload.github.com/arthurweinmann/treesitter-simple-cli/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240571029,"owners_count":19822412,"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":["json","normal","tree-sitter","xml"],"created_at":"2024-11-10T11:04:47.226Z","updated_at":"2025-10-28T17:38:17.049Z","avatar_url":"https://github.com/arthurweinmann.png","language":"Rust","readme":"# Simpler Tree-Sitter CLI to just print the CST\n\nJust a very simple way of parsing and printing the code CST with tree-sitter. \n\nYou may use the compiled binary from the releases section of this repository or compile it yourself.\n\n# Build from source\n\nClone this repository and run `make`. The cli binary is then located in the generated `build` repository.\n\n# Example\n\nFor example, in this repository after running `make`:\n\nFor help, run:\n\n```bash\narthur@pop-os:$ ./build/treesittercli help\n\nUsage: \u003cprogram\u003e \u003clanguage: string\u003e \u003csource code filepath: string\u003e \u003coptional format: normal, xml, json\u003e\n```\n\nFor a full example of a normal output, see [./example_output/example.txt](./example_output/example.txt)\n```bash\narthur@pop-os:$ ./build/treesittercli rust ./src/main.rs\n\n(source_file [0, 0] - [209, 0]\n  (inner_attribute_item [0, 0] - [0, 64]\n    (attribute [0, 3] - [0, 63]\n      (identifier [0, 3] - [0, 11])\n      arguments: (token_tree [0, 11] - [0, 63]\n        (identifier [0, 12] - [0, 28])\n        (identifier [0, 30] - [0, 35])\n        (token_tree [0, 35] - [0, 62]\n          (identifier [0, 36] - [0, 45])\n          (identifier [0, 47] - [0, 61])))))\n\n          [...]\n```\n\nFor a full example of an xml output, see [./example_output/example.xml](./example_output/example.xml)\n```bash\narthur@pop-os:$ ./build/treesittercli rust ./src/main.rs xml\n\n\u003csource_file\u003e\n  \u003cinner_attribute_item\u003e#![\n    \u003cattribute\u003e\n      \u003cidentifier\u003ecfg_attr\u003c/identifier\u003e\n\n      \u003ctoken_tree type=\"arguments\"\u003e(\n        \u003cidentifier\u003edebug_assertions\u003c/identifier\u003e\n\n        \u003cidentifier\u003eallow\u003c/identifier\u003e\n\n        \u003ctoken_tree\u003e(\n          \u003cidentifier\u003edead_code\u003c/identifier\u003e\n\n          [...]\n```\n\nFor a full example of an xml output, see [./example_output/example.json](./example_output/example.json)\n```bash\narthur@pop-os:$ ./build/treesittercli rust ./src/main.rs json\n\n{\n  \"children\": [\n    {\n      \"children\": [\n        {\n          \"children\": [],\n          \"end\": {\n            \"column\": 1,\n            \"row\": 0\n          },\n          \"kind\": \"#\",\n          \"start\": {\n            \"column\": 0,\n            \"row\": 0\n          },\n          \"value\": \"#\"\n        },\n        {\n          \"children\": [],\n          \"end\": {\n            \"column\": 2,\n            \"row\": 0\n          },\n          \"kind\": \"!\",\n          \"start\": {\n            \"column\": 1,\n            \"row\": 0\n          },\n          \"value\": \"!\"\n\n          [...]\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farthurweinmann%2Ftreesitter-simple-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farthurweinmann%2Ftreesitter-simple-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farthurweinmann%2Ftreesitter-simple-cli/lists"}