TSNDep Commands Reference
Complete documentation of all TSNDep commands.
Installation Commands
install
Download and install a repository with all its dependencies (recursively).
tsndep install <URL> <BRANCH>
tsndep install <URL> <BRANCH> --path_install /custom/path
Arguments:
URL(required) — Git repository URLBRANCH(required) — Branch or tag name
Options:
--path_install(optional) — Custom installation directory (default: current directory)
Behavior:
- Clones the main repository
- Reads its
dependencies.json - Recursively clones nested dependencies
- Executes pre/post install hooks
- Reports success/failure for each repository
Example:
tsndep install https://github.com/trading/my-system.git main
tsndep install https://github.com/trading/my-system.git develop --path_install /home/user/
Output:
[INSTALL:my-system] Root: /path/to/install
[INSTALL:my-system] Cloning from https://github.com/trading/my-system.git
[INSTALL:core-lib] Cloning from https://github.com/trading/core-lib.git
[INSTALL:my-system] Installation completed successfully
init
Create a new dependencies.json template in the current directory.
tsndep init
Arguments: None
Options: None
Behavior:
- Creates
dependencies.jsonwith template structure - Includes empty repos array
- Pre-configured hooks section
- Sets minimum MT5 build requirement
Example:
cd my-project
tsndep init
# Creates: my-project/dependencies.json
Template Content:
{
"repos": [],
"min_mt5_build": 5830,
"other_languages": [],
"hooks": {
"post_install_only_on_success": true,
"post_install": [],
"pre_install": [],
"pre_update": [],
"post_update_only_on_success": true,
"post_update": []
}
}
Dependency Management
add
Add a new dependency to dependencies.json.
tsndep add <URL> <BRANCH> --name <NAME> [--comment <COMMENT>]
Arguments:
URL(required) — Git repository URLBRANCH(required) — Branch or tag
Options:
--name(required) — Unique repository identifier--comment(optional) — Description or notes
Behavior:
- Validates
dependencies.jsonexists - Checks repository doesn't already exist
- Appends new dependency
- Saves updated configuration
Example:
tsndep add https://github.com/org/ml-models.git main \
--name ml-lib \
--comment "Machine learning models"
tsndep add https://github.com/org/utils.git develop \
--name helper-lib
Output:
[ADD:ml-lib] Added successfully
[ADD:ml-lib] URL: https://github.com/org/ml-models.git
[ADD:ml-lib] Branch: main
remove
Remove a dependency from dependencies.json.
tsndep remove <REPO_NAME>
Arguments:
REPO_NAME(required) — Repository identifier to remove
Options: None
Behavior:
- Validates
dependencies.jsonexists - Searches for repository by name
- Removes entry from repos array
- Saves updated configuration
Example:
tsndep remove old-lib
tsndep remove deprecated-module
Output:
[REMOVE:old-lib] Removed successfully
update
Pull latest changes from all repositories.
tsndep update
Arguments: None
Options: None
Behavior:
- Reads
dependencies.json - For each repository:
- Checks out correct branch
- Pulls latest changes
- Recursively updates sub-dependencies
- Executes pre/post update hooks
- Reports results
Example:
tsndep update
Output:
[UPDATE:my-project] Found 3 repositories to update
[UPDATE:core-lib] Updating repository (branch: main)
[UPDATE:data-lib] Updating repository (branch: develop)
[UPDATE:my-project] Update completed successfully
Query Commands
list
Display dependency tree structure.
tsndep list [--depth DEPTH]
Arguments: None
Options:
--depth(optional) — Maximum recursion depth (default: 10)
Behavior:
- Loads current directory's
dependencies.json - Recursively reads sub-dependencies
- Builds visual tree with ASCII characters
- Respects depth limit
Example:
tsndep list
tsndep list --depth 3
tsndep list --depth 1
Output:
[LIST:my-project] my-project/
├── core-lib/
│ ├── logger/
│ └── config/
└── data-processor/
└── ml-models/
check
Verify that all dependencies are properly cloned.
tsndep check
Arguments: None
Options: None
Behavior:
- Reads
dependencies.json - Checks each repository exists locally
- Validates Git folder structure
- Reports OK/FAIL for each
- Shows summary statistics
Example:
tsndep check
Output:
[CHECK:my-project] Starting verification
[CHECK:my-project] Verifying 5 repositories...
[CHECK:my-project] [OK] core-lib
[CHECK:my-project] [OK] logger
[CHECK:my-project] [FAIL] data-processor (not cloned)
[CHECK:my-project] [OK] ml-models
[CHECK:my-project] [OK] utils
[CHECK:my-project] Result: 4 OK, 1 FAIL
[CHECK:my-project] Verification completed
export
Export flattened dependency list with metadata.
tsndep export [--output OUTPUT]
Arguments: None
Options:
--output(optional) — Output filename (default:dependencies-exported.json)
Behavior:
- Recursively reads all dependencies
- Removes duplicates
- Creates flat list with metadata
- Includes export timestamp
- Counts total dependencies
Example:
tsndep export
tsndep export --output all-deps.json
tsndep export --output /tmp/deps.json
Output:
[EXPORT:my-project] Exporting dependencies...
[EXPORT:my-project] Exported to: all-deps.json
[EXPORT:my-project] Total dependencies: 12
Exported File Structure:
{
"_metadata": {
"exported_from": "my-project",
"exported_date": "2026-04-25T15:30:00.123456"
"total_deps": 12
},
"repos": [
{
"name": "core-lib",
"url": "https://github.com/org/core-lib.git",
"rama": "main",
"comment": "Essential library"
},
/* ... more repos ... */
]
}
Global Options
--help
Show help for any command.
tsndep --help # Show main help
tsndep install --help # Show install command help
tsndep add --help # Show add command help
Tips & Tricks
Run without installation
python -m Src.CLI --help
python -m Src.CLI install <url> <branch>
Dry-run (check without modifying)
tsndep check # Safe - only reads, doesn't modify
tsndep list # Safe - only reads, doesn't modify
Batch operations
# Install then check
tsndep install https://github.com/org/project.git main && tsndep check
# Update then export
tsndep update && tsndep export --output latest-deps.json
# Full workflow
tsndep init && \
# [edit dependencies.json] && \
tsndep install <url> main && \
tsndep list && \
tsndep check