Skip to content
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

Add Documentation For New CLI Commands #1119

Closed
wants to merge 8 commits into from

Conversation

devgenix
Copy link
Contributor

@devgenix devgenix commented Dec 27, 2023

This PR adds to the documentation, basic guides to using agenta from CLI
Resolves #1118

@devgenix devgenix added documentation Improvements or additions to documentation CLI labels Dec 27, 2023
@devgenix devgenix requested a review from mmabrouk December 27, 2023 16:37
@devgenix devgenix self-assigned this Dec 27, 2023
@devgenix devgenix linked an issue Dec 27, 2023 that may be closed by this pull request
3 tasks
- By using a configuration file
- By creating it from an existing variant

#### Creating a variant from an existing variant
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand the motivation behind this command. Does this create a config file too?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand the motivation behind this command. Does this create a config file too?

@mmabrouk
The command uses the parameters defined in a valid toml file to create a new variant, and afterwards pulls the configuration from the backend and saves it in that variant config file.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still don't understand. The command is
agenta variant add --from <variant_name>

Where is the valid toml file???

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mmabrouk

The agenta variant add and agenta variant add --from_variant <variant_name> would use the config file of the variant that is selected to be the base variant.

Only the agenta variant add --config_file <codebase_name>.<config_name>.toml explicitly defines the config file to use.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still don't understand. What does it mean "would use the config file of the variant that is selected to be the base variant"? Can you please give me an example

Copy link
Member

@mmabrouk mmabrouk Jan 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Option 1

agenta config pull
cp app.default.toml app.mynewconfig.toml
nano app.mynewconfig.toml
agenta add-config app.newconfig.toml

Option 2

agenta variant add --from app.default
nano app.mynewconfig.toml
agenta config update app.mynewconfig.toml

docs/cli/variant_add.mdx Outdated Show resolved Hide resolved
Copy link
Member

@mmabrouk mmabrouk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @devgenix !
Please note that this should be merged to docs_v2 branch and not main

docs/cli/variant_add.mdx Outdated Show resolved Hide resolved
docs/cli/variant_add.mdx Outdated Show resolved Hide resolved
@devgenix
Copy link
Contributor Author

thanks @devgenix ! Please note that this should be merged to docs_v2 branch and not main

@mmabrouk
From this issue #1120, the new commands will be added to both docs/advanced_guides/using_agenta_from_cli.mdx and docs/developer_guides/cli?

@devgenix devgenix changed the base branch from main to docs_v2 December 27, 2023 17:26
@mmabrouk
Copy link
Member

thanks @devgenix ! Please note that this should be merged to docs_v2 branch and not main

@mmabrouk From this issue #1120, the new commands will be added to both docs/advanced_guides/using_agenta_from_cli.mdx and docs/developer_guides/cli?

yes, however not all the commands in all the details. the using cli is a short howto guide while the developer_guides is a reference (read about the difference here https://diataxis.fr/)

@devgenix devgenix marked this pull request as ready for review January 2, 2024 04:30
Configurations are specified in toml files and always named `<codebase_name>.<configuration_name>`.
> When you serve your first app variant, the configuration of the created app variant is pulled from the Backend and saved in a toml file named `<codebase_name>.<configuration_name>.toml`
>
> <img width="239" alt="image" src="https://github.com/Agenta-AI/agenta/assets/56418363/da80dd1b-c308-4ad0-baea-396ae727ba77" /><img width="700" alt="image" src="https://github.com/Agenta-AI/agenta/assets/56418363/d70cfa07-dc9a-4486-8090-54ba5a32bd3e" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@devgenix I don't understand the content of the config.toml??
Why do we have config_id, current_version, created_at, version history, and lots and lots of useless stuff. It is supposed to be a human readable format to specify the configuration.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mmabrouk Oh, initially I had it in mind to save only the parameters gotten from the configuration but when I asked you mentioned that I pull and save everything; https://agenta-hq.slack.com/archives/D05MTU0FWH2/p1703016946840149?thread_ts=1703013964.710329&cid=D05MTU0FWH2

But what do you have in mind that the configuration are formatted?

@aakrem aakrem deleted the branch docs_v2 January 31, 2024 08:21
@aakrem aakrem closed this Jan 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLI documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Docs][Sub-issue] Write "using agenta from cli"
3 participants