Forge your project structure like a blacksmith.
Project description
smithIt CLI Documentation
Forge your project structure like a blacksmith.
smithIt is a versatile command-line tool designed to manage project structures efficiently. This documentation provides a comprehensive guide to using smithIt, covering all available commands and their usage.
Installation
To use smithIt, you need to have Python installed on your system. You can install smithIt using pip:
pip install smithit
Usage
smithIt provides several commands to manage your project structure. Here is a detailed overview of each command:
create
Creates a new project based on a configuration file.
smith create [CONFIG_FILE] [OPTIONS]
Arguments:
CONFIG_FILE: Path to the configuration file (default: smith.yaml).
Options:
--output, -o: Output directory for the project.--verbose, -v: Enable verbose mode.--force, -f: Force overwrite existing project.--parent, -p: Create the parent folder.
Examples:
smith create
This will create a new project based on the default configuration file smith.yaml already in the current directory
smith create my_config.yaml
This will create a new project based on the specified configuration file my_config.yaml in the current directory.
smith create my_config.yaml --parent
This will create a new project based on the specified configuration file my_config.yaml in the parent directory.
smith create my_config.yaml --force
This will create a new project based on the specified configuration file my_config.yaml in the current directory, overwriting any existing project.
smith create my_config.yaml --verbose
This will create a new project based on the specified configuration file my_config.yaml in the current directory, providing verbose output.
smith create my_config.yaml --force --parent
This will create a new project based on the specified configuration file my_config.yaml in the parent directory, overwriting any existing project.
smith create my_config.yaml --force --verbose
This will create a new project based on the specified configuration file my_config.yaml in the current directory, overwriting any existing project and providing verbose output.
smith create my_config.yaml --parent --verbose
This will create a new project based on the specified configuration file my_config.yaml in the parent directory and providing verbose output.
smith create my_config.yaml --parent --verbose --force
This will create a new project based on the specified configuration file my_config.yaml in the parent directory, overwriting any existing project and providing verbose output.
smith create my_config.yaml --output my_project
This will create a new project based on the specified configuration file my_config.yaml in the my_project directory.
smith create my_config.yaml --output my_project --parent
This will create a new project based on the specified configuration file my_config.yaml in the my_project directory in the parent directory.
smith create my_config.yaml --output my_project --force
This will create a new project based on the specified configuration file my_config.yaml in the my_project directory, overwriting any existing project.
smith create my_config.yaml --output my_project --verbose
This will create a new project based on the specified configuration file my_config.yaml in the my_project directory, providing verbose output.
smith create my_config.yaml --output my_project --force --parent
This will create a new project based on the specified configuration file my_config.yaml in the my_project directory in the parent directory, overwriting any existing project.
smith create my_config.yaml --output my_project --force --verbose
This will create a new project based on the specified configuration file my_config.yaml in the my_project directory, overwriting any existing project and providing verbose output.
smith create my_config.yaml --output my_project --verbose --parent
This will create a new project based on the specified configuration file my_config.yaml in the my_project directory in the parent directory and providing verbose output.
smith create my_config.yaml --output my_project --force --parent --verbose
This will create a new project based on the specified configuration file my_config.yaml in the my_project directory in the parent directory, overwriting any existing project and providing verbose output.
delete
Deletes specified paths.
smith delete [PATHS]...
Arguments:
PATHS: List of paths to delete.
Examples:
smith delete path/to/file
This will delete the file at path/to/file
smith delete path/to/directory
This will delete the directory at path/to/directory
smith delete path/to/file path/to/file2
This will delete the files at path/to/file and path/to/file2
smith delete path/to/directory path/to/directory2
This will delete the directories at path/to/directory and path/to/directory2
smith delete path/to/file path/to/directory
This will delete the file at path/to/file and the directory at `path/to/directory
rename
Renames a file or directory.
smith rename [SRC] [DEST]
Arguments:
SRC: Source path.DEST: Destination path.
Example:
smith rename old_name.txt new_name.txt
This will rename the file old_name.txt to new_name.txt
move
Moves files or directories to a specified destination.
smith move [PATHS]... [DEST]
Arguments:
PATHS: List of paths to move.DEST: Destination directory.
Examples:
smith move file1.txt /path/to/destination
This will move the file file1.txt to the directory /path/to/destination
smith move folder /path/to/destination
This will move the directory folder to the directory /path/to/destination
smith move file1.txt file2.txt /path/to/destination
This will move the files file1.txt and file2.txt to the directory /path/to/destination
smith move folder1 folder2 /path/to/destination
This will move the directories folder1 and folder2 to the directory /path/to/destination
smith move file1.txt folder /path/to/destination
This will move the file file1.txt and the directory folder to the directory /path/to/destination
add
Adds new files or directories.
smith add [PATHS]...
Arguments:
PATHS: List of paths to add.
Examples:
smith add new_file.txt
This will create the file new_file.txt
smith add new_directory
This will create the directory new_directory
smith add new_file1.txt new_file2.txt
This will create the files new_file1.txt and new_file2.txt
smith add new_directory1 new_directory2
This will create the directories new_directory1 and new_directory2
smith add new_file.txt new_directory
This will create the file new_file.txt and the directory new_directory
sync
Syncs the project structure with a configuration file.
smith sync [OPTIONS]
Options:
--config, -c: Config file to write the structure to (default: smith.yaml).--dir, -d: Project directory to detect structure from (default: current directory).
Examples:
smith sync --config my_config.yaml
This will write the current project structure to the configuration file my_config.yaml
smith sync --config my_config.yaml --dir /path/to/project
This will sync the project structure at /path/to/project with the configuration file my_config.yaml
view
Views the contents of a directory or checks if a file exists.
smith view [PATH]
Arguments:
PATH: Path to view.
Examples:
smith view /path/to/file
This will check if the file /path/to/file exists
smith view /path/to/directory
This will display the contents of the directory /path/to/directory
version
Displays the version of smithIt.
smith version
Configuration File
The configuration file is a YAML file that defines the project structure. Here is an example of a configuration file:
with no templates
project_name: MyProject
structure:
- src:
- main.py
- utils.py
- tests:
- test_main.py
- test_utils.py
- README.md
- nested_folder:
- folder:
- empty.txt
- file.txt
- empty: []
This configuration file defines a project with the following structure:
srcfolder containingmain.pyandutils.pytestsfolder containingtest_main.pyandtest_utils.pyREADME.mdfilenested_foldercontaining afolderwith anempty.txtfile and afile.txtfileemptyfolder with no contents
with templates (boilerplate codes)
project_name: MyProject
structure:
- src:
- main.py
- utils.py
- tests:
- test_main.py
- test_utils.py
- README.md
- nested_folder:
- folder:
- empty.txt
- file.txt
- temp: |
<!DOCTYPE html>
<html>
<head>
<title>MyProject</title>
</head>
<body>
<h1>Welcome to MyProject</h1>
</body>
</html>
This configuration file defines a project with the following structure:
srcfolder containingmain.pyandutils.pytestsfolder containingtest_main.pyandtest_utils.pyREADME.mdfilenested_foldercontaining afolderwith anempty.txtfile and afile.txtfiletempfile containing an HTML template
Conclusion
smithIt is a powerful tool for managing project structures. With its intuitive commands and flexible configuration, it simplifies the process of creating, modifying, and syncing project structures. Whether you're a developer, project manager, or anyone involved in project management, smithIt can streamline your workflow and enhance your productivity.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file smithit-0.1.1.tar.gz.
File metadata
- Download URL: smithit-0.1.1.tar.gz
- Upload date:
- Size: 9.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.4 Darwin/19.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
299fb3302b98d95a5d12a0e2de2ebf5d92747de2317c007ce6741f4ad7892b13
|
|
| MD5 |
604512a036e2efaa0dc06ac683ff2ec0
|
|
| BLAKE2b-256 |
1f0f19c464c96174ac43cb64063af23e6751a23e6731eb1158f8d6d1214f286a
|
File details
Details for the file smithit-0.1.1-py3-none-any.whl.
File metadata
- Download URL: smithit-0.1.1-py3-none-any.whl
- Upload date:
- Size: 10.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.4 Darwin/19.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7ed60fd17b1474bdf09dd96c90c8402f3da87ca39f2169e817cc464142d50765
|
|
| MD5 |
404a331cbf0be5d5f630586fd9a63789
|
|
| BLAKE2b-256 |
66ee904d7f1b7222a44838815af4cee2290cc6a5edca4246098279cf651b3b41
|