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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ chmod +x ~/bin/stack
### Hard Mode
Detailed documentation on the installation of stack and its prerequisites as well as how to update stack can be found [here](./docs/install.md).
## Learn More
- [Stack commands](./docs/cli.md)
- [Stack commands](./docs/commands.md)
- [Recent New Features](./docs/recent-features.md)
## Contributing

Expand Down
167 changes: 0 additions & 167 deletions docs/cli.md

This file was deleted.

72 changes: 72 additions & 0 deletions docs/commands.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# Stack Commands

Overview for all stack commands and subcommands. Please see the individual reference pages for documentation on each command, linked below.

## Overview

Stack uses a command/subcommand structure for organizing functionality. Commands are grouped by their primary function.

## Global Options

These options can be used with any command:

| Option | Type | Description | Default |
|--------|------|-------------|---------|
| `--log-file` | TEXT | Log to file (default stdout/stderr) | - |
| `--debug` | FLAG | Enable debug options | From config |
| `--stack` | TEXT | Name or path of the stack | - |
| `--profile` | TEXT | Configuration profile to use | `config` |
| `--verbose` | FLAG | Log extra details | False |
| `--quiet` | FLAG | Suppress unnecessary log output | False |
| `-h`, `--help` | FLAG | Show help message | - |

## Environment Variables

| Variable | Description |
|----------|-------------|
| `STACK_CONFIG_PROFILE` | Default configuration profile |
| `STACK_REPO_BASE_DIR` | Base directory for repositories |
| `STACK_DEBUG` | Enable debug mode |
| `STACK_LOG_LEVEL` | Set log level |
| `STACK_USE_BUILTIN_STACK` | Use built-in stack definitions |

## Configuration Files

[Placeholder: Add information about configuration file locations and formats]

## Getting Help

For help with any command:
```bash
stack COMMAND --help
stack COMMAND SUBCOMMAND --help
```

## Command Categories

### 📦 Repository & Build Management
- **[fetch](commands/fetch.md)** - Clone repositories and fetch resources
- **[prepare](commands/prepare.md)** - Build or download stack containers
- **[build](commands/build.md)** - Build stack components (containers, etc.)

### ⚙️ Stack Configuration
- **[init](commands/init.md)** - Create a stack specification file
- **[config](commands/config.md)** - Manage configuration settings

### 🚀 Deployment & Management
- **[deploy](commands/deploy.md)** - Deploy a stack
- **[manage](commands/manage.md)** - Manage a deployed stack (start, stop, etc.)

### 📊 Information & Analysis
- **[list](commands/list.md)** - List available stacks
- **[check](commands/check.md)** - Check if stack containers are ready
- **[chart](commands/chart.md)** - Generate a mermaid graph of the stack

### 🌐 Web Applications
- **[webapp](commands/webapp.md)** - Build, run, and deploy webapps

### 🔧 Utility Commands
- **[version](commands/version.md)** - Print tool version
- **[update](commands/update.md)** - Update shiv binary from a distribution URL
- **[complete](commands/complete.md)** - Output shell completion script (hidden)

69 changes: 69 additions & 0 deletions docs/commands/build.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# stack build

Build stack components (containers, etc.)

## Synopsis

```bash
stack build [OPTIONS] COMMAND [ARGS]...
```

## Description

[Placeholder: Add detailed description of the build command and its purpose in building stack components]

## Subcommands

### containers

Build stack containers

```bash
stack build containers [OPTIONS]
```

#### Options

| Option | Type | Description | Default |
|--------|------|-------------|---------|
| `--stack` | TEXT | Name or path of the stack | - |
| `--include` | TEXT | Only build these containers (can be used multiple times) | - |
| `--exclude` | TEXT | Don't build these containers (can be used multiple times) | - |
| `--git-ssh/--no-git-ssh` | FLAG | Use SSH for git rather than HTTPS | From config |
| `--build-policy` | CHOICE | Build policy to use | `as-needed` |
| `--extra-build-args` | TEXT | Supply extra arguments to build | - |
| `--dont-pull-images` | FLAG | Don't pull remote images | False |
| `--publish-images` | FLAG | Publish the built images | False |
| `--image-registry` | TEXT | Specify the remote image registry | From config |
| `--target-arch` | TEXT | Specify a target architecture (only for use with --dont-pull-images) | - |

##### Build Policies

Available build policies:
- `as-needed`: Build only if necessary
- `build`: Always build
- `build-force`: Force rebuild
- `prebuilt`: Use prebuilt images
- `prebuilt-local`: Use local prebuilt images
- `prebuilt-remote`: Use remote prebuilt images

## Examples

```bash
# Build all containers for a stack
stack build containers --stack my-stack

# Build specific containers only
stack build containers --stack my-stack --include frontend --include backend

# Force rebuild all containers
stack build containers --stack my-stack --build-policy build-force

# Build and publish to registry
stack build containers --stack my-stack --publish-images --image-registry registry.example.com
```

## See Also

- [stack prepare](prepare.md) - Build or download stack containers
- [stack deploy](deploy.md) - Deploy a stack
47 changes: 47 additions & 0 deletions docs/commands/chart.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# stack chart

Generate a mermaid graph of the stack

## Synopsis

```bash
stack chart [OPTIONS]
```

## Description

[Placeholder: Add detailed description of how the chart command generates visual representations of stack architecture using Mermaid diagrams]

## Options

| Option | Type | Description | Default |
|--------|------|-------------|---------|
| `--stack` | TEXT | Name or path of the stack | - |
| `--show-ports/--no-show-ports` | FLAG | Show port mappings in the chart | False |
| `--show-http-targets/--no-show-http-targets` | FLAG | Show HTTP proxy targets in the chart | True |
| `--show-volumes/--no-show-volumes` | FLAG | Show volume mounts in the chart | True |

## Output Format

The command generates a Mermaid diagram that can be rendered using:
- Mermaid CLI tools
- Markdown renderers with Mermaid support
- Online Mermaid editors

## Examples

```bash
# Generate a basic chart for a stack
stack chart --stack my-stack

# Generate a chart showing all details
stack chart --stack my-stack --show-ports

# Generate a minimal chart without volumes
stack chart --stack my-stack --no-show-volumes --no-show-http-targets
```

## See Also

- [stack list](list.md) - List available stacks
- [stack check](check.md) - Check if stack containers are ready
Loading