-
-
Couldn't load subscription status.
- Fork 4
Home
The Artifex (4r7if3x) edited this page Dec 27, 2024
·
3 revisions
- TreeGen works on all major operating systems including BSD, Linux, macOS, and Windows.
- TreeGen lets you decide whether to overwrite your existing files.
Download the appropriate binary or package for your processor architecture and operating system from the latest release. Then, you can install it as a system command:
BSD, Linux, and macOS
sudo chmod +x /path/to/treegen
sudo mv /path/to/treegen /usr/bin/treegenWindows
Unblock-File -Path "C:\path\to\treegen.exe"
Move-Item -Path "C:\path\to\treegen.exe" -Destination "C:\Windows\System32\treegen.exe"or, follow the instructions below to install the provided packages:
Debian-based Linux distros
sudo apt install /path/to/treegen.debRedHat-based Linux distros
sudo dnf install /path/to/treegen.rpmotherwise, you can also compile and install it directly from the source if you have Go installed on your system:
go install github.com/bilbilak/treegentreegen --helpman treegenExamples:
BSD, Linux, and macOS
treegen /path/to/tree.txttreegen < /path/to/tree.txtcat /path/to/tree.txt | treegentreegen <<EOF
myProject/
├── README.md
├── src/
│ ├── main.js
│ ├── components/
│ │ |-- Header.js
│ │ |-- Footer.js
│ │ +-- shared/
│ │ |-- Button.js
│ │ +-- Slider.js
│ └── utils/
│ ├── helpers.js
│ └── test/
│ ├── helper.test.js
│ └── mockData.js
├── lib/
│ ├── middleware.js
│ └── database.js
├── tests/
│ ├── main.test.js
│ └── components/
│ ├── Header.test.js
│ └── Footer.test.js
└── package.json
EOFWindows
treegen "C:\path\to\tree.txt"Get-Content "C:\path\to\tree.txt" | treegen$tree = @"
myProject/
├── README.md
├── src/
│ ├── main.js
│ ├── components/
│ │ |-- Header.js
│ │ |-- Footer.js
│ │ +-- shared/
│ │ |-- Button.js
│ │ +-- Slider.js
│ └── utils/
│ ├── helpers.js
│ └── test/
│ ├── helper.test.js
│ └── mockData.js
├── lib/
│ ├── middleware.js
│ └── database.js
├── tests/
│ ├── main.test.js
│ └── components/
│ ├── Header.test.js
│ └── Footer.test.js
└── package.json
"@
$tree.Trim() | treegen@"myProject/
├── README.md
├── src/
│ ├── main.js
│ ├── components/
│ │ |-- Header.js
│ │ |-- Footer.js
│ │ +-- shared/
│ │ |-- Button.js
│ │ +-- Slider.js
│ └── utils/
│ ├── helpers.js
│ └── test/
│ ├── helper.test.js
│ └── mockData.js
├── lib/
│ ├── middleware.js
│ └── database.js
├── tests/
│ ├── main.test.js
│ └── components/
│ ├── Header.test.js
│ └── Footer.test.js
└── package.json"@ | treegen