Skip to content
This repository was archived by the owner on Jan 23, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion cmd/cloud.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ type startRequest struct {
TagMessage string `json:"message,omitempty"`
}

func ShowNewProjectImport(ctx context.Context, logger logger.Logger, cmd *cobra.Command, apiUrl, apikey, projectId string, project *project.Project, dir string, isImport bool) {
func ShowNewProjectImport(ctx context.Context, logger logger.Logger, cmd *cobra.Command, apiUrl string, apikey string, projectId string, project *project.Project, dir string, isImport bool) {
title := "Import Project"
var message string
if isImport {
Expand Down Expand Up @@ -814,6 +814,7 @@ func init() {
rootCmd.AddCommand(cloudCmd)
rootCmd.AddCommand(cloudDeployCmd)
cloudCmd.AddCommand(cloudDeployCmd)

cloudDeployCmd.Flags().StringP("dir", "d", ".", "The directory to the project to deploy")
cloudDeployCmd.Flags().String("deploymentId", "", "Used to track a specific deployment")
cloudDeployCmd.Flags().Bool("ci", false, "Used to track a specific CI job")
Expand Down
29 changes: 28 additions & 1 deletion cmd/project.go
Original file line number Diff line number Diff line change
Expand Up @@ -798,11 +798,29 @@ Examples:
agentuity project import --dir /path/to/project`,
Args: cobra.NoArgs,
Run: func(cmd *cobra.Command, args []string) {
name, _ := cmd.Flags().GetString("name")
description, _ := cmd.Flags().GetString("description")
orgId, _ := cmd.Flags().GetString("org-id")
apikey, _ := cmd.Flags().GetString("apikey")

ctx, cancel := signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGINT, syscall.SIGTERM)
defer cancel()
logger := env.NewLogger(cmd)
context := project.EnsureProject(ctx, cmd)
logger := env.NewLogger(cmd)

// headless mode for nova
if apikey != "" && orgId != "" && name != "" && description != "" {
context.Project.Name = name
context.Project.Description = description
_, err := context.Project.Import(ctx, logger, context.APIURL, apikey, orgId, true)
if err != nil {
errsystem.New(errsystem.ErrImportingProject, err, errsystem.WithContextMessage("Error importing project")).ShowErrorAndExit()
}
return
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What can be confusing here is if you pass in only some of the args, like only "name", and this condition wont happen, so the cli will ask you for a name anyway

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yep you need all these attributes to run in headless mode which is used by nova but could be used by a user. I marked them as hidden because it only really used as an internal thing for now.

Does the fact they are hidden make it better?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

can we just determine headless if all of them are passed in and drop the requirement for headless? or is there some different behavior that headless is presenting?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

nope thats a good point


ShowNewProjectImport(ctx, logger, cmd, context.APIURL, context.Token, "", context.Project, context.Dir, true)

},
}

Expand Down Expand Up @@ -846,4 +864,13 @@ func init() {
projectNewCmd.Flags().String("templates-dir", "", "The directory to load the templates. Defaults to loading them from the github.com/agentuity/templates repository")
projectNewCmd.Flags().String("auth", "project", "The authentication type for the agent (project, webhook, or none)")
projectNewCmd.Flags().String("action", "github-app", "The action to take for the project (github-action, github-app, none)")

projectImportCmd.Flags().String("apikey", "", "The API key to use for the project")
projectImportCmd.Flags().String("name", "", "The name of the project to import")
projectImportCmd.Flags().String("description", "", "The description of the project to import")

projectImportCmd.Flags().MarkHidden("apikey")
projectImportCmd.Flags().MarkHidden("name")
projectImportCmd.Flags().MarkHidden("description")
projectImportCmd.Flags().MarkHidden("org-id")
}
Loading