[](https://crates.io/crates/fuga)
[](https://github.com/liebe-magi/fuga/blob/main/LICENSE)
[](https://github.com/liebe-magi/fuga/actions/workflows/build.yml)
# ๐ฆ FUGA ๐ฆ
A CLI tool to operate files or directories in 2 steps.
[ๆฅๆฌ่ชใฎREADMEใฏใใกใ](README_jp.md)
## ๐ฆ DESCRIPTION
- `fuga` is a CLI tool that performs file operations in two steps.
- Developed as an alternative to commands like `mv`, `cp`, and `ln`.
- Mark files or directories to operate on using `fuga mark`, and then perform copy or move operations after navigating to another directory.
## ๐ฆ INSTALLATION
### Pre-built Binaries
- Pre-built binaries for the following architectures are available on [releases](https://github.com/liebe-magi/fuga/releases).
- aarch64-apple-darwin (Mac - Apple Chip)
- x86_64-apple-darwin (Mac - Intel Chip)
- x86_64-unknown-linux-gnu (Linux - Intel Chip)
- Place the binary for your architecture in a directory included in your system's PATH.
### Build with Cargo
- You can install `fuga` by building it using the `cargo` command.
```
cargo install fuga
```
### Verify Installation
- If the installation is successful, the version information can be displayed using the following command:
```
$ fuga -V
fuga v0.0.1
```
## ๐ฆ USAGE
```
USAGE:
fuga <SUBCOMMAND>
OPTIONS:
-h, --help Print help information
-V, --version Print version information
SUBCOMMANDS:
copy Copy the marked file or directory
help Print this message or the help of the given subcommand(s)
link Make a symbolic link to the marked file or directory
mark Set the path of the target file or directory
move Move the marked file or directory
version Show the version of the tool
```
### Setting the Target File
- Mark the file or directory you want to operate on with `fuga mark <TARGET>`.
```
$ fuga mark target_file.txt
โ
: ๐ target_file.txt has marked.
```
- To check the currently marked file or directory, use `fuga mark --show`.
```
$ fuga mark --show
โน๏ธ : ๐ /home/user/path/to/file/target_file.txt
```
- To unmark a file or directory, use `fuga mark --reset`.
```
$ fuga mark --reset
โ
: The marked path has reset.
```
### File Operations
Three file operations are possible: `Copy`, `Move`, and `Symbolic Link creation`.
#### Copy
- Navigate to the destination directory and use `fuga copy` to copy the marked file or directory.
```
$ cd test_dir_copy
$ fuga copy
โน๏ธ : Start copying ๐ target_file.txt from /home/user/path/to/file/target_file.txt
โ
: ๐ target_file.txt has copied.
```
- You can also specify the destination directory or file name.
```
$ fuga copy test_dir_copy
โน๏ธ : Start copying ๐ test_dir_copy/target_file.txt from /home/user/path/to/file/target_file.txt
โ
: ๐ test_dir_copy/target_file.txt has copied.
$ fuga copy copy.txt
โน๏ธ : Start copying ๐ copy.txt from /home/user/path/to/file/target_file.txt
โ
: ๐ copy.txt has copied.
```
#### Move
- Navigate to the destination directory and use `fuga move` to move the marked file or directory.
```
$ cd test_dir_move
$ fuga move
โน๏ธ : Start moving ๐ target_file.txt from /home/user/path/to/file/target_file.txt
โ
: ๐ target_file.txt has moved.
```
- Similar to copying, you can specify the destination directory or file name.
```
$ fuga move test_dir_move
โน๏ธ : Start copying ๐ test_dir_move/target_file.txt from /home/user/path/to/file/target_file.txt
โ
: ๐ test_dir_move/target_file.txt has moved.
$ fuga move move.txt
โน๏ธ : Start moving ๐ move.txt from /home/user/path/to/file/target_file.txt
โ
: ๐ move.txt has moved.
```
#### Symbolic Link
- Navigate to the directory where you want to create a symbolic link and use `fuga link` to create a symbolic link to the marked file or directory.
```
$ cd test_dir_link
$ fuga link
โน๏ธ : Start making symbolic link ๐ target_file.txt from /home/user/path/to/file/target_file.txt
โ
: ๐ target_file.txt has made.
```
- You can also specify the destination directory or file name for the symbolic link.
```
$ fuga link test_dir_link
โน๏ธ : Start making symbolic link ๐ test_dir_link/target_file.txt from /home/user/path/to/file/target_file.txt
โ
: ๐ test_dir_link/target_file.txt has made.
$ fuga link link.txt
โน๏ธ : Start making symbolic link ๐ link.txt from /home/user/path/to/file/target_file.txt
โ
: ๐ link.txt has made.
```