{"id":15434167,"url":"https://github.com/franckldx/fs_cli","last_synced_at":"2026-04-25T16:33:20.948Z","repository":{"id":56553803,"uuid":"267915591","full_name":"franckLdx/fs_cli","owner":"franckLdx","description":"A deno tool to handle directories and files through script: delete directories or files, copy simple or recursive, etc. Inspired by rimraf and mkdirp","archived":false,"fork":false,"pushed_at":"2021-06-12T15:24:57.000Z","size":139,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-18T08:37:01.602Z","etag":null,"topics":["deno","emptydir","mkdirp","rimraf"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/franckLdx.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":"2020-05-29T17:23:17.000Z","updated_at":"2021-06-12T15:24:59.000Z","dependencies_parsed_at":"2022-08-15T20:50:32.164Z","dependency_job_id":null,"html_url":"https://github.com/franckLdx/fs_cli","commit_stats":null,"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/franckLdx%2Ffs_cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/franckLdx%2Ffs_cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/franckLdx%2Ffs_cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/franckLdx%2Ffs_cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/franckLdx","download_url":"https://codeload.github.com/franckLdx/fs_cli/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245978277,"owners_count":20703678,"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":["deno","emptydir","mkdirp","rimraf"],"created_at":"2024-10-01T18:37:36.346Z","updated_at":"2026-04-25T16:33:20.910Z","avatar_url":"https://github.com/franckLdx.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fs-cli\n\n A deno tool to handle directories and files through script. Inspired by [rimraf](https://www.npmjs.com/package/rimraf) and mkdirp [mkdirp](https://www.npmjs.com/package/mkdirp), fs-cli aims to write build scripts that can run under any shell.\n\n[![deno land](http://img.shields.io/badge/available%20on-deno.land/x-lightgrey.svg?logo=deno\u0026labelColor=black)](https://deno.land/x/fs_cli) \n[![license](https://img.shields.io/badge/license-MIT-green)](https://github.com/franckLdx/fs_cli/blob/master/LICENSE)\n\n### Table of content\n\n- [Installation](#Installation)\n- [Commands](#commands) \n  - [cp](#cp)\n  - [emptyDir](#emptydir)\n  - [mkdirp](#mkdirp)\n  - [rm](#rm)\n- [Options for glob search](#glob-options)\n- [Global options](#global-options)\n- [Acknowledgments](#acknowledgments)\n- [What's new](#whats-new)\n- [Todo](#todo)\n\n # Installation\n\n```sh\n$ deno install --unstable --allow-read --allow-write --allow-env --allow-run -n fs_cli https://deno.land/x/fs_cli@v0.5.1/cli.ts\n```\nThe above command will always install the latest version. If you're updating from an older version you might need to run the command with the `-f` flag.\n\n### To upgrade to latest version\nTo install a specific version, run the install command with a specific version tag:\n\n```sh\n$ deno install --unstable --allow-read --allow-write --allow-env --allow-run -n fs_cli https://deno.land/x/fs_cli@\u003cversion\u003e/cli.ts\n```\n\n\n### To install a specific version\nTo install a specific version, run the install command with a specific version tag:\n\n```sh\n$ deno install --unstable --allow-read --allow-write --allow-env --allow-run -n fs_cli https://deno.land/x/fs_cli@\u003cversion\u003e/cli.ts\n```\nFor more information see [Deno's installer manual](https://deno.land/manual/tools/script_installer)\n\n# Commands\n## cp\nSyntax:\n```\nfs-cli cp \u003csource path1 or glob1\u003e...\u003csource pathN glob1\u003e \u003cdest\u003e\n```\nPerform a cp -r. If \u003cdest\u003e includes directories, thos directories are created if they does not exists.\n\n* To copy a file to anoter file:\n```\nfs-cli cp \u003csource file\u003e \u003cdest dile\u003e\n```\n* To copy a file to a directory (keeping the same file name), add an OS separator (/ under unix, \\ under windows) at the end of dest:\n```\nfs-cli cp \u003csource file\u003e \u003cdest dir\u003e/ or fs-cli cp \u003csource file\u003e \u003cdest dir\u003e\\ \n```\n* To copy a file to directory (with another name) :\n```\nfs-cli cp \u003csource file\u003e \u003cdest dir\u003e/\u003cdest file\u003e or fs-cli cp \u003csource file\u003e \u003cdest dir\u003e\\\u003cdest file\u003e \n ```\n * To copy files to directory (with another name) :\n```\nfs-cli cp \u003csource file1\u003e ... \u003csource filen\u003e \u003cdest dir\u003e\n ```\n* To copy a directory to another directory:\n```\nfs-cli cp \u003csource dir path\u003e \u003cdest dir path\u003e\n```\n\n### Options\ncp supports [glob options](#glob-options)\n\n# force mode: -f/--force\nBe default the command failed if a file has to be over written. -f/--force option allow to over write existing file\n# preserve timestamps: -p/--preserve\nif use, set last modification and access times to the ones of the original source files. When not use, timestamp behavior is OS-dependent.\n\n## emptyDir\nSyntax:\n```\nfs-cli emptyDir \u003cdir1\u003e...\u003cdirn\u003e\n```\nEnsures that each dir is empty.\nDeletes directory contents if the directory is not empty.\nIf the directory does not exist, it is created.\n\n## mkdirp\nSyntax:\n```\nfs-cli mkdirp \u003cpath1\u003e \u003cpath2\u003e \u003cpath3\u003e\n```\nPerform an mkdir -p on each given directory.\n\n## rm\nSyntax:\n```\nfs-cli rm \u003cpath or glob 1\u003e \u003cpath or glob 2\u003e ... \u003cpath or glob N\u003e\n```\nPerform an rm -rf on each given directory and file. Globs are also supported.\nIf a path does not exist, fs-cli ignores it and processes the next one.\n\n### Options\nrm supports [glob options](#glob-options)\n\n# Glob Options\nFollowing are used for [rm](#rm) and [cp](#cp)\n\n**To use glob intergated search rather than shell glob interpollation, don't forget to use quote to avoid glob being interpreted by sheel use quote: \u003ccode\u003e'\\*\\*/*.tmp'\u003c/code\u003e rahter than \u003ccode\u003e\\*\\*/*.tmp**\u003c/code\u003e\n\n## glob-root\nroot search for glob\n```\nfs-cli \u003ccommand\u003e \u003cpath or glob 1\u003e...\u003cpath or glob N\u003e --glob-root \u003cpath\u003e\n```\n\n## no-glob-dirs\nDirectories are ignored when applying a glob\n```\nfs-cli \u003ccommand\u003e \u003cpath or glob 1\u003e...\u003cpath or glob N\u003e --no-glob-dirs\n```\n\n## no-glob-files\nfiles are ignored when applying a glob\n```\nfs-cli \u003ccommand\u003e \u003cpath or glob 1\u003e...\u003cpath or glob N\u003e --no-glob-files\n```\n\n# Global options\n## quiet mode: -q/--quiet\nOutput can be disable using -q/--quiet option:\n```\nfs-cli rm \u003cpath1\u003e \u003cpath2\u003e ... \u003cpathN\u003e -q\n```\nIn case of failure, error message is always displayed, even in quiet mode.\n\n### dry run mode: -d/--dry\n-d/--dry: Output the behavior, but does nothing\n```\nfs-cli rm \u003cpath1\u003e \u003cpath2\u003e ... \u003cpathN\u003e -d\n```\n\n# Acknowledgments\nMade with [Cliffy](https://deno.land/x/cliffy) and [Cli_badges](https://deno.land/x/cli_badges)\n\n\n# What's new\nfs_cli uses recent std lib but it is tested with deno 1.11.x\nIf you use older deno relesae, try fs-cli@0.7.12.\n\n## 1.0.00\n  * use std lib std@0.98.0, cliffy@v0.19.1\n\n## 0.7.12\n  * use std lib std@0.98.0\n\n## 0.7.8\n  * use std lib 0.81.0\n\n## 0.7.7\n  * use std lib 0.79.0\n\n## 0.7.6\n  * Set for testing new Deno third parties repo management\n\n## 0.7.5\n  * use std lib 0.76.0\n\n## 0.7.4\n  * use std lib 0.74.0\n\n## 0.7.3\n  * use std lib 0.73.0\n\n## 0.7.2\n  * use std lib 0.6.0\n  * use cliffy 0.13.0\n\n## 0.7.1\n  * use std lib 0.61.0\n  * use cliffy 0.11.0\n\n## 0.7.0\n  * Added empty command\n  * use std lib 0.59.0\n\n## 0.6.0\n  * cp command now supports glob options\n\n## 0.5.1\n  * cp command\n\n## 0.4.0\n  * mkdirp command\n\n# Todo\n  * add follow Symlinks options to glob search\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffranckldx%2Ffs_cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffranckldx%2Ffs_cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffranckldx%2Ffs_cli/lists"}