Skip to content
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
1 change: 0 additions & 1 deletion apps/docs/content/docs/cli/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ stack \<command\> --help
| [`services`](./services) | Manage development services |
| [`status`](./status) | Show status of all services and resources |
| [`users`](./users) | Manage project users |
| [`users`](./users) | Manage project users |
| [`vars`](./vars) | Manage workspace variables |


Expand Down
4 changes: 2 additions & 2 deletions apps/docs/content/docs/cli/project/default.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ icon: Terminal

Set or show the default project.

The default project is used by the agent when no project is specified
in API requests (via X-Stackpanel-Project header or 'project' query param).
The default project is used by the agent for v1 API requests that send no
X-Stackpanel-Project header, when the agent has no current project.

Without arguments, shows the current default project.
With a path argument, sets that project as the default.
Expand Down
4 changes: 2 additions & 2 deletions apps/docs/content/docs/cli/project/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ icon: Terminal
Manage Stackpanel projects across your system.

Projects are stored in ~/.config/stackpanel/stackpanel.yaml and can be
accessed from any directory. Each project has a unique ID that can be
used in API requests via the X-Stackpanel-Project header.
accessed from any directory. Each project has a unique ID; v1 API
requests select their project by sending it in the X-Stackpanel-Project header.

Examples:
stack project list # List all known projects
Expand Down
1 change: 0 additions & 1 deletion apps/stackpanel-go/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ apps/stack-go/
│ ├── nixconfig/ # Nix configuration helpers
│ └── ...
└── pkg/ # Shared packages (can be imported)
├── common/ # Common utilities
├── envvars/ # Environment variable definitions
├── exec/ # Command execution
├── nix/ # Nix serialization
Expand Down

This file was deleted.

3 changes: 0 additions & 3 deletions apps/stackpanel-go/cmd/cli/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import (
"time"

"github.com/darkmatter/stackpanel/stackpanel-go/internal/output"
"github.com/darkmatter/stackpanel/stackpanel-go/pkg/common"
"github.com/darkmatter/stackpanel/stackpanel-go/pkg/nixeval"
"github.com/spf13/cobra"
)
Expand Down Expand Up @@ -224,8 +223,6 @@ func loadDeployConfig(ctx context.Context) (*DeployStackpanelConfig, error) {
return &cfg, nil
}

common.L().Debug("using deploy config", "jsonStr", jsonStr)

var cfg DeployStackpanelConfig
if err := json.Unmarshal([]byte(jsonStr), &cfg); err != nil {
return nil, fmt.Errorf("failed to parse deploy config: %w", err)
Expand Down
22 changes: 11 additions & 11 deletions apps/stackpanel-go/cmd/cli/project.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
// ~/.config/stackpanel/stackpanel.yaml.
//
// The agent serves multiple projects and needs a way to route API requests.
// Each project gets a deterministic ID (hash of its path) that clients pass
// via the X-Stackpanel-Project header. The "default" project is used when
// no header is provided, avoiding the need to specify a project for
// single-project setups.
// Each project gets a deterministic ID (hash of its path) that v1 API clients
// pass via the X-Stackpanel-Project header. Without the header the agent uses
// its current project, then the "default" project, so single-project setups
// never need to name one.
package cmd

import (
Expand All @@ -29,8 +29,8 @@ var projectCmd = &cobra.Command{
Long: `Manage Stackpanel projects across your system.

Projects are stored in ~/.config/stackpanel/stackpanel.yaml and can be
accessed from any directory. Each project has a unique ID that can be
used in API requests via the X-Stackpanel-Project header.
accessed from any directory. Each project has a unique ID; v1 API
requests select their project by sending it in the X-Stackpanel-Project header.

Examples:
stack project list # List all known projects
Expand Down Expand Up @@ -109,12 +109,12 @@ a project directory, or when you use 'stack project add'.`,
}

fmt.Println(
color.New(color.Faint).Sprint("Use project ID or name in API requests:"),
color.New(color.Faint).Sprint("Select a project in v1 API requests by its ID:"),
)
fmt.Printf(
" %s\n",
color.New(color.Faint).
Sprint("curl -H 'X-Stackpanel-Project: <id>' http://localhost:9876/api/..."),
Sprint("curl -H 'X-Stackpanel-Project: <id>' ..."),
)
},
}
Expand Down Expand Up @@ -201,7 +201,7 @@ With an argument, shows information about the specified project (by ID, name, or

// Usage hint
fmt.Println()
fmt.Println(color.New(color.Faint).Sprint("Use in API requests:"))
fmt.Println(color.New(color.Faint).Sprint("Select this project in v1 API requests:"))
fmt.Printf(
" %s\n",
color.New(color.Faint).Sprintf("curl -H 'X-Stackpanel-Project: %s' ...", id),
Expand All @@ -214,8 +214,8 @@ var projectDefaultCmd = &cobra.Command{
Short: "Set or show the default project",
Long: `Set or show the default project.

The default project is used by the agent when no project is specified
in API requests (via X-Stackpanel-Project header or 'project' query param).
The default project is used by the agent for v1 API requests that send no
X-Stackpanel-Project header, when the agent has no current project.

Without arguments, shows the current default project.
With a path argument, sets that project as the default.
Expand Down
1 change: 0 additions & 1 deletion apps/stackpanel-go/cmd/cli/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ func init() {
rootCmd.AddCommand(deployCmd)
rootCmd.AddCommand(provisionCmd)
rootCmd.AddCommand(direnvCmd)
// rootCmd.AddCommand(secretsCmd)

// Handle --no-color flag and optional auto-register
rootCmd.PersistentPreRun = func(cmd *cobra.Command, args []string) {
Expand Down
Loading
Loading