Skip to content

Add JSON argument deserialization for calls from external tooling #24

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 12, 2025

Conversation

ethangreen-dev
Copy link
Member

@ethangreen-dev ethangreen-dev commented Jun 12, 2025

This allows structured arguments to be passed from external tooling (mod managers, etc.) in a way that closely mirrors normal positional arguments. JSON mode is enabled by passing the --json argument.

For example, tcli --json '{"add":{"packages":["JereKuusela-Expand_World-1.56.0"],"project_path":"./","sync":false}}' mirrors the tcli add JereKuusela-Expand_world-1.56.0 command.

This allows structured arguments to be passed from external tooling
(mod managers, etc.) in a way that closely mirrors normal
positional arguments. JSON mode is enabled by passing the `--json`
argument.
@@ -23,6 +23,7 @@
use crate::project::lock::LockFile;
use crate::project::overrides::ProjectOverrides;
use crate::project::Project;
use crate::ts::experimental;

Check warning

Code scanning / clippy

unused import: crate::ts::experimental Warning

unused import: crate::ts::experimental
@ethangreen-dev ethangreen-dev merged commit 41489e2 into develop Jun 12, 2025
3 of 5 checks passed
@ethangreen-dev ethangreen-dev deleted the json-cli-arg branch June 12, 2025 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant