{"id":18003815,"url":"https://github.com/evian-zhang/wispha","last_synced_at":"2025-07-09T07:39:11.336Z","repository":{"id":57634860,"uuid":"232358922","full_name":"Evian-Zhang/Wispha","owner":"Evian-Zhang","description":"A commandline tool for easily displaying project layout","archived":false,"fork":false,"pushed_at":"2020-03-18T01:35:48.000Z","size":158,"stargazers_count":6,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-24T19:09:47.194Z","etag":null,"topics":["cli","project-layout"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Evian-Zhang.png","metadata":{"files":{"readme":"README-zh-CN.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-01-07T15:48:27.000Z","updated_at":"2022-12-17T11:30:53.000Z","dependencies_parsed_at":"2022-09-26T20:20:46.953Z","dependency_job_id":null,"html_url":"https://github.com/Evian-Zhang/Wispha","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/Evian-Zhang/Wispha","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Evian-Zhang%2FWispha","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Evian-Zhang%2FWispha/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Evian-Zhang%2FWispha/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Evian-Zhang%2FWispha/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Evian-Zhang","download_url":"https://codeload.github.com/Evian-Zhang/Wispha/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Evian-Zhang%2FWispha/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264414983,"owners_count":23604527,"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":["cli","project-layout"],"created_at":"2024-10-30T00:12:14.022Z","updated_at":"2025-07-09T07:39:11.283Z","avatar_url":"https://github.com/Evian-Zhang.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Wispha\n\n![wispha](Wispha-supported.svg)![Build Status](https://travis-ci.org/Evian-Zhang/Wispha.svg?branch=master)![language](https://img.shields.io/badge/language-rust-orange.svg)\n\nWispha是一个可以轻松展示项目结构布局的命令行工具。\n\n## 为什么使用Wispha\n\n随着越来越多的项目开源，我们可以接触到许多大型的、复杂的项目。这些项目可能会有成百上千个文件、目录。但是，许多项目对于这些文件和目录并没有详细的说明，让我们阅读源码很困难。而那些有详细说明的项目，其展示这些说明的方法也并不统一。因此，我希望用这个工具来改善这一现状。\n\n## 安装\n\n### Windows\n\n您可以直接下载[最新的release](https://github.com/Evian-Zhang/Wispha/releases/latest/download/wispha-installer.msi).\n\n### macOS\n\n您可以使用homebrew进行下载：\n\n```shell script\nbrew tap Evian-Zhang/Wispha\nbrew install wispha\n```\n\n### Debian/Ubuntu\n\n您可以直接下载[最新的release](https://github.com/Evian-Zhang/Wispha/releases/latest/download/wispha.deb).\n\n### 从源码编译\n\n请确保您电脑中的Rust是最新的stable版本。将本仓库克隆至本地，然后在其目录下使用\n\n```shell script\ncargo build --release\n```\n\n## 用法\n\n如果wispha在你的路径中，那么请将本项目克隆至自己的电脑中，然后在该目录下输入命令\n\n```shell script\nwispha layout --project-name Wispha --keys description --hide-key\n```\n\n然后就可以看到本项目的结构布局：\n\n```\nWispha                        Wispha project main folder\n├── libwispha                 Wispha library used by binary wispha\n│   ├── src                   Source code of library wispha.\n│   │   ├── lib.rs            Entry point for the library\n│   │   ├── core.rs           Define core structs\n│   │   ├── strings.rs        Consists of static str used by library\n│   │   ├── manipulator.rs    APIs for node manipulation\n│   │   └── serde             APIs for serialization and deserialization\n│   ├── tests                 integration tests\n│   │   ├── ser_test          tests for serialization\n│   │   └── de_test           tests for deserialization\n│   ├── Cargo.toml            Manifest file for cargo to run\n│   ├── LICENSE-MIT           MIT license\n│   └── LICENSE-APACHE        Apache license version 2.0\n├── src                       Source code of binary executable wispha.\n│   ├── main.rs               Entry point of binary\n│   ├── layouter.rs           Define the `Layout` trait for templates\n│   ├── layout_templates      Templates that implements `Layout` trait\n│   │   ├── mod.rs            \n│   │   ├── plain.rs          Define the plain layout.\n│   │   ├── line.rs           Define the line layout.\n│   │   └── triangle.rs       Define the triangle layout.\n│   └── commandline           Commandline interface\n│       ├── mod.rs            \n│       ├── layout.rs         Layout subcommand\n│       └── interact          Interact subcommand\n├── Cargo.toml                Manifest file for cargo to run\n├── README.md                 \n├── README-zh-CN.md           Simplified Chinese version of README\n├── LICENSE-MIT               MIT license\n├── LICENSE-APACHE            Apache license version 2.0\n├── .travis.yml               File for Travis CI to run\n└── Wispha-supported.svg      Project badge\n```\n\n同时，你也可以使用交互模式获得更多的信息。只需输入\n\n```shell\nwispha interact --file LOOKME.json --project-name Wispha\n```\n\n然后就可以进入交互模式了。使用如下命令获得`src/main.rs`的更多信息：\n\n```shell\n(wispha) get --key description --path /src/main.rs\n```\n\n得到\n\n```\nEntry point of binary\n```\n\n输入`quit`退出交互模式。\n\n请参看[wiki](https://github.com/Evian-Zhang/Wispha/wiki)查看更多指南。\n\n## 在你自己的项目中使用Wispha\n\n如需在自己项目中使用Wispha, 只需添加包含项目布局信息的JSON文件即可。\n\n例如本项目的`LOOKME.json`文件（你可以使用任何名字命名这个JSON文件，只是我更喜欢`LOOKME.json`这个名字）：\n\n```json\n{\n  \"description\": \"Wispha project main folder\",\n  \"children\": [\n    {\n      \"name\": \"libwispha\",\n      \"type\": \"Link\",\n      \"target\": \"libwispha/LOOKME.json\"\n    },\n    {\n      \"name\": \"src\",\n      \"type\": \"Link\",\n      \"target\": \"src/LOOKME.json\"\n    },\n    {\n      \"name\": \"Cargo.toml\",\n      \"description\": \"Manifest file for cargo to run\"\n    },\n    {\n      \"name\": \"README.md\"\n    },\n    {\n      \"name\": \"README-zh-CN.md\",\n      \"description\": \"Simplified Chinese version of README\"\n    },\n    {\n      \"name\": \"LICENSE-MIT\",\n      \"description\": \"MIT license\"\n    },\n    {\n      \"name\": \"LICENSE-APACHE\",\n      \"description\": \"Apache license version 2.0\"\n    },\n    {\n      \"name\": \".travis.yml\",\n      \"description\": \"File for Travis CI to run\"\n    },\n    {\n      \"name\": \"Wispha-supported.svg\",\n      \"description\": \"Project badge\"\n    }\n  ]\n}\n```\n\n对于一个简单的文件，比如`LICENSE-MIT`, 可以直接在`children` key对应的列表中添加一个对象。其中，`description` key不是必要的，同时你可以任意添加键（键的要求请参考[wiki](https://github.com/Evian-Zhang/Wispha/wiki)）。\n\n对于一个文件夹，如果该文件夹中包含了过多的文件，同时你并不想因此使`LOOKME.json`文件变得臃肿，你可以添加`type` key, 并将其值设置为字符串`Link`, 然后添加`target`键，其值为对应的JSON文件所在的路径。除此之外，你还可以直接在该对象下添加`children`，如[src/LOOKME.json](src/LOOKME.json).\n\n如果您的项目包含了正确的JSON文件，支持Wispha，您可以在项目的README中加一个![wispha](Wispha-supported.svg)的徽标，其markdown代码为\n\n```markdown\n![wispha](https://www.github.com/Evian-Zhang/Wispha/blob/master/Wispha-supported.svg)\n```\n\n## 贡献\n\n欢迎提issue和pull request.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevian-zhang%2Fwispha","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fevian-zhang%2Fwispha","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevian-zhang%2Fwispha/lists"}