{"id":34688446,"url":"https://github.com/tourcoder/touchp","last_synced_at":"2026-05-28T14:31:49.678Z","repository":{"id":282173940,"uuid":"947706322","full_name":"tourcoder/touchp","owner":"tourcoder","description":"Installation script for touchp","archived":false,"fork":false,"pushed_at":"2025-07-22T10:36:40.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-22T12:25:45.725Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","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/tourcoder.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-03-13T05:47:56.000Z","updated_at":"2025-07-22T10:36:43.000Z","dependencies_parsed_at":"2025-07-22T12:25:48.960Z","dependency_job_id":"6ef2fbf0-7c43-4092-8595-3a102ffa0f57","html_url":"https://github.com/tourcoder/touchp","commit_stats":null,"previous_names":["huabin/touchp","tourcoder/touchp"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tourcoder/touchp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tourcoder%2Ftouchp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tourcoder%2Ftouchp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tourcoder%2Ftouchp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tourcoder%2Ftouchp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tourcoder","download_url":"https://codeload.github.com/tourcoder/touchp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tourcoder%2Ftouchp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33613431,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-28T02:00:06.440Z","response_time":99,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2025-12-24T21:56:09.952Z","updated_at":"2026-05-28T14:31:49.671Z","avatar_url":"https://github.com/tourcoder.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# touchp\n\n`touchp` is a command-line utility written in Go that recursively creates directories and target files in a single command. It combines the functionality of `mkdir -p` and `touch`, making it easy to create files along with their parent directories. It supports multiple file creation, custom permissions, and initial content.\n\n### Features\n\n- Recursively create directories and files with one command.\n- Support for multiple file creation in a single invocation.\n- Customizable file permissions (e.g., `0644`, `0600`).\n- Option to specify initial content for the files.\n- Cross-platform compatibility (macOS, Linux, Windows).\n\n### Installation\n\nYou can install `touchp` using the provided installation script, which automatically detects your operating system and architecture, then downloads and installs the appropriate precompiled binary.\n\n### Prerequisites\n\n- A supported operating system: macOS, Linux, or Windows.\n- `curl` installed (for downloading the script and binary).\n- For macOS/Linux: Bash shell (usually preinstalled).\n- For Windows: A Bash-compatible environment (e.g., Git Bash, WSL) is recommended for the script, though manual installation is also supported.\n\n### Install via Script\n\nRun the following command in your terminal to download and execute the \n\n```\ncurl -fsSL https://raw.githubusercontent.com/tourcoder/touchp/refs/heads/master/install.sh | sh\n```\n\n#### What the Script Does\n\n1. Detects Your System: Identifies your OS (macOS, Linux, Windows) and architecture (amd64, arm64).\n\n2. Downloads the Binary: Fetches the correct precompiled binary from `https://touchp.tourcoder.com/` (e.g., touchp-macos-arm64-v1.0.0).\n\n3. Installs the Binary:\n - On macOS/Linux: Places `touchp` in `/usr/local/bin`.\n - On Windows: Downloads the `.exe` file to a temporary directory and prompts you to move it manually to a directory in your PATH.\n\n4. Cleans Up: Removes temporary files after installation.\n\n#### Example Output\n\n- On macOS (Apple Silicon):\n\n\t```\n\tStarting touchp installation...\n\tDetected system: macos-arm64\n\tDownloading touchp-macos-arm64-v1.0.0 from https://touchp.tourcoder.com/touchp-macos-arm64-v1.0.0...\n\tSuccessfully installed touchp to /usr/local/bin/touchp\n\tYou can now run 'touchp --help' to get started.\n\t```\n\t\n- On Linux (x86_64):\n\n\t```\n\tStarting touchp installation...\n\tDetected system: linux-amd64\n\tDownloading touchp-linux-amd64-v1.0.0 from https://touchp.tourcoder.com/touchp-linux-amd64-v1.0.0...\n\tSuccessfully installed touchp to /usr/local/bin/touchp\n\tYou can now run 'touchp --help' to get started.\n\t```\n\n- On Windows (via Git Bash):\n\n\t```\n\tStarting touchp installation...\n\tDetected system: windows-amd64\n\tDownloading touchp-windows-amd64-v1.0.0.exe from https://touchp.tourcoder.com/touchp-windows-amd64-v1.0.0.exe...\n\tWindows detected. Please manually move touchp-windows-amd64-v1.0.0.exe to a directory in your PATH.\n\tFile downloaded to: /tmp/touchp-install/touchp-windows-amd64-v1.0.0.exe\n\t```\n\n### Usage\n\nOnce installed, you can use `touchp` with the following syntax:\n\n```\ntouchp [options] \u003cpath/to/filename\u003e [\u003cpath/to/filename\u003e ...]\n```\n\n#### Options\n\n- `-f, --force`: Force overwrite if the file already exists.\n- `-c, --content \u003cstring\u003e`: Specify initial content for the file(s).\n- `-m, --mode \u003coctal\u003e`: Set file permission mode (e.g., 0644, 0600). Default is 0644.\n- `--help`: Display help message.\n\n####  Examples\n\n- Create a file with its directories:\n\n\t```\n\ttouchp dir/subdir/file.txt\n\t```\n\t\n\tOutput: `Successfully created: dir/subdir/file.txt`\n\n- Create a file with content:\n\n\t```\n\ttouchp -c \"Hello, world!\" dir/sub/file.txt\n\t```\n\n- Create multiple files with custom permissions:\n\n\t```\n\ttouchp -m 0600 dir1/file1.txt dir2/file2.txt\n\t```\n\t\n\tOutput:\n\t\n\t```\n\tSuccessfully created: dir1/file1.txt\n\tSuccessfully created: dir2/file2.txt\n\t```\n\n- Force recreate an existing file:\n\n\t```\n\ttouchp -f dir/existing/file.txt\n\t```\n\t\n### Troubleshooting\n\n- Permission Denied: If `/usr/local/bin` is not writable, the script installs to `~/bin`. Add it to your PATH with:\n\n\t```\n\texport PATH=$PATH:~/bin\n\t```\n\t\n- Command Not Found: Ensure the install directory is in your PATH.\n\n- Windows Issues: Use Git Bash or WSL for the script, or install manually.\n\n### Contributing\n\nFeel free to fork this project, submit issues.\n\n### License\n\nCopyright (c) 2025 Bin Hua.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftourcoder%2Ftouchp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftourcoder%2Ftouchp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftourcoder%2Ftouchp/lists"}